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

@ -5510,10 +5510,22 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
{
final IntentionCommand nextIntention = getAI().getNextIntention();
if ((nextIntention == null) || (nextIntention.getCtrlIntention() != CtrlIntention.AI_INTENTION_MOVE_TO))
{
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);
}
}
}
if (skill.isBad() && (skill.getTargetType() != TargetType.UNLOCKABLE))
{

View File

@ -5512,10 +5512,22 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
{
final IntentionCommand nextIntention = getAI().getNextIntention();
if ((nextIntention == null) || (nextIntention.getCtrlIntention() != CtrlIntention.AI_INTENTION_MOVE_TO))
{
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);
}
}
}
if (skill.isBad() && (skill.getTargetType() != TargetType.UNLOCKABLE))
{