From 0ba643ec2ef7286f12b4e3528fe5086b58cc23bd Mon Sep 17 00:00:00 2001 From: MDIC Date: Sat, 30 Apr 2022 11:39:14 -0400 Subject: [PATCH] fix (cmd): crash fix from console cmd --- src/cs_anticheat.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cs_anticheat.cpp b/src/cs_anticheat.cpp index 72e1d5f..26ae289 100644 --- a/src/cs_anticheat.cpp +++ b/src/cs_anticheat.cpp @@ -181,8 +181,10 @@ public: ObjectGuid guid = player->GetGUID(); if (!player) + { player = PlayerIdentifier::FromTarget(handler); - if (!player) + } + if (!player || !player->IsConnected()) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); handler->SetSentErrorMessage(true); @@ -210,6 +212,7 @@ public: handler->PSendSysMessage("Teleport Reports: %u || Climb Reports: %u", teleport_reports, climb_reports); handler->PSendSysMessage("Ignore Control Reports: %u || Ignore Z-Axis Reports: %u", ignorecontrol_reports, zaxis_reports); return true; + } static bool HandleAntiCheatGlobalCommand(ChatHandler* handler)