From cd302c7f04e5d0cdfd8e15322a02e84577ad2672 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Tue, 21 Aug 2012 21:35:42 +0200 Subject: [PATCH] removed redundant BattleState::MonsterAttackChoiceAt(int) --- src/battle/BattleState.h | 2 -- src/battle/states/PerformAttacks.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index daf2c49..4964efb 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -107,8 +107,6 @@ public: const geometry::Point &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; } diff --git a/src/battle/states/PerformAttacks.cpp b/src/battle/states/PerformAttacks.cpp index 0faecf9..78e1970 100644 --- a/src/battle/states/PerformAttacks.cpp +++ b/src/battle/states/PerformAttacks.cpp @@ -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()); -- 2.39.2