Jump to content

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
https://wrobot.eu/forums/topic/9632-stop-wrobot-from-managing-infight-movement/
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)

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