mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9162] Allow SPELL_AURA_PERIODIC_LEECH to crit if able to.
This allow DoT crits from 2944 and ranks for example. (based on commit be72957) Also included improvement from Lynx3d for resilence and crit threat affect. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
8c3289720e
commit
b29f53e6e9
2 changed files with 11 additions and 2 deletions
|
|
@ -6744,6 +6744,15 @@ void Aura::PeriodicTick()
|
|||
}
|
||||
|
||||
pdamage = pCaster->SpellDamageBonus(m_target, GetSpellProto(), pdamage, DOT, GetStackAmount());
|
||||
bool isCrit = IsCritFromAbilityAura(pCaster, pdamage);
|
||||
|
||||
// send critical in hit info for threat calculation
|
||||
if (isCrit)
|
||||
{
|
||||
cleanDamage.hitOutCome = MELEE_HIT_CRIT;
|
||||
// Resilience - reduce crit damage
|
||||
pdamage -= m_target->GetSpellCritDamageReduction(pdamage);
|
||||
}
|
||||
|
||||
pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED));
|
||||
|
||||
|
|
@ -6753,7 +6762,7 @@ void Aura::PeriodicTick()
|
|||
sLog.outDetail("PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId(),absorb);
|
||||
|
||||
pCaster->SendSpellNonMeleeDamageLog(m_target, GetId(), pdamage, GetSpellSchoolMask(GetSpellProto()), absorb, resist, false, 0);
|
||||
pCaster->SendSpellNonMeleeDamageLog(m_target, GetId(), pdamage, GetSpellSchoolMask(GetSpellProto()), absorb, resist, false, 0, isCrit);
|
||||
|
||||
float multiplier = GetSpellProto()->EffectMultipleValue[GetEffIndex()] > 0 ? GetSpellProto()->EffectMultipleValue[GetEffIndex()] : 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9161"
|
||||
#define REVISION_NR "9162"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue