diff options
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 13 | 
1 files changed, 6 insertions, 7 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 3e6c1e3ff41..43f004d7701 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3879,10 +3879,9 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount*      AuraType type = AuraType(GetAuraName());      //Prevent handling aura twice -    if(apply && m_target->GetAurasByType(type).size()>1) -        return; -    if(!apply && m_target->HasAuraType(type)) +    if(apply ? m_target->GetAurasByType(type).size() > 1 : m_target->HasAuraType(type))          return; +      uint32 field, flag, slot;      WeaponAttackType attType;      switch (type) @@ -3905,6 +3904,8 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount*          slot=EQUIPMENT_SLOT_RANGED;          attType=RANGED_ATTACK;          break; +    default: +        return;      }      if(apply)          m_target->SetFlag(field, flag); @@ -3913,10 +3914,8 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount*      if (m_target->GetTypeId() == TYPEID_PLAYER)      { -        Item *pItem = ((Player*)m_target)->GetItemByPos( INVENTORY_SLOT_BAG_0, slot ); -        if(!pItem ) -            return; -        ((Player*)m_target)->_ApplyItemMods(pItem, slot, !apply); +        if(Item *pItem = ((Player*)m_target)->GetItemByPos( INVENTORY_SLOT_BAG_0, slot )) +            ((Player*)m_target)->_ApplyItemMods(pItem, slot, !apply);      }      else if (((Creature*)m_target)->GetCurrentEquipmentId())          m_target->UpdateDamagePhysical(attType);  | 
