Replaced instanceof L2Summon with isSummon method.

This commit is contained in:
MobiusDev
2018-07-02 01:03:46 +00:00
parent 0b09d49f8d
commit 856ff5ebdc
17 changed files with 34 additions and 36 deletions

View File

@@ -739,7 +739,7 @@ public class AdminEditChar implements IAdminCommandHandler
else if (command.startsWith("admin_summon_info"))
{
final L2Object target = activeChar.getTarget();
if (target instanceof L2Summon)
if ((target != null) && target.isSummon())
{
gatherSummonInfo((L2Summon) target, activeChar);
}
@@ -751,7 +751,7 @@ public class AdminEditChar implements IAdminCommandHandler
else if (command.startsWith("admin_unsummon"))
{
final L2Object target = activeChar.getTarget();
if (target instanceof L2Summon)
if ((target != null) && target.isSummon())
{
((L2Summon) target).unSummon(((L2Summon) target).getOwner());
}