summaryrefslogtreecommitdiff
path: root/src/game-server/character.cpp
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-08-01 12:17:50 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-05 23:16:07 +0200
commit7e77328d1b9f35ed542dd3cfceadb1eb41f54afe (patch)
tree2411668af9b723244d1057105e54dfbcd2c839f1 /src/game-server/character.cpp
parentdf976b4e95de4209b2a3da2644cce9ffbacc6415 (diff)
downloadmanaserv-7e77328d1b9f35ed542dd3cfceadb1eb41f54afe.tar.gz
manaserv-7e77328d1b9f35ed542dd3cfceadb1eb41f54afe.tar.bz2
manaserv-7e77328d1b9f35ed542dd3cfceadb1eb41f54afe.tar.xz
manaserv-7e77328d1b9f35ed542dd3cfceadb1eb41f54afe.zip
Fixed recalculation of base attributes
We do not need to calculate derived attributes of the derived attributes but the base of the derived attribute. Reviewed-by: bjorn.
Diffstat (limited to 'src/game-server/character.cpp')
-rw-r--r--src/game-server/character.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 670db1e4..a4825878 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -561,22 +561,22 @@ void Character::updateDerivedAttributes(unsigned int attr)
switch(attr)
{
case ATTR_STR:
- updateDerivedAttributes(ATTR_INV_CAPACITY);
+ recalculateBaseAttribute(ATTR_INV_CAPACITY);
break;
case ATTR_AGI:
- updateDerivedAttributes(ATTR_DODGE);
- updateDerivedAttributes(ATTR_MOVE_SPEED_TPS);
+ recalculateBaseAttribute(ATTR_DODGE);
+ recalculateBaseAttribute(ATTR_MOVE_SPEED_TPS);
break;
case ATTR_VIT:
- updateDerivedAttributes(ATTR_MAX_HP);
- updateDerivedAttributes(ATTR_HP_REGEN);
- updateDerivedAttributes(ATTR_DEFENSE);
+ recalculateBaseAttribute(ATTR_MAX_HP);
+ recalculateBaseAttribute(ATTR_HP_REGEN);
+ recalculateBaseAttribute(ATTR_DEFENSE);
break;
case ATTR_INT:
// TODO
break;
case ATTR_DEX:
- updateDerivedAttributes(ATTR_ACCURACY);
+ recalculateBaseAttribute(ATTR_ACCURACY);
break;
case ATTR_WIL:
// TODO