X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FItem.h;h=afd802ea838c9b964dc80fc0ceb202d7638723fa;hb=3d69f521b593457304b282e5f23e36ab165288b6;hp=bd8e7a999e720875e09e3b5a277671da9942b263;hpb=5795ffa948c6e39a624c4fc7773a99afb87579e1;p=l2e.git diff --git a/src/common/Item.h b/src/common/Item.h index bd8e7a9..afd802e 100644 --- a/src/common/Item.h +++ b/src/common/Item.h @@ -1,16 +1,16 @@ -/* - * Item.h - * - * Created on: Aug 9, 2012 - * Author: holy - */ - #ifndef COMMON_ITEM_H_ #define COMMON_ITEM_H_ -#include "fwd.h" +namespace common { + class Ikari; +} +namespace graphics { + class Animation; + class Sprite; +} + +#include "Hero.h" #include "TargetingMode.h" -#include "../graphics/fwd.h" #include @@ -53,12 +53,7 @@ public: Uint16 Value() const { return value; } - bool CanEquipWeapon() const { return equipability & EQUIPPABLE_WEAPON; } - bool CanEquipArmor() const { return equipability & EQUIPPABLE_ARMOR; } - bool CanEquipShield() const { return equipability & EQUIPPABLE_SHIELD; } - bool CanEquipHelmet() const { return equipability & EQUIPPABLE_HELMET; } - bool CanEquipRing() const { return equipability & EQUIPPABLE_RING; } - bool CanEquipJewel() const { return equipability & EQUIPPABLE_JEWEL; } + bool EquipableAt(Hero::EquipSlot slot) const { return equipability & (1 << slot); } int HeroMask() const { return heroMask; } @@ -90,15 +85,6 @@ public: static void Construct(void *); private: - enum Equipable { - EQUIPPABLE_NONE = 0, - EQUIPPABLE_WEAPON = 1, - EQUIPPABLE_ARMOR = 2, - EQUIPPABLE_SHIELD = 4, - EQUIPPABLE_HELMET = 8, - EQUIPPABLE_RING = 16, - EQUIPPABLE_JEWEL = 32, - }; enum Property { PROPERTY_HAS_EFFECT_STATUS = 1, PROPERTY_HAS_EFFECT_BATTLE = 2, @@ -144,4 +130,4 @@ private: } -#endif /* COMMON_ITEM_H_ */ +#endif