refactor(Core/Spells): Add helpers for HasAuraType (#20802)

This commit is contained in:
Kitzunu
2024-12-01 12:50:59 +01:00
committed by GitHub
parent 55f6bd0972
commit ed008a8780
41 changed files with 183 additions and 140 deletions

View File

@@ -633,7 +633,7 @@ void WorldSession::HandleSelfResOpcode(WorldPacket& /*recvData*/)
if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL)))
{
if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION) && !spell->HasAttribute(SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA))
if (_player->HasPreventResurectionAura() && !spell->HasAttribute(SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA))
{
return; // silent return, client should display error by itself and not send this opcode
}
@@ -672,7 +672,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
if (!unit)
return;
if (!unit->HasAuraType(SPELL_AURA_CLONE_CASTER))
if (!unit->HasCloneCasterAura())
return;
// Get creator of the unit (SPELL_AURA_CLONE_CASTER does not stack)