From d4ec519a270948b5bef34dfd049145baab6dac9f Mon Sep 17 00:00:00 2001 From: "Veit F." Date: Thu, 12 Jun 2025 13:32:40 +0200 Subject: [PATCH] fix: :zap: added missing checks for PetIsDeadValue Hunter under level 10, which are not able to summon their pets defined in the database spammed SELECT id FROM character_pet WHERE owner = {}, since the result of the query was true. Bots under level 10 already have pets in their stables. Also the same thing applied to Bots on mounts, because, while mounted, pets get despawned. This should drastically improve server performance. --- src/strategy/values/StatsValues.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/strategy/values/StatsValues.cpp b/src/strategy/values/StatsValues.cpp index ef80e79e..2c87ec72 100644 --- a/src/strategy/values/StatsValues.cpp +++ b/src/strategy/values/StatsValues.cpp @@ -40,6 +40,11 @@ bool IsDeadValue::Calculate() bool PetIsDeadValue::Calculate() { + if ((bot->GetLevel() < 10 && bot->getClass() == CLASS_HUNTER) || bot->IsMounted()) + { + return false; + } + if (!bot->GetPet()) { uint32 ownerid = bot->GetGUID().GetCounter();