From a2f3af8de4076193c596f4a3bcda85f712bce2a5 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 6 Sep 2017 14:26:56 +0000 Subject: [PATCH] Changing player intention when attacking Siege doors. --- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 6 +++++- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 6 +++++- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 6 +++++- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 5 +++++ .../com/l2jmobius/gameserver/model/actor/L2Character.java | 6 +++++- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java index f8227e73a0..ee7f16229b 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1051,6 +1051,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // GeoData Los Check here (or dz > 1000) if (!GeoEngine.getInstance().canSeeTarget(this, target)) { + if (target.isDoor() && target.isAutoAttackable(this)) + { + getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation()); + return; + } sendPacket(SystemMessageId.CANNOT_SEE_TARGET); getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); @@ -1220,7 +1225,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Notify AI with EVT_READY_TO_ACT ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk); } - } /** diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java index f8227e73a0..ee7f16229b 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1051,6 +1051,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // GeoData Los Check here (or dz > 1000) if (!GeoEngine.getInstance().canSeeTarget(this, target)) { + if (target.isDoor() && target.isAutoAttackable(this)) + { + getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation()); + return; + } sendPacket(SystemMessageId.CANNOT_SEE_TARGET); getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); @@ -1220,7 +1225,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Notify AI with EVT_READY_TO_ACT ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk); } - } /** diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java index f8227e73a0..ee7f16229b 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1051,6 +1051,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // GeoData Los Check here (or dz > 1000) if (!GeoEngine.getInstance().canSeeTarget(this, target)) { + if (target.isDoor() && target.isAutoAttackable(this)) + { + getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation()); + return; + } sendPacket(SystemMessageId.CANNOT_SEE_TARGET); getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); @@ -1220,7 +1225,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Notify AI with EVT_READY_TO_ACT ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk); } - } /** diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java index d381bf8a4c..dbc506ec2a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1009,6 +1009,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // GeoData Los Check here (or dz > 1000) if (!GeoEngine.getInstance().canSeeTarget(this, target)) { + if (target.isDoor() && target.isAutoAttackable(this)) + { + getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation()); + return; + } sendPacket(SystemMessageId.CANNOT_SEE_TARGET); getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java index f8227e73a0..ee7f16229b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -1051,6 +1051,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // GeoData Los Check here (or dz > 1000) if (!GeoEngine.getInstance().canSeeTarget(this, target)) { + if (target.isDoor() && target.isAutoAttackable(this)) + { + getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation()); + return; + } sendPacket(SystemMessageId.CANNOT_SEE_TARGET); getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); @@ -1220,7 +1225,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe // Notify AI with EVT_READY_TO_ACT ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk); } - } /**