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

New to Custom Classes & Programming Really..

Truman422

Member
Joined
Jan 10, 2011
Messages
198
Reaction score
14
I'm trying to alter Lionheart's CC to Arms instead of Fury as a learning experience, but I can't seem to figure out how to add rend to where it will only cast if the debuff is either off, or only has a second or two left on it. Thanks for any help anyone can provide.
 
PHP:
private double RendTimer
        {
            get
            {
                if (Target == null)
                    return double.MaxValue;
                try
                {
                    var debuff = Target.ActiveAuras.
                        Where(x => x.Key == "Rend" && x.Value.CreatorGuid == Me.Guid).
                        First();
                    return debuff.Value.TimeLeft.TotalSeconds;
                }
                catch (Exception)
                {
                    Logging.Write("No debuff found on NPC.");
                    return 0; //must refresh if no debuff found
                }
            }
        }

//...

if (RendTimer < 3.0)
     Rend();
 
Back
Top