diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-06-06 17:57:19 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-08-07 18:19:50 +0200 |
commit | acc3a85174d22b8f90d92cb2aace260cddba39e6 (patch) | |
tree | ef8aba40055653ce8d5b896cfac2f8099e1da057 /src/game-server/being.cpp | |
parent | 60f0f47c81eefb91863549d3dc37aa58422e3675 (diff) | |
download | manaserv-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/being.cpp')
-rw-r--r-- | src/game-server/being.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp index 0e885de3..fc56dc57 100644 --- a/src/game-server/being.cpp +++ b/src/game-server/being.cpp @@ -92,7 +92,7 @@ int Being::damage(Actor *, const Damage &damage) Attribute &HP = mAttributes[BASE_ATTR_HP]; LOG_DEBUG("Being " << getPublicID() << " suffered "<<HPloss<<" damage. HP: "<<HP.base + HP.mod<<"/"<<HP.base); HP.mod -= HPloss; - modifiedAttribute(BASE_ATTR_HP); + updateDerivedAttributes(BASE_ATTR_HP); setTimerSoft(T_B_HP_REGEN, Configuration::getValue("hpRegenBreakAfterHit", 0)); // no HP regen after being hit } else { HPloss = 0; @@ -105,7 +105,7 @@ void Being::heal() { Attribute &HP = mAttributes[BASE_ATTR_HP]; HP.mod = HP.base; - modifiedAttribute(BASE_ATTR_HP); + updateDerivedAttributes(BASE_ATTR_HP); } void Being::heal(int hp) @@ -113,7 +113,7 @@ void Being::heal(int hp) Attribute &HP = mAttributes[BASE_ATTR_HP]; HP.mod += hp; if (HP.mod > HP.base) HP.mod = HP.base; - modifiedAttribute(BASE_ATTR_HP); + updateDerivedAttributes(BASE_ATTR_HP); } void Being::died() @@ -308,7 +308,7 @@ void Being::applyModifier(int attr, int amount, int duration, int lvl) mModifiers.push_back(mod); } mAttributes[attr].mod += amount; - modifiedAttribute(attr); + updateDerivedAttributes(attr); } void Being::dispellModifiers(int level) @@ -319,7 +319,7 @@ void Being::dispellModifiers(int level) if (i->level && i->level <= level) { mAttributes[i->attr].mod -= i->value; - modifiedAttribute(i->attr); + updateDerivedAttributes(i->attr); i = mModifiers.erase(i); continue; } @@ -419,7 +419,7 @@ void Being::update() if (!i->duration) { mAttributes[i->attr].mod -= i->value; - modifiedAttribute(i->attr); + updateDerivedAttributes(i->attr); i = mModifiers.erase(i); continue; } |