mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[9875] Fix immunity ignoring for delayed spells
This commit is contained in:
parent
789f2f8167
commit
5a572b9991
3 changed files with 14 additions and 3 deletions
|
|
@ -928,8 +928,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||
unitTarget = unit;
|
||||
|
||||
// Reset damage/healing counter
|
||||
m_damage = 0;
|
||||
m_healing = 0;
|
||||
ResetEffectDamageAndHeal();
|
||||
|
||||
// Fill base trigger info
|
||||
uint32 procAttacker = m_procAttacker;
|
||||
|
|
@ -1082,6 +1081,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
{
|
||||
if (realCaster)
|
||||
realCaster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE);
|
||||
|
||||
ResetEffectDamageAndHeal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1102,6 +1103,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
unit->GetCharmerOrOwnerGUID() != m_caster->GetGUID())
|
||||
{
|
||||
realCaster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
||||
ResetEffectDamageAndHeal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1112,6 +1114,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
!unit->isVisibleForOrDetect(m_caster, m_caster, false))
|
||||
{
|
||||
realCaster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
||||
ResetEffectDamageAndHeal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1150,6 +1153,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
if (m_spellInfo->speed > 0.0f && !IsPositiveSpell(m_spellInfo->Id))
|
||||
{
|
||||
realCaster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
||||
ResetEffectDamageAndHeal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -6505,3 +6509,9 @@ WorldObject* Spell::GetCastingObject() const
|
|||
else
|
||||
return m_caster;
|
||||
}
|
||||
|
||||
void Spell::ResetEffectDamageAndHeal()
|
||||
{
|
||||
m_damage = 0;
|
||||
m_healing = 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue