Prohibit breaking summon following owner.
This commit is contained in:
@@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3413,9 +3413,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -869,7 +869,7 @@ abstract class AbstractAI implements Ctrl
|
|||||||
_followTarget = null;
|
_followTarget = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected synchronized Creature getFollowTarget()
|
public synchronized Creature getFollowTarget()
|
||||||
{
|
{
|
||||||
return _followTarget;
|
return _followTarget;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6063,9 +6063,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
{
|
{
|
||||||
if (this instanceof Summon)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -872,7 +872,7 @@ public abstract class AbstractAI implements Ctrl
|
|||||||
_followTarget = null;
|
_followTarget = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Creature getFollowTarget()
|
public Creature getFollowTarget()
|
||||||
{
|
{
|
||||||
return _followTarget;
|
return _followTarget;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4390,9 +4390,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -3412,9 +3412,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -3412,9 +3412,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -3412,9 +3412,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -3425,9 +3425,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -3425,9 +3425,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -3425,9 +3425,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
if (isSummon())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user