summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2009-10-11 14:15:19 -0400
committerChuck Miller <shadowmil@gmail.com>2009-10-11 14:16:00 -0400
commitb9869eef99429c122d64b2b815f96573f119b3c8 (patch)
treead5d18a0d6df547d0d53558c24b5f5bfa9bc1ad5 /src
parent3d035402ebffd2da05421125501d2ef4990d5bd7 (diff)
downloadmanaserv-b9869eef99429c122d64b2b815f96573f119b3c8.tar.gz
manaserv-b9869eef99429c122d64b2b815f96573f119b3c8.tar.bz2
manaserv-b9869eef99429c122d64b2b815f96573f119b3c8.tar.xz
manaserv-b9869eef99429c122d64b2b815f96573f119b3c8.zip
Only use the first 1000 skills in level calulation
After 1000 is reserved for crafting skills
Diffstat (limited to 'src')
-rw-r--r--src/game-server/character.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 57055041..89249022 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -504,9 +504,13 @@ void Character::recalculateLevel()
std::map<int, int>::const_iterator a;
for (a = getSkillBegin(); a != getSkillEnd(); a++)
{
- float expGot = getExpGot(a->first);
- float expNeed = getExpNeeded(a->first);
- levels.push_back(getAttribute(a->first) + expGot / expNeed);
+ // Only use the first 1000 skill levels in calulation
+ if (a->first < 1000)
+ {
+ float expGot = getExpGot(a->first);
+ float expNeed = getExpNeeded(a->first);
+ levels.push_back(getAttribute(a->first) + expGot / expNeed);
+ }
}
levels.sort();