Changes requested

I fixed what was requested of me. Built it, tested it - all functions are working.
This commit is contained in:
ThePenguinMan96
2025-08-04 17:55:29 -07:00
parent 683c6e39e4
commit ab345b8847
5 changed files with 11 additions and 12 deletions

View File

@@ -692,9 +692,11 @@ bool NewPetTrigger::IsActive()
{
// Get the bot player object from the AI
Player* bot = botAI->GetBot();
if (!bot)
return false;
// Try to get the current pet; initialize guardian and GUID to null/empty
Pet* pet = bot ? bot->GetPet() : nullptr;
Pet* pet = bot->GetPet();
Guardian* guardian = nullptr;
ObjectGuid currentPetGuid = ObjectGuid::Empty;
@@ -706,7 +708,7 @@ bool NewPetTrigger::IsActive()
else
{
// If no pet, try to get a guardian pet and its GUID
guardian = bot ? bot->GetGuardianPet() : nullptr;
guardian = bot->GetGuardianPet();
if (guardian)
currentPetGuid = guardian->GetGUID();
}