X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FHero.h;h=623e2c4965fabbaaadc45efb3dbd3e47a7dd6149;hb=a3ba4dc677ad7c92eeb78b20b642241563605c9d;hp=f61d0ee95507b5ae009e25ea31ccd28d3469de63;hpb=1338442a6db3a706d09622188aad1cdfe183a70b;p=l2e.git diff --git a/src/common/Hero.h b/src/common/Hero.h index f61d0ee..623e2c4 100644 --- a/src/common/Hero.h +++ b/src/common/Hero.h @@ -1,10 +1,3 @@ -/* - * Hero.h - * - * Created on: Oct 7, 2012 - * Author: holy - */ - #ifndef COMMON_HERO_H_ #define COMMON_HERO_H_ @@ -63,11 +56,10 @@ public: bool CanEquip(const Item &) const; bool CanInvoke(const Spell &) const; - Item *Equipment(EquipSlot i) { return equipment[i]; } const Item *Equipment(EquipSlot i) const { return equipment[i]; } bool Equipped(EquipSlot i) const { return equipment[i]; } void RemoveEquipment(EquipSlot i) { equipment[i] = 0; } - void SetEquipment(EquipSlot i, Item *item) { equipment[i] = item; } + void SetEquipment(EquipSlot i, const Item *item) { equipment[i] = item; } std::vector &Spells() { return spells; } const std::vector &Spells() const { return spells; } @@ -105,7 +97,7 @@ private: int useMask; - Item *equipment[EQUIP_COUNT]; + const Item *equipment[EQUIP_COUNT]; // TODO: vector does not seem to be a good choice std::vector spells;