Prohibit breaking summon following owner.

This commit is contained in:
MobiusDevelopment
2019-09-17 07:05:28 +00:00
parent b09d495694
commit d46b12d904
17 changed files with 152 additions and 32 deletions

View File

@@ -872,7 +872,7 @@ public abstract class AbstractAI implements Ctrl
_followTarget = null;
}
protected Creature getFollowTarget()
public Creature getFollowTarget()
{
return _followTarget;
}

View File

@@ -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;
}
}