From de7d79c7f42636065ca5281fa3bec151e34a7c48 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Fri, 8 Jan 2010 22:01:45 +0100 Subject: Added tracing of kill count for each monster per character --- src/game-server/character.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/game-server/character.cpp') 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::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 levels; -- cgit v1.2.3-60-g2f50