private static bool IsValidEarthShieldTarget(WoWUnit unit) { if (unit == null || !unit.IsValid || !unit.IsAlive || Unit.GroupMembers.All(g => g.Guid != unit.Guid) || unit.Distance > 99) { return(false); } return(unit.CachedHasAura("Earth Shield") || !unit.CachedHasAnyAura(Shields)); }