AdminKill handler null target fix.
Contributed by CostyKiller.
This commit is contained in:
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -107,7 +107,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -107,7 +107,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final WorldObject obj = activeChar.getTarget();
|
final WorldObject obj = activeChar.getTarget();
|
||||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||||
{
|
{
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user