What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Checking for Debuff

mahe4

Member
Joined
May 3, 2010
Messages
138
Reaction score
3
Hi guys,
i want to check a unit for a debuff with Trinity.
currently i tried
Code:
unit.HasDebuff(Skills.Monk.ExplodingPalm.SNOPower)
and
Code:
unit.HasDebuff(SNOPower.Monk_ExplodingPalm)
but both don't seem to find, if the Exploding Palm is on the unit.

here the code i wrote:
Code:
private static bool GetExploTarget()
        {
            LowestHealthTarget = null;
            int leastHitPoints = 0;
            foreach (TrinityCacheObject unit in Trinity.ObjectCache)
            {
                if(unit.IsUnit && !unit.IsMe)
                {
                    if(!unit.HasDebuff(SNOPower.Monk_ExplodingPalm))
                    {
                        if (unit.HitPoints < leastHitPoints || leastHitPoints == 0)
                            LowestHealthTarget = unit;
                    }
                }
            }
                
            return LowestHealthTarget != null;
        }

is the SNOPower the wrong one?
does the methode .HasDebuff work?
 
Back
Top