summaryrefslogtreecommitdiff
path: root/src/game-server/character.cpp
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.cpp
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.cpp')
-rw-r--r--src/game-server/character.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 95082d6b..b2a21c5a 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -506,6 +506,19 @@ void Character::receiveExperience(int skill, int experience, int optimalLevel)
}
}
+void Character::incrementKillCount(int monsterType)
+{
+ std::map<int, int>::iterator i = mKillCount.find(monsterType);
+ if (i == mKillCount.end())
+ {
+ // character has never murdered this species before
+ mKillCount[monsterType] = 1;
+ } else {
+ // character is a repeated offender
+ mKillCount[monsterType] ++;
+ };
+}
+
void Character::recalculateLevel()
{
std::list<float> levels;