diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-02-20 15:34:28 +0100 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-02-20 15:34:28 +0100 |
commit | c70c6d19c1cabf46b595591802bceab63d371788 (patch) | |
tree | 1c153d2bfe560171bad5889d528dc5cf110e8533 /src/game-server/attribute.cpp | |
parent | d707495540581f8c1b9ab3d5007c9c4d1ab83b53 (diff) | |
parent | 587b7682e6bf7dd9e616c1d4789a5ed9aa986e6d (diff) | |
download | manaserv-c70c6d19c1cabf46b595591802bceab63d371788.tar.gz manaserv-c70c6d19c1cabf46b595591802bceab63d371788.tar.bz2 manaserv-c70c6d19c1cabf46b595591802bceab63d371788.tar.xz manaserv-c70c6d19c1cabf46b595591802bceab63d371788.zip |
Merge branch 'master' into lpc2012
Conflicts:
gameserver.cbp
src/account-server/accounthandler.cpp
src/game-server/attack.cpp
src/game-server/attack.h
src/game-server/being.cpp
src/game-server/being.h
src/game-server/character.cpp
src/game-server/character.h
src/game-server/inventory.cpp
src/game-server/item.h
src/game-server/monster.cpp
src/game-server/monster.h
Diffstat (limited to 'src/game-server/attribute.cpp')
-rw-r--r-- | src/game-server/attribute.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/game-server/attribute.cpp b/src/game-server/attribute.cpp index 31d743f4..71e5d944 100644 --- a/src/game-server/attribute.cpp +++ b/src/game-server/attribute.cpp @@ -133,7 +133,7 @@ bool durationCompare(const AttributeModifierState *lhs, return lhs->mDuration < rhs->mDuration; } -bool AttributeModifiersEffect::remove(double value, unsigned int id, +bool AttributeModifiersEffect::remove(double value, unsigned id, bool fullCheck) { /* We need to find and check this entry exists, and erase the entry @@ -249,16 +249,17 @@ bool AttributeModifiersEffect::recalculateModifiedValue(double newPrevLayerValue bool Attribute::add(unsigned short duration, double value, - unsigned int layer, int level) + unsigned layer, int id) { assert(mMods.size() > layer); - LOG_DEBUG("Adding modifier to attribute with duration " << duration << - ", value " << value << ", at layer " << layer << " with id " - << level); + LOG_DEBUG("Adding modifier to attribute with duration " << duration + << ", value " << value + << ", at layer " << layer + << " with id " << id); if (mMods.at(layer)->add(duration, value, (layer ? mMods.at(layer - 1)->getCachedModifiedValue() : mBase) - , level)) + , id)) { while (++layer < mMods.size()) { @@ -277,7 +278,7 @@ bool Attribute::add(unsigned short duration, double value, return false; } -bool Attribute::remove(double value, unsigned int layer, +bool Attribute::remove(double value, unsigned layer, int lvl, bool fullcheck) { assert(mMods.size() > layer); @@ -321,7 +322,7 @@ Attribute::Attribute(const AttributeManager::AttributeInfo &info): const std::vector<AttributeModifier> &modifiers = info.modifiers; LOG_DEBUG("Construction of new attribute with '" << modifiers.size() << "' layers."); - for (unsigned int i = 0; i < modifiers.size(); ++i) + for (unsigned i = 0; i < modifiers.size(); ++i) { LOG_DEBUG("Adding layer with stackable type " << modifiers[i].stackableType |