From d0571ca16bb4ef11a718cfa78dc29b57080fcc72 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 5 Jul 2011 03:41:13 +0300 Subject: Add ability to send client states to other clients. Using for this emotes. --- src/being.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index b34773ab2..54d922279 100644 --- a/src/being.h +++ b/src/being.h @@ -78,6 +78,7 @@ enum Gender GENDER_UNSPECIFIED = 2 }; + class BeingEquipBackend : public Equipment::Backend { public: @@ -102,6 +103,14 @@ class Being : public ActorSprite, public ConfigListener friend class BeingEquipBackend; friend class LocalPlayer; + enum FLAGS + { + FLAG_SHOP = 1, + FLAG_AWAY = 2, + FLAG_INACTIVE = 4, + FLAG_SPECIAL = 128 + 64 + }; + /** * Action the being is currently performing * WARNING: Has to be in sync with the same enum in the Being class @@ -541,11 +550,7 @@ class Being : public ActorSprite, public ConfigListener * Set the Emoticon type and time displayed above * the being. */ - void setEmote(Uint8 emotion, int emote_time) - { - mEmotion = emotion; - mEmotionTime = emote_time; - } + void setEmote(Uint8 emotion, int emote_time); /** * Get the current Emoticon type displayed above @@ -741,6 +746,15 @@ class Being : public ActorSprite, public ConfigListener static void saveComment(const std::string &name, const std::string &comment); + bool isAdvanced() + { return mAdvanced; } + + void setAdvanced(bool n) + { mAdvanced = n; } + + bool isShopEnabled() + { return mShop; } + protected: /** * Sets the new path for this being. @@ -874,6 +888,10 @@ class Being : public ActorSprite, public ConfigListener int *mSpriteHide; std::string mComment; bool mGotComment; + bool mAdvanced; + bool mShop; + bool mAway; + bool mInactive; }; extern std::list beingInfoCache; -- cgit v1.2.3-70-g09d2