diff options
author | stoneharry <stoneharryjames@gmail.com> | 2021-09-12 16:13:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 17:13:44 +0200 |
commit | a18b19aeceea5cc1c3c6ce30b4790cc81bf10bcb (patch) | |
tree | 9325a68ff4314b327a04b43d1799ded88f265dbf /src/server/game/Handlers/SpellHandler.cpp | |
parent | 5286ecfca894df1f62b936d20c73d90eb89466ea (diff) |
Core/Spells: Implement SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA (#26901)
When this aura is given on a spell, it allows for it to bypass 314 SPELL_AURA_PREVENT_RESURRECTION.
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 775a57c448e..722b83de80e 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -591,12 +591,12 @@ void WorldSession::HandleSelfResOpcode(WorldPacket & /*recvData*/) { TC_LOG_DEBUG("network", "WORLD: CMSG_SELF_RES"); // empty opcode - if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION)) - return; // silent return, client should display error by itself and not send this opcode - - if (uint32 spellId = _player->GetUInt32Value(PLAYER_SELF_RES_SPELL)) + if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL))) { - _player->CastSpell(_player, spellId); + if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION) && !spell->HasAttribute(SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA)) + return; // silent return, client should display error by itself and not send this opcode + + _player->CastSpell(_player, spell->Id); _player->SetUInt32Value(PLAYER_SELF_RES_SPELL, 0); } } |