diff options
| author | megamage <none@none> | 2009-06-08 23:43:25 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-06-08 23:43:25 -0500 |
| commit | a8dbf8904c3004ad2135ff3f8fcc43490abc4e46 (patch) | |
| tree | 11d2f1f3ae05d664444965a4d88bac84a3708eb9 /src/game/SpellAuras.cpp | |
| parent | 30adb32d53ec268f71819edbc17fa09a7de5884c (diff) | |
*Correctly show spellclick flag for vehicles and creatures with info in spellclick table.
--HG--
branch : trunk
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); |
