Jump to content

Recommended Posts

hello, try something like this,

note this is pudo code (Made from my phone).

 public List<WoWUnit> GetUnitsAttackingPartyMembers()
 {
   var partyMembers = Party.GetParty();
   var units = ObjectManager.GetObjectWoWUnit();

   return units
     .Where(x => x.IsAlive && x.IsAttackable &&
            (x.InCombat || x.InCombatFlagOnly) &&
            partyMembers.Any(p => x.TargetObject?.Target == p.Guid))
     .ToList();
 }

 

Link to comment
https://wrobot.eu/forums/topic/15288-istaggedbyother/#findComment-68729
Share on other sites

On 9/5/2023 at 5:14 PM, Nax said:

hello, try something like this,

note this is pudo code (Made from my phone).

 public List<WoWUnit> GetUnitsAttackingPartyMembers()
 {
   var partyMembers = Party.GetParty();
   var units = ObjectManager.GetObjectWoWUnit();

   return units
     .Where(x => x.IsAlive && x.IsAttackable &&
            (x.InCombat || x.InCombatFlagOnly) &&
            partyMembers.Any(p => x.TargetObject?.Target == p.Guid))
     .ToList();
 }

 

this checks the units attacking partymembers, it should be the other way around. i want to check if mobId 12345 is being targetted or attacked by party members.

Link to comment
https://wrobot.eu/forums/topic/15288-istaggedbyother/#findComment-68732
Share on other sites

On 9/7/2023 at 5:20 AM, Nax said:
public List<WoWPlayer> GetUnitsAttackingPartyMembers(WoWUnit p)
  {
  	return Party.GetParty().Where(x => x.TargetObject?.Target == p.Guid).ToList();
  }

 

Thank you for the help!

May I also ask please how to get my character to face it's target? i am trying to make a plug.in that it will stay in a specific position i set and just face the target and use range skills. i am using wrotation and if i set "Manage character movement...." it moves towards it's target. and if wrotation if off, it doesn't face it's target hence not using any range skills. Thank you.

Link to comment
https://wrobot.eu/forums/topic/15288-istaggedbyother/#findComment-68741
Share on other sites

22 hours ago, Nax said:

awesome will try this out! my bad, should've used the search first.

Link to comment
https://wrobot.eu/forums/topic/15288-istaggedbyother/#findComment-68752
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...