Replaced instanceof L2DoorInstance with isDoor method.
This commit is contained in:
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
|||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
||||||
@@ -57,7 +56,7 @@ public class StaticObjectScope implements IAffectScopeHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c instanceof L2DoorInstance) && !(c instanceof L2StaticObjectInstance))
|
if (!c.isDoor() && !(c instanceof L2StaticObjectInstance))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
|||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
||||||
@@ -57,7 +56,7 @@ public class StaticObjectScope implements IAffectScopeHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c instanceof L2DoorInstance) && !(c instanceof L2StaticObjectInstance))
|
if (!c.isDoor() && !(c instanceof L2StaticObjectInstance))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
|||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
||||||
@@ -57,7 +56,7 @@ public class StaticObjectScope implements IAffectScopeHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c instanceof L2DoorInstance) && !(c instanceof L2StaticObjectInstance))
|
if (!c.isDoor() && !(c instanceof L2StaticObjectInstance))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
|||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
||||||
@@ -57,7 +56,7 @@ public class StaticObjectScope implements IAffectScopeHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c instanceof L2DoorInstance) && !(c instanceof L2StaticObjectInstance))
|
if (!c.isDoor() && !(c instanceof L2StaticObjectInstance))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2ControllableMobInstance;
|
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.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.util.Util;
|
import com.l2jmobius.gameserver.util.Util;
|
||||||
@@ -371,7 +370,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
|||||||
|
|
||||||
private boolean checkAutoAttackCondition(L2Character target)
|
private boolean checkAutoAttackCondition(L2Character target)
|
||||||
{
|
{
|
||||||
if ((target == null) || target.isNpc() || (target instanceof L2DoorInstance))
|
if ((target == null) || target.isNpc() || target.isDoor())
|
||||||
{
|
{
|
||||||
return false;
|
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.L2Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
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.L2FortCommanderInstance;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
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
|
// 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;
|
L2PcInstance player = null;
|
||||||
if (target.isPlayer())
|
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.L2Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
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.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
@@ -123,7 +122,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
|||||||
protected boolean autoAttackCondition(L2Character target)
|
protected boolean autoAttackCondition(L2Character target)
|
||||||
{
|
{
|
||||||
// Check if the target isn't another guard, folk or a door
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
|||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
||||||
@@ -57,7 +56,7 @@ public class StaticObjectScope implements IAffectScopeHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c instanceof L2DoorInstance) && !(c instanceof L2StaticObjectInstance))
|
if (!c.isDoor() && !(c instanceof L2StaticObjectInstance))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
|||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
||||||
@@ -57,7 +56,7 @@ public class StaticObjectScope implements IAffectScopeHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c instanceof L2DoorInstance) && !(c instanceof L2StaticObjectInstance))
|
if (!c.isDoor() && !(c instanceof L2StaticObjectInstance))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_open"))
|
else if (command.equals("admin_open"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).openMe();
|
((L2DoorInstance) target).openMe();
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
|
|||||||
else if (command.equals("admin_close"))
|
else if (command.equals("admin_close"))
|
||||||
{
|
{
|
||||||
final L2Object target = activeChar.getTarget();
|
final L2Object target = activeChar.getTarget();
|
||||||
if (target instanceof L2DoorInstance)
|
if ((target != null) && target.isDoor())
|
||||||
{
|
{
|
||||||
((L2DoorInstance) target).closeMe();
|
((L2DoorInstance) target).closeMe();
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
|||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
import com.l2jmobius.gameserver.model.skills.targets.AffectScope;
|
||||||
@@ -57,7 +56,7 @@ public class StaticObjectScope implements IAffectScopeHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c instanceof L2DoorInstance) && !(c instanceof L2StaticObjectInstance))
|
if (!c.isDoor() && !(c instanceof L2StaticObjectInstance))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user