fix(Core/Spell): spell immunity system and new separate immunities table (#24956)
Co-authored-by: ariel- <ariel-@users.noreply.github.com> Co-authored-by: Keader <keader.android@gmail.com> Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -856,7 +856,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
SpellInfo const* spell = iter->second->GetBase()->GetSpellInfo();
|
||||
|
||||
// Pounce Bleed shouldn't be removed by Cloak of Shadows.
|
||||
if (spell->GetAllEffectsMechanicMask() & 1 << MECHANIC_BLEED)
|
||||
if (spell->GetAllEffectsMechanicMask() & (UI64LIT(1) << MECHANIC_BLEED))
|
||||
return;
|
||||
|
||||
bool dmgClassNone = false;
|
||||
@@ -1889,7 +1889,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
if (!unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
if (unitTarget->HasUnitState(UNIT_STATE_ISOLATED))
|
||||
if (unitTarget->IsImmunedToAuraPeriodicTick(m_caster, m_spellInfo))
|
||||
{
|
||||
m_caster->SendSpellDamageImmune(unitTarget, GetSpellInfo()->Id);
|
||||
return;
|
||||
@@ -3681,7 +3681,7 @@ void Spell::EffectHealMaxHealth(SpellEffIndex /*effIndex*/)
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
if (unitTarget->HasUnitState(UNIT_STATE_ISOLATED))
|
||||
if (unitTarget->IsImmunedToAuraPeriodicTick(m_caster, m_spellInfo))
|
||||
{
|
||||
m_caster->SendSpellDamageImmune(unitTarget, GetSpellInfo()->Id);
|
||||
return;
|
||||
@@ -5152,7 +5152,7 @@ void Spell::EffectDispelMechanic(SpellEffIndex effIndex)
|
||||
continue;
|
||||
if (roll_chance_i(aura->CalcDispelChance(unitTarget, !unitTarget->IsFriendlyTo(m_caster))))
|
||||
{
|
||||
if ((aura->GetSpellInfo()->GetAllEffectsMechanicMask() & (1 << mechanic)))
|
||||
if ((aura->GetSpellInfo()->GetAllEffectsMechanicMask() & (UI64LIT(1) << mechanic)))
|
||||
{
|
||||
dispel_list.push(std::make_pair(aura->GetId(), aura->GetCasterGUID()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user