diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java index b0ecf76bc7..4ff4745460 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java index b0ecf76bc7..4ff4745460 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4952d63af8..1959558ed6 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4952d63af8..1959558ed6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4952d63af8..1959558ed6 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4952d63af8..1959558ed6 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4952d63af8..1959558ed6 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java index b6140dd973..680969e076 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/AbstractAI.java @@ -869,7 +869,7 @@ abstract class AbstractAI implements Ctrl _followTarget = null; } - protected synchronized Creature getFollowTarget() + public synchronized Creature getFollowTarget() { return _followTarget; } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java index 6194da34bf..f05a75b2ed 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -6063,9 +6063,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder { if (this instanceof Summon) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getFollowTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java index c74dfc278d..38c1899ff0 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/AbstractAI.java @@ -872,7 +872,7 @@ public abstract class AbstractAI implements Ctrl _followTarget = null; } - protected Creature getFollowTarget() + public Creature getFollowTarget() { return _followTarget; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java index 46387cdf44..ef34e5d422 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4390,9 +4390,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getFollowTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java index 14c07fbf2e..8a6147c013 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3412,9 +3412,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java index 14c07fbf2e..8a6147c013 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3412,9 +3412,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java index 14c07fbf2e..8a6147c013 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3412,9 +3412,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java index 3cc65eef5a..ba2cd65a40 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3425,9 +3425,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java index 3cc65eef5a..ba2cd65a40 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3425,9 +3425,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java index 3cc65eef5a..ba2cd65a40 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -3425,9 +3425,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { if (isSummon()) { - ((Summon) this).setFollowStatus(false); + // Do not break following owner. + if (getAI().getTarget() != getActingPlayer()) + { + ((Summon) this).setFollowStatus(false); + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + } + } + else + { + getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } - getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); return; } }