Using skills with shift or /useskillstand auto attack should not be executed.
Contributed by Sahar.
This commit is contained in:
parent
193e78ad3a
commit
1304c34d2f
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user