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


    iMod
    • Version: All Product: Developers Type: Bug Status: Not a Bug
     Share

    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


     Share


    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



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...