mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Gift/Mark of the Wild
This commit is contained in:
@@ -78,4 +78,25 @@ Unit* CastRejuvenationOnNotFullAction::GetTarget()
|
|||||||
bool CastRejuvenationOnNotFullAction::isUseful()
|
bool CastRejuvenationOnNotFullAction::isUseful()
|
||||||
{
|
{
|
||||||
return GetTarget();
|
return GetTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user