Reset target after monster casts a buff.

This commit is contained in:
MobiusDevelopment
2019-10-16 10:08:22 +00:00
parent 917f6a7b9b
commit 78c1add1c4
15 changed files with 60 additions and 60 deletions

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }

View File

@@ -289,12 +289,12 @@ public class AttackableAI extends CreatureAI
{ {
for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF)) for (Skill buff : getActiveChar().getTemplate().getAISkills(AISkillScope.BUFF))
{ {
target = skillTargetReconsider(buff, true); final Creature buffTarget = skillTargetReconsider(buff, true);
if (target != null) if (buffTarget != null)
{ {
setTarget(target); setTarget(buffTarget);
_actor.doCast(buff); _actor.doCast(buff);
LOGGER.finer(this + " used buff skill " + buff + " on " + _actor); setTarget(target);
break; break;
} }
} }