From 114478271eda79a78092cb61830d8b22bae05994 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 20 Mar 2026 06:25:02 -0700 Subject: [PATCH] feat: add [pet], [nopet], [group], [nogroup] macro conditionals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add frequently-used macro conditionals for pet and group state: - [pet]/[nopet] — checks if the player has an active pet (hunters, warlocks, DKs). Essential for pet management macros. - [group]/[nogroup]/[party] — checks if the player is in a party or raid. Used for conditional targeting and ability usage. Updated /macrohelp output to list the new conditionals. --- src/ui/game_screen.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 42693c9a..fed9a119 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -5768,6 +5768,14 @@ static std::string evaluateMacroConditionals(const std::string& rawArg, if (c == "stealthed") return isStealthedFn(); if (c == "nostealthed") return !isStealthedFn(); + // pet / nopet — player has an active pet (hunters, warlocks, DKs) + if (c == "pet") return gameHandler.hasPet(); + if (c == "nopet") return !gameHandler.hasPet(); + + // group / nogroup — player is in a party or raid + if (c == "group" || c == "party") return gameHandler.isInGroup(); + if (c == "nogroup") return !gameHandler.isInGroup(); + // noform / nostance — player is NOT in a shapeshift/stance if (c == "noform" || c == "nostance") { for (const auto& a : gameHandler.getPlayerAuras()) @@ -6122,8 +6130,8 @@ void GameScreen::sendChatMessage(game::GameHandler& gameHandler) { static const char* kMacroHelp[] = { "--- Macro Conditionals ---", "Usage: /cast [cond1,cond2] Spell1; [cond3] Spell2; Default", - "State: [combat] [nocombat] [mounted] [nomounted]", - " [swimming] [flying] [stealthed] [channeling]", + "State: [combat] [mounted] [swimming] [flying] [stealthed]", + " [channeling] [pet] [group] (prefix no- to negate)", "Target: [harm] [help] [exists] [noexists] [dead] [nodead]", " [target=focus] [target=pet] [target=player]", "Form: [noform] [nostance] [form:0]",