]> git.localhorst.tv Git - l2e.git/commitdiff
check for victory or defeat when looking for the next attack
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Aug 2012 20:54:40 +0000 (22:54 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Aug 2012 20:54:40 +0000 (22:54 +0200)
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) {