From 7c34adebb068549ca6a56bdf1b211398a0b1de11 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 May 2011 00:23:08 +0300 Subject: Allow show equipment from other players from context menu "show items". Also allow undress separate items from players locally. --- src/being.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index 199cb4dc2..91cafa69a 100644 --- a/src/being.h +++ b/src/being.h @@ -31,6 +31,7 @@ #include "actorsprite.h" #include "configlistener.h" +#include "equipment.h" #include "map.h" #include "particlecontainer.h" #include "position.h" @@ -53,9 +54,11 @@ class AnimatedSprite; class BeingCacheEntry; +class Being; class BeingInfo; class FlashText; class Guild; +class Inventory; class ItemInfo; class Item; class Particle; @@ -74,9 +77,29 @@ enum Gender GENDER_UNSPECIFIED = 2 }; +class BeingEquipBackend : public Equipment::Backend +{ + public: + BeingEquipBackend(Being *being); + + virtual ~BeingEquipBackend(); + + Item *getEquipment(int index) const; + + void clear(); + + void setEquipment(int index, Item *item); + + private: + Item *mEquipment[EQUIPMENT_SIZE]; + Being *mBeing; +}; + class Being : public ActorSprite, public ConfigListener { public: + friend class BeingEquipBackend; + /** * Action the being is currently performing * WARNING: Has to be in sync with the same enum in the Being class @@ -687,6 +710,10 @@ class Being : public ActorSprite, public ConfigListener void updateHit(int amount); + Equipment *getEquipment(); + + void undressItemById(int id); + protected: /** * Sets the new path for this being. @@ -747,6 +774,7 @@ class Being : public ActorSprite, public ConfigListener std::vector mSpriteIDs; std::vector mSpriteColors; + std::vector mSpriteColorsIds; Gender mGender; // Character guild information -- cgit v1.2.3-70-g09d2