Using skills with shift or /useskillstand auto attack should not be executed.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment 2020-09-26 10:13:05 +00:00
parent 193e78ad3a
commit 1304c34d2f
2 changed files with 26 additions and 2 deletions

View File

@ -5511,7 +5511,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
final IntentionCommand nextIntention = getAI().getNextIntention();
if ((nextIntention == null) || (nextIntention.getCtrlIntention() != CtrlIntention.AI_INTENTION_MOVE_TO))
{
getAI().setIntention(AI_INTENTION_ATTACK, target);
if (isPlayer())
{
final PlayerInstance currPlayer = getActingPlayer();
final SkillUseHolder currSkill = currPlayer.getCurrentSkill();
if ((currSkill == null) || !currSkill.isShiftPressed())
{
getAI().setIntention(AI_INTENTION_ATTACK, target);
}
}
else
{
getAI().setIntention(AI_INTENTION_ATTACK, target);
}
}
}

View File

@ -5513,7 +5513,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
final IntentionCommand nextIntention = getAI().getNextIntention();
if ((nextIntention == null) || (nextIntention.getCtrlIntention() != CtrlIntention.AI_INTENTION_MOVE_TO))
{
getAI().setIntention(AI_INTENTION_ATTACK, target);
if (isPlayer())
{
final PlayerInstance currPlayer = getActingPlayer();
final SkillUseHolder currSkill = currPlayer.getCurrentSkill();
if ((currSkill == null) || !currSkill.isShiftPressed())
{
getAI().setIntention(AI_INTENTION_ATTACK, target);
}
}
else
{
getAI().setIntention(AI_INTENTION_ATTACK, target);
}
}
}