]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/AttackChoice.h
renamed TargetSelections Enemies to Monsters
[l2e.git] / src / battle / AttackChoice.h
index b11a81da0f2f689ce18b9bfbbfe3c4e998ae3048..8cba2353a164bccfd155672dd9c9fc5df291aa0c 100644 (file)
@@ -8,6 +8,14 @@
 #ifndef BATTLE_ATTACKCHOICE_H_
 #define BATTLE_ATTACKCHOICE_H_
 
+#include "TargetSelection.h"
+
+namespace common {
+       class Ikari;
+       class Item;
+       class Spell;
+}
+
 namespace battle {
 
 class AttackChoice {
@@ -23,14 +31,24 @@ public:
        };
 
 public:
-       AttackChoice() : type(UNDECIDED) { }
+       explicit AttackChoice(BattleState *b = 0) : thing(0), selection(b), type(UNDECIDED) { }
        ~AttackChoice() { }
 
 public:
        Type GetType() const { return type; }
        void SetType(Type t) { type = t; }
+       const common::Item *GetItem() const { return (const common::Item *)thing; }
+       void SetItem(const common::Item *i) { thing = i; }
+       const common::Spell *GetSpell() const { return (const common::Spell *)thing; }
+       void SetSpell(const common::Spell *s) { thing = s; }
+       TargetSelection &Selection() { return selection; }
+       const TargetSelection &Selection() const { return selection; }
+
+       void Reset();
 
 private:
+       const void *thing;
+       TargetSelection selection;
        Type type;
 
 };