diff options
| author | Ovah <dreadkiller@gmx.de> | 2021-04-11 12:51:58 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-08 00:31:02 +0100 |
| commit | 60119ba8503e1b8e17d7163baf990022b2d25d41 (patch) | |
| tree | 5151ca7bc61b9fc9541be9802298c0015fde457a /src/server/game/Spells/Spell.cpp | |
| parent | b4f27875f36994d85d174f7eaf3edb108e2ab103 (diff) | |
Core/Spells: implement SpellInfo helper to filter for relevant mechanic immunities in spell_start packet (#26183)
* Core/Spells: implement SpellInfo helper to filter for relevant mechanic immunities when sending SMSG_SPELL_START packets.
According to sniff analysis Blizzard does not send all mechanic immunities of creatures but instead only the ones that are responsible for actual interrupts which are MECHANIC_INTERRUPT and MECHANIC_SILENCE. Additionally we no longer send immunities for instant cast spells as sniffs confirm that they are not sent for spells without a cast time.
(cherry picked from commit 6215cb4e0014fbe9df35a8c6b013e7801bd8ffec)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 39eb1867b65..6adbfa28086 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4469,8 +4469,8 @@ void Spell::SendSpellStart() uint32 mechanicImmunityMask = 0; if (Unit* unitCaster = m_caster->ToUnit()) { - schoolImmunityMask = unitCaster->GetSchoolImmunityMask(); - mechanicImmunityMask = unitCaster->GetMechanicImmunityMask(); + schoolImmunityMask = m_timer!= 0 ? unitCaster->GetSchoolImmunityMask() : 0; + mechanicImmunityMask = m_timer != 0 ? m_spellInfo->GetMechanicImmunityMask(unitCaster) : 0; } if (schoolImmunityMask || mechanicImmunityMask) |
