mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Implement SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA (#27714)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user