summaryrefslogtreecommitdiff
path: root/src/game-server/character.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-03-22 23:04:06 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-03-22 23:04:06 +0000
commit164f19d705d0fc5745b7dda0547c23d1d06d05a1 (patch)
tree21e40e143b641a66b231196d21bd20a474834e26 /src/game-server/character.hpp
parenta2f25c34db9db5c8fe57e0abdc9162531667fd06 (diff)
downloadmanaserv-164f19d705d0fc5745b7dda0547c23d1d06d05a1.tar.gz
manaserv-164f19d705d0fc5745b7dda0547c23d1d06d05a1.tar.bz2
manaserv-164f19d705d0fc5745b7dda0547c23d1d06d05a1.tar.xz
manaserv-164f19d705d0fc5745b7dda0547c23d1d06d05a1.zip
Implemented communication of attribute changes from server to client.
Diffstat (limited to 'src/game-server/character.hpp')
-rw-r--r--src/game-server/character.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp
index b1c31f1b..db93e5e7 100644
--- a/src/game-server/character.hpp
+++ b/src/game-server/character.hpp
@@ -172,6 +172,13 @@ class Character : public Being, public AbstractCharacterData
{ Being::setAttribute(attributeNumber, value); }
/**
+ * Creates a message that informs the client about the attribute
+ * changes since last call.
+ */
+ void
+ writeAttributeUpdateMessage(MessageOut &msg);
+
+ /**
* Gets the Id of the map that the character is on.
* Inherited from Thing through Being, explicitly defined because
* of double inheritance.
@@ -255,6 +262,9 @@ class Character : public Being, public AbstractCharacterData
GameClient *mClient; /**< Client computer. */
+ std::vector<unsigned short> mOldAttributes; /**< Atributes as the client should currently know them */
+ bool attributesChanged; /**< true when one or more attributes might have changed since the client has been updated about them. */
+
int mDatabaseID; /**< Character's database ID. */
std::string mName; /**< Name of the character. */
unsigned char mGender; /**< Gender of the character. */