Replaced instanceof L2DoorInstance with isDoor method.
This commit is contained in:
@ -31,7 +31,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ControllableMobInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
@ -371,7 +370,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
||||
|
||||
private boolean checkAutoAttackCondition(L2Character target)
|
||||
{
|
||||
if ((target == null) || target.isNpc() || (target instanceof L2DoorInstance))
|
||||
if ((target == null) || target.isNpc() || target.isDoor())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2FortCommanderInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
||||
@ -128,7 +127,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
// Check if the target isn't another guard, folk or a door
|
||||
if ((target instanceof L2DefenderInstance) || target.isNpc() || (target instanceof L2DoorInstance) || target.isAlikeDead() || (target instanceof L2FortCommanderInstance) || target.isPlayable())
|
||||
if ((target instanceof L2DefenderInstance) || target.isNpc() || target.isDoor() || target.isAlikeDead() || (target instanceof L2FortCommanderInstance) || target.isPlayable())
|
||||
{
|
||||
L2PcInstance player = null;
|
||||
if (target.isPlayer())
|
||||
|
@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -123,7 +122,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
protected boolean autoAttackCondition(L2Character target)
|
||||
{
|
||||
// Check if the target isn't another guard, folk or a door
|
||||
if ((target == null) || (target instanceof L2DefenderInstance) || target.isNpc() || (target instanceof L2DoorInstance) || target.isAlikeDead())
|
||||
if ((target == null) || (target instanceof L2DefenderInstance) || target.isNpc() || target.isDoor() || target.isAlikeDead())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user