Prayer of Fortitude

This commit is contained in:
avirar
2025-01-04 18:16:24 +11:00
committed by GitHub
parent 9acf163564
commit 4eb302b95e

View File

@@ -105,4 +105,21 @@ Unit* CastPowerWordShieldOnNotFullAction::GetTarget()
bool CastPowerWordShieldOnNotFullAction::isUseful()
{
return GetTarget();
}
}
bool CastPowerWordFortitudeAction::Execute(Event event)
{
Unit* target = GetTarget();
if (!target)
return false;
// If in a group, try Prayer first
Group* group = botAI->GetBot()->GetGroup();
if (group && botAI->CanCastSpell("prayer of fortitude", target))
{
return botAI->CastSpell("prayer of fortitude", target);
}
// Otherwise do normal single-target
return botAI->CastSpell("power word: fortitude", target);
}