]> git.localhorst.tv Git - l2e.git/commitdiff
put hero into a variable when applying damage for debugging purposes
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Aug 2012 20:52:01 +0000 (22:52 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Aug 2012 20:52:01 +0000 (22:52 +0200)
src/battle/BattleState.cpp

index 5547bbf8235822c64bf6d6ca6ecb49ba98df9af4..bd039ff588c7e86bb278065dad1a49bd092a1c5d 100644 (file)
@@ -386,8 +386,9 @@ void BattleState::ApplyDamage() {
                }
        } else {
                for (int i(0); i < NumHeroes(); ++i) {
+                       Hero &hero(HeroAt(i));
                        if (ts.IsBad(i)) {
-                               HeroAt(i).SubtractHealth(ts.GetAmount(i));
+                               hero.SubtractHealth(ts.GetAmount(i));
                        }
                }
        }