diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2022-02-07 20:08:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 20:08:55 +0100 |
commit | 2ae67de4c0f327edc60d5da9cc815016d48b7228 (patch) | |
tree | 26dbe7424f1b49ce7480ab1efb7816d4eb92cf43 /src/server/game/Handlers/SpellHandler.cpp | |
parent | ef61f39018b783587383d3f2bcbfec9e105bf4fc (diff) |
Core/Spells: Implement SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA (#27714)
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 6597bb8dd98..a0033fc2b81 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -501,12 +501,16 @@ void WorldSession::HandleTotemDestroyed(WorldPackets::Totem::TotemDestroyed& tot void WorldSession::HandleSelfResOpcode(WorldPackets::Spells::SelfRes& selfRes) { - if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION)) - return; // silent return, client should display error by itself and not send this opcode - if (_player->m_activePlayerData->SelfResSpells.FindIndex(selfRes.SpellID) < 0) return; + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(selfRes.SpellID, _player->GetMap()->GetDifficultyID()); + if (!spellInfo) + return; + + if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION) && !spellInfo->HasAttribute(SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA)) + return; // silent return, client should display error by itself and not send this opcode + _player->CastSpell(_player, selfRes.SpellID, _player->GetMap()->GetDifficultyID()); _player->RemoveSelfResSpell(selfRes.SpellID); } |