diff --git a/src/strategy/warlock/WarlockTriggers.cpp b/src/strategy/warlock/WarlockTriggers.cpp index 62d9c311..6a6aa865 100644 --- a/src/strategy/warlock/WarlockTriggers.cpp +++ b/src/strategy/warlock/WarlockTriggers.cpp @@ -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; }