Sync with L2jServer HighFive Nov 14th 2015.
This commit is contained in:
@ -43,7 +43,6 @@ import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2FriendlyMobInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GuardInstance;
|
||||
@ -180,24 +179,24 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
if (target.isInvul())
|
||||
{
|
||||
// However EffectInvincible requires to check GMs specially
|
||||
if ((target instanceof L2PcInstance) && target.isGM())
|
||||
if (target.isPlayer() && target.isGM())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((target instanceof L2Summon) && ((L2Summon) target).getOwner().isGM())
|
||||
if (target.isSummon() && ((L2Summon) target).getOwner().isGM())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the target isn't a Folk or a Door
|
||||
if (target instanceof L2DoorInstance)
|
||||
if (target.isDoor())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if the target isn't dead, is in the Aggro range and is at the same height
|
||||
if (target.isAlikeDead() || ((target instanceof L2Playable) && !me.isInsideRadius(target, me.getAggroRange(), true, false)))
|
||||
if (target.isAlikeDead() || ((target.isPlayable()) && !me.isInsideRadius(target, me.getAggroRange(), true, false)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
||||
}
|
||||
|
||||
// TODO(Zoey76)[#112]: This check must change if summon fall in L2Npc hierarchy.
|
||||
if (target instanceof L2Npc)
|
||||
if (target.isNpc())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -147,11 +147,11 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
if ((target != null) && target.isInvul())
|
||||
{
|
||||
// However EffectInvincible requires to check GMs specially
|
||||
if ((target instanceof L2PcInstance) && target.isGM())
|
||||
if (target.isPlayer() && target.isGM())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((target instanceof L2Summon) && ((L2Summon) target).getOwner().isGM())
|
||||
if (target.isSummon() && ((L2Summon) target).getOwner().isGM())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_MOVE_TO;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_PICK_UP;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
|
||||
|
||||
import com.l2jserver.gameserver.enums.DuelState;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
@ -33,6 +34,8 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class L2PlayerAI extends L2PlayableAI
|
||||
{
|
||||
@ -190,7 +193,12 @@ public class L2PlayerAI extends L2PlayableAI
|
||||
clientActionFailed();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_actor.getActingPlayer().getDuelState() == DuelState.DEAD)
|
||||
{
|
||||
clientActionFailed();
|
||||
_actor.getActingPlayer().sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_MOVE_WHILE_FROZEN_PLEASE_WAIT));
|
||||
return;
|
||||
}
|
||||
if (_actor.isAllSkillsDisabled() || _actor.isCastingNow() || _actor.isAttackingNow())
|
||||
{
|
||||
clientActionFailed();
|
||||
|
@ -136,11 +136,11 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
if (target.isInvul())
|
||||
{
|
||||
// However EffectInvincible requires to check GMs specially
|
||||
if ((target instanceof L2PcInstance) && target.isGM())
|
||||
if (target.isPlayer() && target.isGM())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((target instanceof L2Summon) && ((L2Summon) target).getOwner().isGM())
|
||||
if (target.isSummon() && ((L2Summon) target).getOwner().isGM())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user