Jump to content

Bug in CurrentTarget.HaveBuff(84617)


AudreyH

Recommended Posts

One month ago i create a Rogue, a fabulous one :wink:, and try to use the different rogue fight profile from the site

Several problem occurs and i was not very satisfied by the dps. Something i noticed, i was not able to refresh Revealing Strike correctly, it was fine on dummy but not in raid.

So i decided to create my on c# profile and use the [_Pasterke_] dk to begin (thxs to him). And again i was not able to refresh Revealing Strike correctly, it was fine on dummy but not in raid again. I try many solutions, thxs to this site there is plenty of example here.

!CurrentTarget.HaveBuff(84617)
revealingStrike.TargetBuffTimeLeft==0

and

Lua.LuaDoString("print(\"Revealing Strike :" + CurrentTarget.HaveBuff(84617)+ ": :" +  revealingStrike.TargetBuffTimeLeft + "\")");

track the debuff.

What was my surprize to see on target no "Revealing Strike" but the print tell me "true : : 20150" for example

Sometimes the print was right but sometimes not, dont find anything that can explain it. 

But today i find what happen: if i am the only rogue in raid no problemo, if there is another combat rogue, the CurrentTarget.HaveBuff(84617) returns the buff even its not mine, and so i cannnot refresh it until the other rogue forget to cast, 

And now, how can i track my "revealingStrike", that's the question

Its not a WRobot problem because 

/run nam = GetSpellInfo(84617) ; name = UnitDebuff("target", nam) ; if name then  print(name) else print ("false") end

in the game return also the name even i cant see revealingStrike on target

Link to comment
Share on other sites

Hello, like here: http://wrobot.eu/forums/topic/2866-targetbuffcastedbyme-335-servers-anyone-who-uses-this-please-look-at/#comment-13188 WRobot (and lua) retrun the first buff in the list.

In C# code you can fix this problem with this code:

        if (wManager.Wow.ObjectManager.ObjectManager.Target.IsValid)
        {

            var buffs = wManager.Wow.ObjectManager.ObjectManager.Target.GetAllBuff();
            var guidPlayer = wManager.Wow.ObjectManager.ObjectManager.Me.Guid;
            foreach (var buff in buffs)
            {
                if (buff.Owner == guidPlayer && buff.SpellId == 84617)
                {
                    var buffTimeLeft = buff.TimeLeft;
                  	// work here...
                }
            }
        }

 

Link to comment
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...