Jump to content
  • Fight.StartFight deadlock?

    • Version: All Product: WRobot General Type: Bug Status: Confirmed

    Hello @Droidz,

    I have the following problem. The bot doesn't recognize I am in fight (vanilla) after casting polymorph on another mob.
    Now I use this snippet of code to force it to attack polied targets. However it completely locks at Fight.StartFight UNTIL the mob is dead (from external sources) or I die.
    Check out the log below.

    What can cause this?

    if(!Fight.InFight || !Me.InCombat)
      WoWUnit polyTarget = ObjectManager.GetObjectWoWUnit().FirstOrDefault(u => u.HaveDebuff("Polymorph") && u.GetDistance <= 20);
      if (polyTarget != null)
        Logging.WriteFight("Found polied target " + polyTarget.Name);
        Logging.WriteFight("Polytarget Valid: " + polyTarget.IsValid);
        Conditions.ForceIgnoreIsAttacked = false;
        Logging.WriteFight("Targeting poly");
        Fight.StartFight(polyTarget.Guid, false);
        Logging.WriteFight("Starting fight again");
        Logging.WriteFight("Casting Frostbolt on polied target! Already InFight: " + Fight.InFight);
    [F] 13:32:06 - Fightclass successfully casted: Frostbolt
    [F] 13:32:06 - Found polied target Highland Strider
    [F] 13:32:06 - Polytarget Valid: True
    [F] 13:32:06 - Targeting poly
    13:32:07 - [HumanMasterPlugin] cancelling regen while in combat
    13:32:07 - [Fight] Player Attack Highland Strider (lvl 31)
    [F] 13:32:36 - Starting fight again
    [F] 13:32:36 - Casting Frostbolt on polied target! Already InFight: False
    13:32:37 - [HumanMasterPlugin] Looting Highland Strider
    13:32:38 - [Fight] Player Attack Highland Strider (lvl 30)


    User Feedback

    Recommended Comments

    Hello, can you share info of target with a Polymorph buff (in dev tools with button "memory info", share only target info, check if you haven't info about your character before to post info).

    Link to comment
    Share on other sites

    For now, I solved this by manually setting Fight.InFight = true and it will just continue working normally.
    But I have noticed that whenever you crowd control a mob in vanilla (fear, polymorph, repentance) it will un-target you adn the bot will stop fighting it and completely ignore it.

    I'll get back to you with memory info if I find the time.

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