mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
[8747] Implement player's pet resilience, also fix DoT case.
This commit is contained in:
parent
012fac90c8
commit
1b6176396e
7 changed files with 82 additions and 99 deletions
|
|
@ -6382,10 +6382,10 @@ void Aura::PeriodicTick()
|
|||
if (isCrit)
|
||||
cleanDamage.hitOutCome = MELEE_HIT_CRIT;
|
||||
|
||||
// Reduce dot damage from resilience for players.
|
||||
// only from players
|
||||
// FIXME: need use SpellDamageBonus instead?
|
||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
pdamage-=((Player*)m_target)->GetSpellDamageReduction(pdamage);
|
||||
if (IS_PLAYER_GUID(m_caster_guid))
|
||||
pdamage -= m_target->GetSpellDamageReduction(pdamage);
|
||||
|
||||
pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist);
|
||||
|
||||
|
|
@ -6609,8 +6609,8 @@ void Aura::PeriodicTick()
|
|||
int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power);
|
||||
|
||||
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
|
||||
if (power == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
drain_amount -= ((Player*)m_target)->GetSpellCritDamageReduction(drain_amount);
|
||||
if (power == POWER_MANA)
|
||||
drain_amount -= m_target->GetSpellCritDamageReduction(drain_amount);
|
||||
|
||||
m_target->ModifyPower(power, -drain_amount);
|
||||
|
||||
|
|
@ -6701,8 +6701,8 @@ void Aura::PeriodicTick()
|
|||
return;
|
||||
|
||||
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
|
||||
if (powerType == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
pdamage -= ((Player*)m_target)->GetSpellCritDamageReduction(pdamage);
|
||||
if (powerType == POWER_MANA)
|
||||
pdamage -= m_target->GetSpellCritDamageReduction(pdamage);
|
||||
|
||||
uint32 gain = uint32(-m_target->ModifyPower(powerType, -pdamage));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue