diff options
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); } } |