diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-08-01 12:17:50 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-08-05 23:16:07 +0200 |
commit | 7e77328d1b9f35ed542dd3cfceadb1eb41f54afe (patch) | |
tree | 2411668af9b723244d1057105e54dfbcd2c839f1 /src | |
parent | df976b4e95de4209b2a3da2644cce9ffbacc6415 (diff) | |
download | manaserv-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')
-rw-r--r-- | src/game-server/character.cpp | 14 |
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 |