Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static WoWUnit BestTricksTarget
- {
- get
- {
- if (!StyxWoW.Me.IsInParty && !StyxWoW.Me.IsInRaid)
- return null;
- // If the player has a focus target set, use it instead. TODO: Add Me.FocusedUnit to the HB API.
- if (StyxWoW.Me.FocusedUnitGuid != 0)
- return StyxWoW.Me.FocusedUnit;
- if (StyxWoW.Me.IsInInstance)
- {
- if (RaFHelper.Leader != null && !RaFHelper.Leader.IsMe)
- {
- // Leader first, always. Otherwise, pick a rogue/DK/War pref. Fall back to others just in case.
- return RaFHelper.Leader;
- }
- if (StyxWoW.Me.IsInParty)
- {
- var bestTank = Group.Tanks.OrderBy(t => t.DistanceSqr).FirstOrDefault(t => t.IsAlive);
- if (bestTank != null)
- return bestTank;
- }
- var bestPlayer = Group.GetPlayerByClassPrio(100f, false,
- WoWClass.Rogue, WoWClass.DeathKnight, WoWClass.Warrior,WoWClass.Hunter, WoWClass.Mage, WoWClass.Warlock, WoWClass.Shaman, WoWClass.Druid,
- WoWClass.Paladin, WoWClass.Priest);
- return bestPlayer;
- }
- return null;
- }
- }
Add Comment
Please, Sign In to add comment