]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
moved monsters' attack choices to Monster
[l2e.git] / src / battle / BattleState.h
index a64ea0e3306baf9f90431c00ed23dd8771de467a..daf2c49124a7432c9b5847f81699d35601df63e5 100644 (file)
@@ -107,8 +107,8 @@ 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 monsterAttacks[index]; }
-       const AttackChoice &MonsterAttackChoiceAt(int index) const { assert(index >= 0 && index < MaxMonsters()); return monsterAttacks[index]; }
+       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; }
@@ -172,7 +172,6 @@ private:
        std::vector<geometry::Point<int> > monsterPositions;
        std::vector<geometry::Point<int> > heroesPositions;
        std::vector<Monster> monsters;
-       std::vector<AttackChoice> monsterAttacks;
        std::vector<Order> attackOrder;
        Hero heroes[4];
        graphics::Menu<const common::Item *> itemMenu;