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

IsBehind, IsSafelyBehind, and IsPlayerBehind not working??

roguetexan

New Member
Joined
Mar 23, 2010
Messages
72
Reaction score
0
I've checked IsBehind, IsSafelyBehind, and IsPlayerBehind and they appear not to be working. For instance, when I have my Druid in Cat form and have a check on whether to cast "Shred" (which can only be cast from behind) it constantly tries to cast, even though I might be facing the target and the target is facing me.

Seems to be an error in a common routine shared by all three of these calls?

RT
 
Hmm does cancast do a check to solve your problem or is it only to see if you have the spell and stuff?
 
No, that does not solve the issue. The cast routine I use "assumes" a Styx.Logic.Combat.SpellManager.CanCast(Styx.Logic.Combat.WoWSpell, Styx.WoWInternals.WoWObjects.WoWUnit) format... so clearly it is not checking for positioning per se.
 
Hmm does cancast do a check to solve your problem or is it only to see if you have the spell and stuff?

CanCast() is supposed to check *everything* relevant--cooldowns, positional requirements, indoors/outdoors, etc. This is a major distinction between CanCast() and HasSpell().

cheers,
chinajade
 
Well, it's not doing it for some reason in Apoc's Singular. Very strange. Here's the line:

Spell.Cast("Shred", ret => StyxWoW.Me.CurrentTarget.IsPlayerBehind)

So, if anything there is a double check. First in the .Cast routine and in the the IsPlayerBehind check...

Strange.
 
Well, if I use this form:

new Decorator(ret => StyxWoW.Me.CurrentTarget.IsPlayerBehind && SpellManager.CanCast("Shred", true),
new Action(a => SpellManager.Cast("Shred"))),


It works... and casts appropriately.
 
Well, if I use this form:

new Decorator(ret => StyxWoW.Me.CurrentTarget.IsPlayerBehind && SpellManager.CanCast("Shred", true),
new Action(a => SpellManager.Cast("Shred"))),
It works... and casts appropriately.

Nice find, and thanks for following-up. I believe you will find the IsPlayerBehind to be redundant at this point, and can be removed. If not, I've learned something. :D

cheers,
chinajade
 
CanCast() is supposed to check *everything* relevant--cooldowns, positional requirements, indoors/outdoors, etc. This is a major distinction between CanCast() and HasSpell().

cheers,
chinajade

Well yea I knew it was that stuff just didn't know if it also checked for positioning. So yea cancast should work alone then
 
You are correct, the IsPlayerBehind can be removed and it still works

So, there is something odd about Apoc.... :) I mean Apoc's Spell.Cast routine. It is not "seeing" the requirement:

ret => StyxWoW.Me.CurrentTarget.IsPlayerBehind
 
I've been working on a Feral Cat CC, and everything is going great.. As long as i am actually behind the target. If in front of the target it is trying to Shred like noones business. Ignores the Mangle code completely.

Code:
  // If you are behind target, Shred.
            if (StyxWoW.Me.CurrentTarget.IsPlayerBehind && SpellManager.CanCast("Shred") && targetDistance <= 5)
                            
                {
                    Shred();
                }
           // If not behind target, Mangle  
            if (SpellManager.CanCast("Mangle (Cat)") && !StyxWoW.Me.CurrentTarget.IsPlayerBehind && targetDistance <= 5 )
                {
                    Mangle();
                }
           // If we are behind, lets Mangle 1 time just to keep up the debuff on target.
             if (SpellManager.CanCast("Mangle (Cat)") && StyxWoW.Me.GotTarget && targetDistance <= 5 && !StyxWoW.Me.CurrentTarget.Auras.ContainsKey("Mangle") && StyxWoW.Me.CurrentTarget.IsPlayerBehind)
                {
                Mangle();
                }

If i actually AM behind the target it follows the IsPlayerBehind rule.. And will Shred, and only Mangle 1 time to keep the debuff up. However if i am in front it will mangle 1 time, then spam Shred..

What is the code to do a check if you are in Front of the target? Perhaps i could just use a ! then that check..

/edit.. well, after doing some testing. It appears it only hangs up when i use Ravage, or for some other reason begin the attack from Behind the target. If i start the attack from the front, it uses Mangle as it should, and never once tries to use Shred.

/edit again.. It appears it is only checking whether or not i am in front or behind the target from the initial pull. Think i'm going about this all wrong.
 
Last edited:
Back
Top