mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 00:58:33 +00:00
fix: ⚡ 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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user