Findeh 34 Posted November 29, 2018 Share Posted November 29, 2018 Good day. As always, sorry please for my english. As a title says, need to change target during the fight. Not once and not for one cast only. Need just change it and continue FightLoop rotation at new target, then, maybe, some time later, change it for another target, or maybe change it back to the first one. The problem is, wrobot changes target back while at FightLoop. And if i'm canceling the FightLoop, wrobot will not rotate fightclass and other fight-loop-things on a new target. If i'll set cenceleble back to false (to start the FightLoop), wrobot will change target back to the first target (atleast that's what my bot did, maybe i'm doing it wrong) Right now the only idea i have is to cancel FightLoop, blacklist current target, change the target and start FightLoot again. But this may cause problems if i'll need to change target back to the first one again. I can add a timer for blacklisted target, but it might be to short or to long. Maybe someone have done thing like that befor? Any advices will ba much appriciated. Link to comment https://wrobot.eu/forums/topic/10442-change-target-during-combat/ Share on other sites More sharing options...
Droidz 2738 Posted November 30, 2018 Share Posted November 30, 2018 Hello, look code of V2: https://wrobot.eu/files/file/414-multi-pull/ Findeh 1 Link to comment https://wrobot.eu/forums/topic/10442-change-target-during-combat/#findComment-49609 Share on other sites More sharing options...
Findeh 34 Posted November 30, 2018 Author Share Posted November 30, 2018 Have not seen it yet, but it should help, thank you! Link to comment https://wrobot.eu/forums/topic/10442-change-target-during-combat/#findComment-49619 Share on other sites More sharing options...
Findeh 34 Posted November 30, 2018 Author Share Posted November 30, 2018 Completley stupid question. How wManager.Wow.ObjectManager.ObjectManager.GetUnitAttackPlayer() decides, is a Unit attacking or not? If i have read the code right, it just adds everything around me to the List and then removes from that List everything that is 70f away from me. Am i right? I'm asking because i need to check not only number of units attacking me, but also attacking my group. Will function: wManager.Wow.ObjectManager.ObjectManager.GetNumberAttackPlayer() (that is using GetUnitAttackPlayer()) return the right number for that goal, or will it return only those units that attacking me, excludeing those who attacking group members? Link to comment https://wrobot.eu/forums/topic/10442-change-target-during-combat/#findComment-49622 Share on other sites More sharing options...
Matenia 628 Posted November 30, 2018 Share Posted November 30, 2018 wManager.Wow.ObjectManager.ObjectManager.GetUnitAttackPlayer() is all enemies targeting you, I think you could use this for what you want: ObjectManager.GetObjectWoWUnit().Count(u => u.IsTargetingMeOrMyPetOrPartyMember && u.Type != WoWObjectType.Player) Findeh 1 Link to comment https://wrobot.eu/forums/topic/10442-change-target-during-combat/#findComment-49625 Share on other sites More sharing options...
Findeh 34 Posted December 1, 2018 Author Share Posted December 1, 2018 Damn, it's so much simpler than solution i was thinking about. Thank you. Link to comment https://wrobot.eu/forums/topic/10442-change-target-during-combat/#findComment-49638 Share on other sites More sharing options...
Recommended Posts
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