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:
parent
8665452c28
commit
26ff29a1a0
3 changed files with 6 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue