Core/Spells: Implement SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA (#27714)

This commit is contained in:
Aqua Deus
2022-02-07 20:08:55 +01:00
committed by GitHub
parent ef61f39018
commit 2ae67de4c0
4 changed files with 12 additions and 8 deletions

View File

@@ -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);
}