diff options
| author | Machiavelli <none@none> | 2009-06-10 19:43:50 +0200 |
|---|---|---|
| committer | Machiavelli <none@none> | 2009-06-10 19:43:50 +0200 |
| commit | eb9719ed4f95c81b3e1ccd4cae63b7c09baddcaf (patch) | |
| tree | cd091599f6c127d5931fb097ed64743249ba3e30 /src/game/SpellAuras.cpp | |
| parent | 7445ddad0520fd9a55234a0c22dca56e4e7c00d0 (diff) | |
| parent | 926747b57ec6e8439d5397c57b37d2b2c3ba7b70 (diff) | |
Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 43f004d7701..51c27aabac3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3907,17 +3907,19 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount* default: return; } - if(apply) - m_target->SetFlag(field, flag); - else - m_target->RemoveFlag(field, flag); if (m_target->GetTypeId() == TYPEID_PLAYER) { 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()) + + if(apply) + m_target->SetFlag(field, flag); + else + m_target->RemoveFlag(field, flag); + + if (m_target->GetTypeId() == TYPEID_UNIT && ((Creature*)m_target)->GetCurrentEquipmentId()) m_target->UpdateDamagePhysical(attType); } @@ -5418,8 +5420,7 @@ void AuraEffect::HandleModDamageDone(bool apply, bool Real, bool changeAmount) m_target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i,m_amount,apply); } } - Pet* pet = ((Player*)m_target)->GetPet(); - if(pet) + if(Guardian* pet = ((Player*)m_target)->GetGuardianPet()) pet->UpdateAttackPowerAndDamage(); } } |
