morris79 3 Posted July 18, 2018 Share Posted July 18, 2018 This is not my code but from BetterSister, wolk Resto druid AIO. I want to chance getTanks, toget it just from my focus target. I have zero program skilles, plz help. Thanks for your time and support. #region get tanks List<WoWPlayer> getTanks() { List<WoWPlayer> ret = new List<WoWPlayer>(); var u = Party.GetPartyHomeAndInstance().Where(p => p.GetDistance < 80 && p.IsValid && !TraceLine.TraceLineGo(p.Position)); if (u.Count() > 0) { foreach (var unit in u) { //Logging.WriteDebug("Unit name: " + unit.Name.ToString().Trim()); if (IsTank(unit.Name.ToString())) { WoWPlayer p = new WoWPlayer(unit.GetBaseAddress); ret.Add(p); } } } if (ret.Count() == 0) { Logging.WriteError("CANNOT HEAL TANK IS TOO FAR OR NOT SET!!"); WoWPlayer v = new WoWPlayer(ObjectManager.Me.GetBaseAddress); ret.Add(v); } return ret; } Druid healing in 3.3.5a ported from 6.x by ME.cs Link to comment https://wrobot.eu/forums/topic/9800-take-my-focus-target-as-tank/ Share on other sites More sharing options...
iMod 99 Posted September 11, 2018 Share Posted September 11, 2018 (edited) #region get tanks List<WoWPlayer> getTanks() { // Focus set? if(ObjectManager.Me.FocusObj != null) { // Return list with the focus object return new List<WoWPlayer>(){ObjectManager.Me.FocusObj}; } // Return empty list return new List<WoWPlayer>(); } This is just a quick and dirty solution. Edited September 11, 2018 by iMod morris79 1 Link to comment https://wrobot.eu/forums/topic/9800-take-my-focus-target-as-tank/#findComment-47379 Share on other sites More sharing options...
morris79 3 Posted September 12, 2018 Author Share Posted September 12, 2018 your the best iMod, thanks alot Link to comment https://wrobot.eu/forums/topic/9800-take-my-focus-target-as-tank/#findComment-47380 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now