mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 01:53:47 +00:00
refactor(Core/Spells): Add helpers for HasAuraType (#20802)
This commit is contained in:
@@ -209,7 +209,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
case COMMAND_ATTACK: //spellId=1792 //ATTACK
|
||||
{
|
||||
// Can't attack if owner is pacified
|
||||
if (_player->HasAuraType(SPELL_AURA_MOD_PACIFY))
|
||||
if (_player->HasPacifyAura())
|
||||
{
|
||||
//pet->SendPetCastFail(spellId, SPELL_FAILED_PACIFIED);
|
||||
//TODO: Send proper error message to client
|
||||
@@ -467,7 +467,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
spell->finish(false);
|
||||
delete spell;
|
||||
|
||||
if (_player->HasAuraType(SPELL_AURA_MOD_PACIFY))
|
||||
if (_player->HasPacifyAura())
|
||||
return;
|
||||
|
||||
bool tempspellIsPositive = false;
|
||||
@@ -653,7 +653,7 @@ bool WorldSession::CheckStableMaster(ObjectGuid guid)
|
||||
// spell case or GM
|
||||
if (guid == GetPlayer()->GetGUID())
|
||||
{
|
||||
if (!GetPlayer()->IsGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE))
|
||||
if (!GetPlayer()->IsGameMaster() && !GetPlayer()->HasOpenStableAura())
|
||||
{
|
||||
LOG_DEBUG("network.opcode", "Player ({}) attempt open stable in cheating way.", guid.ToString());
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user