Jump to content
  • Allow us to override and SET new target in fightclasses


    Jasabi
    • Version: All Product: Fight Classes Type: Suggestion Status: Not a Bug

    Hi,

    currently its a big issue to switch targets correctly in wrobot with fightclasses, as wrobot always tries to switch back to the original target.

    It would help a lot with development, if you could give us a way to override this or set a new target for the fightloop to use.



    User Feedback

    Recommended Comments

    Hello, not tested:

            wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) => {
                var newTarget = new WoWUnit(0); // your code to found new mobs
    
                if (newTarget.IsValid && !newTarget.IsMyTarget)
                {
                    Fight.StartFight(newTarget.Guid);
                    cancelable.Cancel = true;
                }
            };

    or

            wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) => {
                var newTarget = new WoWUnit(0); // your code to found new mobs
    
                if (newTarget.IsValid)
                {
                    if (!newTarget.IsMyTarget)
                        Interact.InteractGameObject(newTarget.GetBaseAddress);
                    // your code here ....
                    SpellManager.CastSpellByIdLUA(123);
                }
            };

     

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