ticktimers: Merge nested if statement

This commit is contained in:
sdburns1998
2019-07-07 21:43:16 +02:00
parent 3a9d42babf
commit 99ea565d0a

View File

@@ -239,12 +239,9 @@ public class TickTimersPlugin extends Plugin
for (int anims : npcs.getAnimations())
{
if (anims == npcs.getNpc().getAnimation())
if (anims == npcs.getNpc().getAnimation() && npcs.getTicksUntilAttack() < 1)
{
if (npcs.getTicksUntilAttack() < 1)
{
npcs.setTicksUntilAttack(npcs.getAttackSpeed());
}
npcs.setTicksUntilAttack(npcs.getAttackSpeed());
}
}
}