public static bool IsAttackingHealer(this WoWUnit unit) { string fnname = "FTWExtensionMethods.IsAttackingHealer"; MyTimer.Start(fnname); bool retval = false; if (!(unit.IsAlive && unit.IsHostile && unit.CurrentTarget != null)) { retval = false; } else if (!unit.CurrentTarget.IsPlayer) { retval = false; } else if (!unit.IsTargetingMyPartyMember) { retval = false; } else if (!unit.IsTargetingMyRaidMember) { retval = false; } else { WoWPlayer target = (WoWPlayer)unit.CurrentTarget; if (target.Role().Contains("Healer")) { retval = true; } } MyTimer.Stop(fnname); return(retval); }
public static bool IsHealer(this WoWPlayer p) { if (!StyxWoW.Me.GroupInfo.IsInParty && !StyxWoW.Me.GroupInfo.IsInRaid) { return(false); } return(p.Role().Contains("Healer")); }
public static bool IsTank(this WoWPlayer p) { if (!StyxWoW.Me.GroupInfo.IsInParty && !StyxWoW.Me.GroupInfo.IsInRaid) { return(true); } return(p.Role().Contains("Tank")); }
public static int HealWeight(this WoWPlayer p) { string s = p.Role(); int adj = 0; if (s == "Tank") { adj = 5; } else if (s == "Healer") { adj = 10; } return((int)p.HealthPercent - adj); }