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

Stopcasting and you...

  • Thread starter Thread starter weischbier
  • Start date Start date
W

weischbier

Guest
So I ran into a problem with my Hunter.
Everything is fine so I went into the tuning part.
Cobra Shot is being cast when below 68 Focus. That's cool.
But now I want it to stopcast it when its actually over 68.
It a loss in DPS.

So I did this
Code:
public static Composite StopCastingShit()
        {
            return
                new PrioritySelector(
                    new Decorator(ret =>
                                  Me.CastingSpell.Id == 77767 && // spellId of Cobra Shot
                                  (Me.HasMyAura("Lock and Load") || Me.CurrentFocus >= 68),
                                  new PrioritySelector(
                                      new Action(
                                          ret => Logger.Write(System.Drawing.Color.Lime, "Stopped casting Cobra Shot!")),
                                      new Action(ret => SpellManager.StopCasting())
                                      )
                        )
                    );
        }

When I put this ontop of my rotation it just fucks everything up.

Any thoughts?

greetz

Weischbier
 
Me.CastingSpell.Id == 77767 &&
if this ^^^ returns false

(Me.HasMyAura("Lock and Load")
or this ^^ returns false

|| Me.CurrentFocus >= 68),
then ^^^ this is evaluated and returned as true/false for the entire expression
 
Im no coder at all, only little PB experience, but wouldnt it make more sense if you do:

Me.CastingSpell.Id == 77767 && (Me.HasMyAura("Lock and Load") || Me.CastingSpell.Id == 77767 && Me.CurrentFocus >= 68)

At least this is my basic understanding, otherwise it would stop everything as soon you get over 68 focus, right?
 
Code:
        public static Composite StopCastingShit()        {
            return
                new Decorator(
                    ret => StyxWoW.Me.CastingSpell.Id == 77767 && (StyxWoW.Me.HasMyAura("Lock and Load") || StyxWoW.Me.CurrentFocus >= 68),
                    new Sequence(
                        new Action(ret => Logger.Write(System.Drawing.Color.Lime, "Stopped casting Cobra Shot!")),
                        new Action(ret => SpellManager.StopCasting())
                        )
                    );
        }

Try that. :)
 
Thanks a lot,

I'll try that and report back =)

greetz

Weischbier
 
Code:
public static Composite StopCastingShit(){
             return                 
new PrioritySelector(
                     new Decorator(ret => Me.CastingSpell.Id == 77767 && // spellId of Cobra Shot
                                   ([COLOR=#ff0000]Me.ActiveAuras.ContainsKey[/COLOR]("Lock and Load") || Me.CurrentFocus >= 68),
                                   new PrioritySelector(
                                       new Action(
                                           ret => Logger.Write(System.Drawing.Color.Lime, "Stopped casting Cobra Shot!")),
                                       new Action(ret => SpellManager.StopCasting())
                                       )
                        )                    
              ); 
        }

That was the solution... if someone is interested.. :)
 
Back
Top