summaryrefslogtreecommitdiff
path: root/src/game-server/character.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-06-06 17:57:19 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-08-07 18:19:50 +0200
commitacc3a85174d22b8f90d92cb2aace260cddba39e6 (patch)
treeef8aba40055653ce8d5b896cfac2f8099e1da057 /src/game-server/character.cpp
parent60f0f47c81eefb91863549d3dc37aa58422e3675 (diff)
downloadmanaserv-acc3a85174d22b8f90d92cb2aace260cddba39e6.tar.gz
manaserv-acc3a85174d22b8f90d92cb2aace260cddba39e6.tar.bz2
manaserv-acc3a85174d22b8f90d92cb2aace260cddba39e6.tar.xz
manaserv-acc3a85174d22b8f90d92cb2aace260cddba39e6.zip
Renamed modifiedAttribute to updateDerivedAttributes
This describes the purpose of the method better.
Diffstat (limited to 'src/game-server/character.cpp')
-rw-r--r--src/game-server/character.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 46ffa05e..9230458e 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -75,7 +75,7 @@ Character::Character(MessageIn &msg):
deserializeCharacterData(*this, msg);
for (int i = CHAR_ATTR_BEGIN; i < CHAR_ATTR_END; ++i)
{
- modifiedAttribute(i);
+ updateDerivedAttributes(i);
}
setSize(16);
Inventory(this).initialize();
@@ -202,7 +202,7 @@ void Character::respawn()
// script-controlled respawning didn't work - fall back to
// hardcoded logic
mAttributes[BASE_ATTR_HP].mod = -mAttributes[BASE_ATTR_HP].base + 1;
- modifiedAttribute(BASE_ATTR_HP); //warp back to spawn point
+ updateDerivedAttributes(BASE_ATTR_HP); //warp back to spawn point
int spawnMap = Configuration::getValue("respawnMap", 1);
int spawnX = Configuration::getValue("respawnX", 1024);
int spawnY = Configuration::getValue("respawnY", 1024);
@@ -386,7 +386,7 @@ int Character::getModifiedAttribute(int attr) const
}
}
-void Character::modifiedAttribute(int attr)
+void Character::updateDerivedAttributes(int attr)
{
if (attr >= CHAR_ATTR_BEGIN && attr < CHAR_ATTR_END)
{
@@ -503,7 +503,7 @@ void Character::receiveExperience(int skill, int experience, int optimalLevel)
// check for skill levelup
if (Character::levelForExp(newExp) >= Character::levelForExp(oldExp))
{
- modifiedAttribute(skill);
+ updateDerivedAttributes(skill);
}
mRecalculateLevel = true;
@@ -612,7 +612,7 @@ AttribmodResponseCode Character::useCharacterPoint(size_t attribute)
mCharacterPoints--;
setAttribute(attribute, getAttribute(attribute) + 1);
- modifiedAttribute(attribute);
+ updateDerivedAttributes(attribute);
return ATTRIBMOD_OK;
}
@@ -626,7 +626,7 @@ AttribmodResponseCode Character::useCorrectionPoint(size_t attribute)
mCorrectionPoints--;
mCharacterPoints++;
setAttribute(attribute, getAttribute(attribute) - 1);
- modifiedAttribute(attribute);
+ updateDerivedAttributes(attribute);
return ATTRIBMOD_OK;
}