Update (codestyle): Dereferencing NULL

possible null pointer dereference player

Not liking the idea of inflating, but it ensures now warnings or dereferencing occurs in testings.
This commit is contained in:
M'Dic
2022-10-06 08:53:27 -04:00
parent 2235f5f902
commit 875b3f4bf7

View File

@@ -351,7 +351,13 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem
if (player && GetWMOAreaTableEntryByTripple(5202, 0, 24083))
return;
if (player->HasAuraType(SPELL_AURA_WATER_WALK) || player->HasAuraType(SPELL_AURA_WATER_BREATHING) || player->HasAuraType(SPELL_AURA_GHOST))
if (player->HasAuraType(SPELL_AURA_WATER_WALK))
return;
if (player->HasAuraType(SPELL_AURA_WATER_BREATHING))
return;
if(player->HasAuraType(SPELL_AURA_GHOST))
return;
ObjectGuid key = player->GetGUID();
@@ -695,7 +701,10 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo)
return;
// If he is flying we dont need to check
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING))
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY))
return;
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING))
return;
// If the player is allowed to waterwalk (or he is dead because he automatically waterwalks then) we dont need to check any further