From 0690783a9d1e99005d6bee0824597ea920e26df9 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Sun, 2 Feb 2025 15:46:42 -0600 Subject: [PATCH] Throw added client los pet checks behind LoS cheat rule for bots --- zone/client_packet.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index ac571add9..fa76d76df 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -11093,7 +11093,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) if (!target) break; - if (!DoLosChecks(target)) { + if (CheckLosCheat(target) && !DoLosChecks(target)) { mypet->SayString(this, NOT_LEGAL_TARGET); break; } @@ -11107,8 +11107,10 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; //prevent pet from attacking stuff while feared if (!mypet->IsAttackAllowed(target)) { - mypet->SayString(this, NOT_LEGAL_TARGET); - break; + if (CheckLosCheat(target) && !DoLosChecks(target)) { + mypet->SayString(this, NOT_LEGAL_TARGET); + break; + } } // default range is 200, takes Z into account @@ -11161,7 +11163,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; } - if (!DoLosChecks(GetTarget())) { + if (CheckLosCheat(GetTarget()) && !DoLosChecks(GetTarget())) { mypet->SayString(this, NOT_LEGAL_TARGET); break; } @@ -11172,8 +11174,10 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) } if (!mypet->IsAttackAllowed(GetTarget())) { - mypet->SayString(this, NOT_LEGAL_TARGET); - break; + if (CheckLosCheat(GetTarget()) && !DoLosChecks(GetTarget())) { + mypet->SayString(this, NOT_LEGAL_TARGET); + break; + } } if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) {