From bb3c1e2eaef10362a0797f4b04a0d60aee42ee42 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 10 Jun 2009 14:15:37 -0500 Subject: *Correctly apply/unapply item stats for disarm aura. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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); -- cgit v1.2.3