From a18b19aeceea5cc1c3c6ce30b4790cc81bf10bcb Mon Sep 17 00:00:00 2001 From: stoneharry Date: Sun, 12 Sep 2021 16:13:44 +0100 Subject: 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. --- src/server/game/Handlers/SpellHandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/game/Handlers/SpellHandler.cpp') 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); } } -- cgit v1.2.3