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