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); //Fight.StopFight(); Conditions.ForceIgnoreIsAttacked = false; CombatUtil.TargetUnit(polyTarget); Logging.WriteFight("Targeting poly"); Fight.StopFight(); Fight.StartFight(polyTarget.Guid, false); Logging.WriteFight("Starting fight again"); SpellManager.CastSpellByNameLUA(Frostbolt.Spell.Name); 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)
Recommended Comments
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 accountSign in
Already have an account? Sign in here.
Sign In Now