]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.cpp
check for victory or defeat when looking for the next attack
[l2e.git] / src / battle / BattleState.cpp
index bd039ff588c7e86bb278065dad1a49bd092a1c5d..bf2d2c1ff1c6d084cef55c91fdc6b7b038a588ad 100644 (file)
@@ -278,6 +278,10 @@ void BattleState::CalculateAttackOrder() {
 }
 
 void BattleState::NextAttack() {
+       if (Victory() || Defeat()) {
+               attackCursor = attackOrder.size();
+               return;
+       }
        ++attackCursor;
        while (attackCursor < int(attackOrder.size())) {
                if (attackOrder[attackCursor].isMonster) {