From 5a6182f977d6785a98d300f7b5ec7855a35f2e37 Mon Sep 17 00:00:00 2001 From: "Veit F." Date: Thu, 12 Jun 2025 13:41:17 +0200 Subject: [PATCH] fix: :zap: refactored query, pet should only check death state of his current pet The old query also fetched all pets out of his stable, which is not needed, since we are looking for slot 0 (active pet) --- src/strategy/values/StatsValues.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/values/StatsValues.cpp b/src/strategy/values/StatsValues.cpp index 2c87ec72..6e2a3add 100644 --- a/src/strategy/values/StatsValues.cpp +++ b/src/strategy/values/StatsValues.cpp @@ -48,7 +48,7 @@ bool PetIsDeadValue::Calculate() if (!bot->GetPet()) { uint32 ownerid = bot->GetGUID().GetCounter(); - QueryResult result = CharacterDatabase.Query("SELECT id FROM character_pet WHERE owner = {}", ownerid); + QueryResult result = CharacterDatabase.Query("SELECT id FROM character_pet WHERE owner = {} and slot = 0", ownerid); if (!result) return false;