mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 19:37:02 +00:00
[8978] Fix wrongly apply weapon damage mods to broken weapon.
This commit is contained in:
parent
f47492ad24
commit
1d608c482f
7 changed files with 42 additions and 38 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue