summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-22 00:23:08 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-22 04:19:02 +0300
commit7c34adebb068549ca6a56bdf1b211398a0b1de11 (patch)
tree04a1e1ba87fa2005fc32c2358b2747390d1cd9d0 /src/being.h
parent54f8367afe9d30c21bcda057872439199c7dd9c1 (diff)
downloadmv-7c34adebb068549ca6a56bdf1b211398a0b1de11.tar.gz
mv-7c34adebb068549ca6a56bdf1b211398a0b1de11.tar.bz2
mv-7c34adebb068549ca6a56bdf1b211398a0b1de11.tar.xz
mv-7c34adebb068549ca6a56bdf1b211398a0b1de11.zip
Allow show equipment from other players from context menu "show items".
Also allow undress separate items from players locally.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h28
1 files changed, 28 insertions, 0 deletions
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<int> mSpriteIDs;
std::vector<std::string> mSpriteColors;
+ std::vector<int> mSpriteColorsIds;
Gender mGender;
// Character guild information