Jump to content

Recommended Posts

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

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?

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)

 

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