Jump to content

Stop WRobot from managing InFight Movement


Recommended Posts

Hey all, 

I've been working on a very customized fightclass with lots of custom movement and stuff... Long story short, all my code functions perfect when testing in WRotation with 'Manage Character Movement' off, but has weird quirks when using it with Quester (due to WRobot attempting to manage fight movement)... I've since explored ways of 'pausing' a fight (which semi-works), but it just causes other little quirks. Anyway,  I just saw that Fight.FightStart() has a parameter to control whether or not the bot manages movement in fight. I had the idea to trigger my own FightStart (with no movement management) on OnFightStart, but that causes a loop. Any ideas how I could basically 'replace' the default FightStart with my own with the proper params?

Thanks a lot.

Link to comment
Share on other sites

Hello, try code like (run it one time):

        var lastUnit = new WoWUnit(0);
        wManager.Events.FightEvents.OnFightStart += delegate (WoWUnit unit, CancelEventArgs cancelable)
            if (unit != null && unit.IsValid && lastUnit != null && lastUnit.IsValid && !unit.Guid.Equals(lastUnit.Guid))
                lastUnit = new WoWUnit(unit.GetBaseAddress);
                // StartFight(Int128 guid, bool skipIfPlayerAttackedButNotByTheTarget = true, bool managerMovement = true, bool stopIfPlayerTargetChange = false, bool rotationBot = false)
                Fight.StartFight(unit.Guid, false, false, true, true);
                cancelable.Cancel = true;

(not tested)

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.

Reply to this topic...

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