December 23, 20169 yr 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
December 23, 20169 yr Hello, I don't see error. Are you sure about your method "getPartymembers()"? Try to add logs to debug
December 23, 20169 yr 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
December 24, 20169 yr Author 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.
Create an account or sign in to comment