X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FSpell.h;fp=src%2Fcommon%2FSpell.h;h=d9601260a007e84ae482c5ffeedcf35d8ad2c99a;hb=7bdb085319a41fc51658a086696ab81c6b18ae52;hp=eb8fa02928605b2e84b2aa37084fbdc994a43405;hpb=ec8e74c6f78502fb4c1d971051960ce9f1757978;p=l2e.git diff --git a/src/common/Spell.h b/src/common/Spell.h index eb8fa02..d960126 100644 --- a/src/common/Spell.h +++ b/src/common/Spell.h @@ -23,8 +23,8 @@ public: Uint16 Value() const { return value; } Uint8 Cost() const { return cost; } - bool CanUseOnStatusScreen() const { return usability & USABILITY_STATUS; } - bool CanUseInBattle() const { return usability & USABILITY_BATTLE; } + bool CanUseOnStatusScreen() const { return status; } + bool CanUseInBattle() const { return battle; } TargetingMode &GetTargetingMode() { return targetingMode; } const TargetingMode &GetTargetingMode() const { return targetingMode; } @@ -36,33 +36,23 @@ public: public: void SetName(const char *n) { name = n; } void SetCost(Uint8 c) { cost = c; } - void SetUsableInBattle() { usability |= USABILITY_BATTLE; } + void SetUsableInBattle() { battle = true; } static void CreateTypeDescription(); static void Construct(void *); -private: - enum Usability { - // USABILITY_UNUSED = 1, - // USABILITY_UNUSED = 2, - // USABILITY_UNUSED = 4, - // USABILITY_UNUSED = 8, - // USABILITY_UNUSED = 16, - // USABILITY_UNUSED = 32, - USABILITY_STATUS = 64, - USABILITY_BATTLE = 128, - }; - private: const char *name; int value; int cost; - Uint8 usability; TargetingMode targetingMode; HeroGroup usableBy; + bool status; + bool battle; + }; }