Jump to content
  • [WOTLK] Functions seems not to work properly


    iMod
    • Version: All Product: Developers Type: Bug Status: Not a Bug
    ObjectManager.Me.TargetObject.GetBuff("BuffName");

    Always returns a invalid aura

    ObjectManager.Me.TargetObject.HaveBuff(id)

    Always returns false. With Ids array it is is working but it takes 200ms more to circle through it which kills my fight class performance.

     

    Are the auren updated in each objectmanager update cycle or just by calling one of the buff functions?

     

    Greez iMod



    User Feedback

    Recommended Comments

    Hi,

    Logging.Write("===================");
    var t = System.Diagnostics.Stopwatch.StartNew();
    
    uint id = 8326;
    var n = "Ghost";
    
    var s = System.Diagnostics.Stopwatch.StartNew();
    
    Logging.Write("TargetObject.HaveBuff(id) > " + wManager.Wow.ObjectManager.ObjectManager.Me.TargetObject.HaveBuff(id) + " > "  + s.ElapsedMilliseconds);
    s.Restart();
    
    Logging.Write("TargetObject.GetBuff(n) > " + wManager.Wow.ObjectManager.ObjectManager.Me.TargetObject.GetBuff(n) + " > "  + s.ElapsedMilliseconds);
    s.Restart();
    
    Logging.Write("Target.HaveBuff(id) > " + wManager.Wow.ObjectManager.ObjectManager.Target.HaveBuff(id) + " > "  + s.ElapsedMilliseconds);
    s.Restart();
    
    Logging.Write("Target.GetBuff(n) > " + wManager.Wow.ObjectManager.ObjectManager.Target.GetBuff(n) + " > "  + s.ElapsedMilliseconds);
    
    Logging.Write(t.ElapsedMilliseconds + " ms ========");

    I can't reproduce problem, if you can code that I can run for that.

    But it is better to use objectmanager.target to get character target (it is more safe and bot cache result)

    Link to comment
    Share on other sites

    Thanks like always... was my fault. You can close this bug request.

    1. GetBuff(spellName: "") => Works, I took the ingame name but the english name was requiered.
    2. HaveBuff works now for some reasons... no clue may I was testing at a dummy.

    The ObjectManager.Target works way better, thanks for that hint.

    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...