diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game-server/attribute.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/game-server/attribute.cpp b/src/game-server/attribute.cpp index e37087d7..91113f49 100644 --- a/src/game-server/attribute.cpp +++ b/src/game-server/attribute.cpp @@ -141,7 +141,7 @@ bool AttributeModifiersEffect::remove(double value, unsigned int id, if (!fullCheck) mStates.sort(durationCompare); /* Search only through those with a duration of 0. */ bool ret = false; - double temp; + for (std::list< AttributeModifierState * >::iterator it = mStates.begin(); it != mStates.end() && (fullCheck || !(*it)->mDuration);) { @@ -152,8 +152,6 @@ bool AttributeModifiersEffect::remove(double value, unsigned int id, continue; } - temp = (*it)->mValue; - delete *it; mStates.erase(it++); |