X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FAttackChoice.h;h=8577976ce708d6eeb16a13fe752e6998af54df9c;hb=5228f225de7e2c047d3ddf0b9edfc9a05c4ea167;hp=b11a81da0f2f689ce18b9bfbbfe3c4e998ae3048;hpb=4d0a650b178d81387caa36953ed06cc5d6c28213;p=l2e.git diff --git a/src/battle/AttackChoice.h b/src/battle/AttackChoice.h index b11a81d..8577976 100644 --- a/src/battle/AttackChoice.h +++ b/src/battle/AttackChoice.h @@ -1,13 +1,9 @@ -/* - * AttackChoice.h - * - * Created on: Aug 7, 2012 - * Author: holy - */ - #ifndef BATTLE_ATTACKCHOICE_H_ #define BATTLE_ATTACKCHOICE_H_ +#include "TargetSelection.h" +#include "../common/fwd.h" + namespace battle { class AttackChoice { @@ -23,14 +19,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; };