mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fix: ⚡ 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)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user