Do you guys see anything wrong with this code? I'm trying to fix Ultima to use Esuna, but only cast it if everyone's health is greater than 70%.
I got the status IDs from XIVDB. Thanks in advance. I'm not getting any errors it just doesn't seem to work.
I got the status IDs from XIVDB. Thanks in advance. I'm not getting any errors it just doesn't seem to work.
Code:
private async Task<bool> Esuna()
{
if (!Helpers.HealManager.Any(hm => hm.CurrentHealthPercent <= 70))
{
var target = Helpers.PartyMembers.FirstOrDefault(pm =>
pm.Type == GameObjectType.Pc &&
pm.HasAura(1107) ||
pm.HasAura(988) ||
pm.HasAura(926) ||
pm.HasAura(801) ||
pm.HasAura(560) ||
pm.HasAura(275) ||
pm.HasAura(686) ||
pm.HasAura(623) ||
pm.HasAura(620) ||
pm.HasAura(559) ||
pm.HasAura(561) ||
pm.HasAura(559) ||
pm.HasAura(482) ||
pm.HasAura(442) ||
pm.HasAura(240) ||
pm.HasAura(216) ||
pm.HasAura(213) ||
pm.HasAura(17) ||
pm.HasAura(10) ||
pm.HasAura(9) ||
pm.HasAura(7) ||
pm.HasAura(6) ||
pm.HasAura(3));
if (target != null &&
Actionmanager.CanCast(MySpells.Esuna.Name, target))
{
return await MySpells.Esuna.Cast();
}
}
return false;
}