From 2461cb3742337a059521d165b40381d10cc76bc6 Mon Sep 17 00:00:00 2001 From: avirar Date: Sat, 4 Jan 2025 17:32:46 +1100 Subject: [PATCH] Gift/Mark of the Wild --- src/strategy/druid/DruidActions.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/strategy/druid/DruidActions.cpp b/src/strategy/druid/DruidActions.cpp index 1743a339..9466071b 100644 --- a/src/strategy/druid/DruidActions.cpp +++ b/src/strategy/druid/DruidActions.cpp @@ -78,4 +78,25 @@ Unit* CastRejuvenationOnNotFullAction::GetTarget() bool CastRejuvenationOnNotFullAction::isUseful() { return GetTarget(); -} \ No newline at end of file +} + +bool CastMarkOfTheWildOnPartyAction::Execute(Event event) +{ + Unit* target = GetTarget(); + if (!target) + return false; + + // Is the bot in a group? + Group* group = botAI->GetBot()->GetGroup(); + if (group) + { + // If the bot can cast "gift of the wild" on this target, do so + if (botAI->CanCastSpell("gift of the wild", target)) + { + return botAI->CastSpell("gift of the wild", target); + } + } + + // Otherwise, fall back to single-target "mark of the wild" + return botAI->CastSpell("mark of the wild", target); +}