Jump to content

Recommended Posts

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

 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...