summaryrefslogtreecommitdiff
path: root/src/game-server/character.cpp
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-04-18 19:49:12 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-05-25 15:12:23 +0200
commita5108774672d118f89b9f24e4e846341fd5105fd (patch)
treeae95da1aa0f0b18ad6129d664f69a2c6b0f93eb5 /src/game-server/character.cpp
parent7dc342ab105a305d31badd1449c3ac295d700666 (diff)
downloadmanaserv-a5108774672d118f89b9f24e4e846341fd5105fd.tar.gz
manaserv-a5108774672d118f89b9f24e4e846341fd5105fd.tar.bz2
manaserv-a5108774672d118f89b9f24e4e846341fd5105fd.tar.xz
manaserv-a5108774672d118f89b9f24e4e846341fd5105fd.zip
Fixed handling of skills
- Removed possibility of skills getting mixed with attributes - Made the server sending the level of the current skill on exp change (currently the client could calculate it itself, but it allows more flexibillity in future this way) - Fixed reading of skills out of the database (for some reason the status effects were added as skills) ** Needs clientside patch as well (coming soon) ** Reviewed-by: Bertram.
Diffstat (limited to 'src/game-server/character.cpp')
-rw-r--r--src/game-server/character.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index d0482f22..4816f3c1 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -474,6 +474,7 @@ void Character::sendStatus()
expMsg.writeInt16(skill);
expMsg.writeInt32(getExpGot(skill));
expMsg.writeInt32(getExpNeeded(skill));
+ expMsg.writeInt16(levelForExp(getExperience(skill)));
}
if (expMsg.getLength() > 2) gameHandler->sendTo(this, expMsg);
mModifiedExperience.clear();
@@ -640,10 +641,6 @@ void Character::receiveExperience(int skill, int experience, int optimalLevel)
if (newExp != oldExp)
accountHandler->updateExperience(getDatabaseID(), skill, newExp);
- // Check for skill levelup
- if (Character::levelForExp(newExp) >= Character::levelForExp(oldExp))
- updateDerivedAttributes(skill);
-
mRecalculateLevel = true;
}