]> git.localhorst.tv Git - l2e.git/commitdiff
removed redundant BattleState::MonsterAttackChoiceAt(int)
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 21 Aug 2012 19:35:42 +0000 (21:35 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 21 Aug 2012 19:35:42 +0000 (21:35 +0200)
src/battle/BattleState.h
src/battle/states/PerformAttacks.cpp

index daf2c49124a7432c9b5847f81699d35601df63e5..4964efb81f788be75e23445c28f2e1e00b09805b 100644 (file)
@@ -107,8 +107,6 @@ public:
        const geometry::Point<int> &HeroTagPositionAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTagPositions[index]; }
 
        bool HasChosenAttackType() const { return ActiveHero().GetAttackChoice().GetType() != AttackChoice::UNDECIDED; }
-       AttackChoice &MonsterAttackChoiceAt(int index) { assert(index >= 0 && index < MaxMonsters()); return monsters[index].GetAttackChoice(); }
-       const AttackChoice &MonsterAttackChoiceAt(int index) const { assert(index >= 0 && index < MaxMonsters()); return monsters[index].GetAttackChoice(); }
        bool AttackSelectionDone() const { return activeHero >= numHeroes; }
 
        int NumHeroes() const { return numHeroes; }
index 0faecf9b5ead48f334e663c0817cb185abb1311f..78e197077724629db3b4bca5c5f64d09a39ff9c4 100644 (file)
@@ -77,7 +77,7 @@ void PerformAttacks::HandleEvents(const Input &input) {
                targetAnimation = AnimationRunner(monster.MeleeAnimation());
                moveAnimation = AnimationRunner(monster.AttackAnimation());
                monster.SetAnimation(moveAnimation);
-               AddNumberAnimations(battle->MonsterAttackChoiceAt(battle->CurrentAttack().index).Selection());
+               AddNumberAnimations(battle->MonsterAt(battle->CurrentAttack().index).GetAttackChoice().Selection());
        } else {
                Hero &hero(battle->HeroAt(battle->CurrentAttack().index));
                const AttackChoice &ac(battle->HeroAt(battle->CurrentAttack().index).GetAttackChoice());