From: Daniel Karbach Date: Mon, 20 Aug 2012 20:54:40 +0000 (+0200) Subject: check for victory or defeat when looking for the next attack X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=fa2eb577b1b5356b8f4b1c23b52f673900ae6b71;p=l2e.git check for victory or defeat when looking for the next attack --- diff --git a/src/battle/BattleState.cpp b/src/battle/BattleState.cpp index bd039ff..bf2d2c1 100644 --- a/src/battle/BattleState.cpp +++ b/src/battle/BattleState.cpp @@ -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) {