X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FAttackChoice.h;h=0049f1e2be198bd068713be96d26be3ddf124646;hb=087783315ac5955c17bb3b051c9351f321653df6;hp=0068e6f67e50049c1e751c7da9240bf6c1a7a499;hpb=3c72a71fbf6de96333a641051a20c6bf8b3a5df3;p=l2e.git diff --git a/src/battle/AttackChoice.h b/src/battle/AttackChoice.h index 0068e6f..0049f1e 100644 --- a/src/battle/AttackChoice.h +++ b/src/battle/AttackChoice.h @@ -1,13 +1,14 @@ -/* - * AttackChoice.h - * - * Created on: Aug 7, 2012 - * Author: holy - */ - #ifndef BATTLE_ATTACKCHOICE_H_ #define BATTLE_ATTACKCHOICE_H_ +namespace battle { + class Battle; +} +namespace common { + class Item; + class Spell; +} + #include "TargetSelection.h" namespace battle { @@ -25,21 +26,31 @@ public: }; public: - explicit AttackChoice(BattleState *b = 0) : type(UNDECIDED), selection(b) { } + AttackChoice() + : thing(0), selection(), type(UNDECIDED) { } + explicit AttackChoice(Battle *b) + : 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: - Type type; + const void *thing; TargetSelection selection; + Type type; }; } -#endif /* BATTLE_ATTACKCHOICE_H_ */ +#endif