Merge branch 'liyunfan1223:master' into Tame-Chat-Action-/-Pet-Chat-Action-(stances/commands)

This commit is contained in:
ThePenguinMan96
2025-08-05 20:49:00 -07:00
committed by GitHub

View File

@@ -207,7 +207,11 @@ bool WrongPetTrigger::IsActive()
if (enabledCount != 1)
return false;
// Step 3: At this point, we know only one pet strategy is enabled.
// Step 3: If there is no pet, do not trigger.
if (!pet)
return false;
// Step 4: At this point, we know only one pet strategy is enabled.
// We check if the currently summoned pet matches the enabled strategy.
bool correctPet = false;
if (pet)
@@ -218,16 +222,16 @@ bool WrongPetTrigger::IsActive()
correctPet = true;
}
// Step 4: If the correct pet is already summoned, the trigger should not activate.
// Step 5: If the correct pet is already summoned, the trigger should not activate.
if (correctPet)
return false;
// Step 5: Finally, check if the bot actually knows the spell to summon the desired pet.
// Step 6: Finally, check if the bot actually knows the spell to summon the desired pet.
// If so, the trigger is active (bot should summon the correct pet).
if (bot->HasSpell(enabledPet->spellId))
return true;
// Step 6: If we get here, the bot doesn't know the spell required to support the active pet strategy
// Step 7: If we get here, the bot doesn't know the spell required to support the active pet strategy
return false;
}