kongul 0 Posted December 23, 2016 Share Posted December 23, 2016 I have a shaman healing class written in C# and I am trying to add a function to cast cleanse spirit when a specific debuff is put on any members of a party. Can anyone tell me what I am missing: #region cleansespirit bool cleansespirit() { if (!_cleansespirit.KnownSpell) return false; if (!_cleansespirit.IsSpellUsable) return false; var members = getPartymembers().Where(o => o.IsValid && o.IsAlive && o.HaveBuff("Bad Curse") && !TraceLine.TraceLineGo(o.Position)).OrderBy(o => o.HealthPercent); if (members.Count() > 0) { var u = members.First(); WoWPlayer healTarget = new WoWPlayer(u.GetBaseAddress); if (!TraceLine.TraceLineGo(healTarget.Position) && healTarget.IsAlive) { { Interact.InteractGameObject(healTarget.GetBaseAddress, false); _cleansespirit.Launch(); return true; } } } return false; } #endregion Thank You Link to comment https://wrobot.eu/forums/topic/4649-using-a-decurse-function/ Share on other sites More sharing options...
Droidz 2738 Posted December 23, 2016 Share Posted December 23, 2016 Hello, I don't see error. Are you sure about your method "getPartymembers()"? Try to add logs to debug Link to comment https://wrobot.eu/forums/topic/4649-using-a-decurse-function/#findComment-21604 Share on other sites More sharing options...
BetterSister 367 Posted December 23, 2016 Share Posted December 23, 2016 Problem is you don't tell what to look for. You can use lua to find bad buffs which i don't know code for. I think there is guide somewhere about finding bad buffs and removing them Link to comment https://wrobot.eu/forums/topic/4649-using-a-decurse-function/#findComment-21606 Share on other sites More sharing options...
kongul 0 Posted December 24, 2016 Author Share Posted December 24, 2016 12 hours ago, BetterSister said: Problem is you don't tell what to look for. You can use lua to find bad buffs which i don't know code for. I think there is guide somewhere about finding bad buffs and removing them The line && o.HaveBuff ("Bad Curse") Where bad curse is just the filler. I put the name of the curse in there. Is there a way to do it by spell ID. I will try and get some logs. Link to comment https://wrobot.eu/forums/topic/4649-using-a-decurse-function/#findComment-21614 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