[8978] Fix wrongly apply weapon damage mods to broken weapon.

This commit is contained in:
VladimirMangos 2009-12-12 20:39:04 +03:00
parent f47492ad24
commit 1d608c482f
7 changed files with 42 additions and 38 deletions

View file

@ -5295,7 +5295,7 @@ void Aura::HandleAuraModCritPercent(bool apply, bool Real)
if(Real)
{
for(int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i),true,false))
((Player*)m_target)->_ApplyWeaponDependentAuraCritMod(pItem, WeaponAttackType(i), this, apply);
}
@ -5495,7 +5495,7 @@ void Aura::HandleModDamageDone(bool apply, bool Real)
if(Real && m_target->GetTypeId() == TYPEID_PLAYER)
{
for(int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i),true,false))
((Player*)m_target)->_ApplyWeaponDependentAuraDamageMod(pItem, WeaponAttackType(i), this, apply);
}
@ -5578,7 +5578,7 @@ void Aura::HandleModDamagePercentDone(bool apply, bool Real)
if(Real && m_target->GetTypeId() == TYPEID_PLAYER)
{
for(int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i),true,false))
((Player*)m_target)->_ApplyWeaponDependentAuraDamageMod(pItem, WeaponAttackType(i), this, apply);
}