From: Daniel Karbach Date: Tue, 21 Aug 2012 19:35:42 +0000 (+0200) Subject: removed redundant BattleState::MonsterAttackChoiceAt(int) X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=cd302c7f04e5d0cdfd8e15322a02e84577ad2672;p=l2e.git removed redundant BattleState::MonsterAttackChoiceAt(int) --- 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());