diff options
author | megamage <none@none> | 2009-06-10 14:15:37 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-10 14:15:37 -0500 |
commit | bb3c1e2eaef10362a0797f4b04a0d60aee42ee42 (patch) | |
tree | a884c9ef4e8c94351ac903fc792afb2b99b724d5 | |
parent | eb9719ed4f95c81b3e1ccd4cae63b7c09baddcaf (diff) |
*Correctly apply/unapply item stats for disarm aura.
--HG--
branch : trunk
-rw-r--r-- | src/game/SpellAuras.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 51c27aabac3..30e81e39587 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3908,16 +3908,20 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount* return; } + if(!apply) + m_target->RemoveFlag(field, flag); + if (m_target->GetTypeId() == TYPEID_PLAYER) { + // This is between the two because there is a check in _ApplyItemMods + // we must make sure that flag is always removed when call that function + // refer to DurabilityPointsLoss if(Item *pItem = ((Player*)m_target)->GetItemByPos( INVENTORY_SLOT_BAG_0, slot )) ((Player*)m_target)->_ApplyItemMods(pItem, slot, !apply); } if(apply) - m_target->SetFlag(field, flag); - else - m_target->RemoveFlag(field, flag); + m_target->SetFlag(field, flag); if (m_target->GetTypeId() == TYPEID_UNIT && ((Creature*)m_target)->GetCurrentEquipmentId()) m_target->UpdateDamagePhysical(attType); |