*Correctly show spellclick flag for vehicles and creatures with info in spellclick table.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-08 23:43:25 -05:00
parent 30adb32d53
commit a8dbf8904c
7 changed files with 20 additions and 17 deletions
+6 -7
View File
@@ -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);