Arcane Brilliance

This commit is contained in:
avirar
2025-01-04 18:45:12 +11:00
committed by GitHub
parent 626cf44ad5
commit 3899ebd4a9

View File

@@ -21,3 +21,24 @@ bool CastConeOfColdAction::isUseful()
bool targetClose = sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", GetTargetName()), 10.f);
return facingTarget && targetClose;
}
bool CastArcaneIntellectOnPartyAction::Execute(Event event)
{
Unit* target = GetTarget();
if (!target)
return false;
Group* group = botAI->GetBot()->GetGroup();
if (group)
{
if (botAI->CanCastSpell("dalaran brilliance", target))
return botAI->CastSpell("dalaran brilliance", target);
if (botAI->CanCastSpell("arcane brilliance", target))
return botAI->CastSpell("arcane brilliance", target);
}
// If not in a group or we cannot cast brilliance, fall back to arcane intellect
return botAI->CastSpell("arcane intellect", target);
}