summaryrefslogtreecommitdiff
path: root/src/game-server/character.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <mana@crushnet.org>2010-01-08 22:01:45 +0100
committerPhilipp Sehmisch <mana@crushnet.org>2010-01-08 22:01:45 +0100
commitde7d79c7f42636065ca5281fa3bec151e34a7c48 (patch)
treea7c0b7769b5fdbe7c84dfc644dc6a54e4ed2f79a /src/game-server/character.hpp
parent9137942b624a152f143662b58ebc7277b508cb50 (diff)
downloadmanaserv-de7d79c7f42636065ca5281fa3bec151e34a7c48.tar.gz
manaserv-de7d79c7f42636065ca5281fa3bec151e34a7c48.tar.bz2
manaserv-de7d79c7f42636065ca5281fa3bec151e34a7c48.tar.xz
manaserv-de7d79c7f42636065ca5281fa3bec151e34a7c48.zip
Added tracing of kill count for each monster per character
Diffstat (limited to 'src/game-server/character.hpp')
-rw-r--r--src/game-server/character.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp
index 8b04e8cb..fbba4eee 100644
--- a/src/game-server/character.hpp
+++ b/src/game-server/character.hpp
@@ -291,6 +291,21 @@ class Character : public Being
{ return mStatusEffects.end(); }
/**
+ * used to serialized kill count
+ */
+ int getKillCountSize() const
+ { return mKillCount.size(); }
+
+ const std::map<int, int>::const_iterator getKillCountBegin() const
+ { return mKillCount.begin(); }
+
+ const std::map<int, int>::const_iterator getKillCountEnd() const
+ { return mKillCount.end(); }
+
+ void setKillCount(int monsterId, int kills)
+ { mKillCount[monsterId] = kills; }
+
+ /**
* Gets total accumulated exp for skill
*/
int getExperience(int skill) const
@@ -303,6 +318,11 @@ class Character : public Being
{ mExperience[skill] = 0; receiveExperience(skill, value, 0); }
/**
+ * Adds one kill of the monster type to the characters kill count
+ */
+ void incrementKillCount(int monsterType);
+
+ /**
* Shortcut to get being's health
*/
int getHealth() const
@@ -425,6 +445,7 @@ class Character : public Being
unsigned char mAccountLevel; /**< Account level of the user. */
int mParty; /**< Party id of the character */
TransactionType mTransaction; /**< Trade/buy/sell action the character is involved in. */
+ std::map<int, int> mKillCount; /**< how many monsters the character has slayn of each type */
protected:
/**