mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Spell): Implement SPELL_ATTR7_BYPASS_NO_RESURECTION_AURA (#7859)
Co-authored-by: stoneharry <3818405+stoneharry@users.noreply.github.com>
This commit is contained in:
@@ -619,18 +619,14 @@ void WorldSession::HandleSelfResOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
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 (_player->GetUInt32Value(PLAYER_SELF_RES_SPELL))
|
||||
if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL)))
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL));
|
||||
if (spellInfo)
|
||||
if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION) && !spell->HasAttribute(SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA))
|
||||
{
|
||||
_player->CastSpell(_player, spellInfo, false, 0);
|
||||
_player->AddSpellAndCategoryCooldowns(spellInfo, 0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user