Jump to content

Recommended Posts

Hey all

I have been looking through the ObjectManager, i can't seem to find anything.

Is there a way to check range between two units? i.e. Party1 and Party2?

I know that a player has to be near them to check their range, but i just want it to do this:
if range between Party1 and Party2 < 5 return true else return false.
Obviously it will return false if the player can't see party1 and party2. ?

Perhaps @Droidz knows if the units party1-4 is implemented in the ObjectManager? I know that his fightclass editor, can heal party. ?

Edited by Ordush
Link to comment
https://wrobot.eu/forums/topic/9395-range-between-two-players/
Share on other sites

  On 5/14/2018 at 3:56 PM, Ordush said:

Hey all

I have been looking through the ObjectManager, i can't seem to find anything.

Is there a way to check range between two units? i.e. Party1 and Party2?

I know that a player has to be near them to check their range, but i just want it to do this:
if range between Party1 and Party2 < 5 return true else return false.
Obviously it will return false if the player can't see party1 and party2. ?

Perhaps @Droidz knows if the units party1-4 is implemented in the ObjectManager? I know that his fightclass editor, can heal party. ?

Expand  
            WoWPlayer one = new WoWPlayer();
            WoWPlayer two = new WoWPlayer();

            // Get distance between 2 objects
            float distance = one.Position.DistanceTo(two.Position);

If you are looking for party stuff take a look at "wManager.Wow.Helpers.Party"
Hope i understood the question right ?

Do you want to be able to check if the whole group is near or just one of them?

Edited by iMod
  On 5/14/2018 at 5:59 PM, iMod said:
            WoWPlayer one = new WoWPlayer();
            WoWPlayer two = new WoWPlayer();

            // Get distance between 2 objects
            float distance = one.Position.DistanceTo(two.Position);

If you are looking for parts stuff take a look at "wManager.Wow.Helpers.Party"
Hope i understood the question right ?

Expand  

cool so use GUID which i get with Party and then check position between the two GUIDs?

  On 5/14/2018 at 6:01 PM, Ordush said:

cool so use GUID which i get with Party and then check position between the two GUIDs?

Expand  

The Party namespace offers you a whole object list of the player so you just need to select 2 player and use the DistanceTo property of the position property.of the WoWPlayer object you selected.

But yeah you also can use the guid.

Edited by iMod
  On 5/14/2018 at 6:04 PM, iMod said:

The Party namespace offers you a whole object list of the player so you just need to select 2 player and use the DistanceTo property of the position property.of the WoWPlayer object you selected.

But yeah you also can use the guid.

Expand  

I can't seem to be able to get the units from the Party namespace ?

I am on Vanilla, not sure if it makes a difference. ?

  On 5/14/2018 at 6:35 PM, Zan said:

@iMod are you getting errors in VS using DistanceTo? My projects are all red when I use it. Even using it inside .Order it gives an error.

Expand  

Nah i'm lucky i don't had to update any of my projects after updates since yet and DistanceTo is working for me (WOTLK)
What kind of error do you get?

Edited by iMod
  On 5/14/2018 at 6:37 PM, iMod said:

Nah i'm lucky i don't had to update any of my projects after updates since yet and DistanceTo is working for me (WOTLK)
What kind of error do you get?

Expand  

It just shows up in Red. I do use resharper but I thought I put ignore error for it. I'll screen shot it after I get home from work. I use it on 7.1.5 private server btw.

  On 5/14/2018 at 7:03 PM, Zan said:

It just shows up in Red. I do use resharper but I thought I put ignore error for it. I'll screen shot it after I get home from work. I use it on 7.1.5 private server btw.

Expand  

Just hover with your mouse over the red text and tell me the error message wich should pop up ?

  On 5/14/2018 at 7:03 PM, Zan said:

It just shows up in Red. I do use resharper but I thought I put ignore error for it. I'll screen shot it after I get home from work. I use it on 7.1.5 private server btw.

Expand  

I had the same issue until i used WoWPlayer. ?

  On 5/14/2018 at 6:37 PM, iMod said:

Nah i'm lucky i don't had to update any of my projects after updates since yet and DistanceTo is working for me (WOTLK)
What kind of error do you get?

Expand  

I went through and referenced other versions of WRobot' s wManager and found Wrath was good, Cata, MoP, WoD, and Legion were all red. The error I'm getting is "cannot resolve symbol". I changed .net versions but that didn't help either. I even tried every suggestion online to possibly correct it. But it does compile for me. It's odd.

  On 5/14/2018 at 8:39 PM, Ordush said:

I had the same issue until i used WoWPlayer. ?

Expand  

I get the error using DistanceTo with WowPlayer and WowUnit. Basically anytime DistanceTo is used.

Edited by Zan
  On 5/15/2018 at 2:37 PM, Zan said:

I went through and referenced other versions of WRobot' s wManager and found Wrath was good, Cata, MoP, WoD, and Legion were all red. The error I'm getting is "cannot resolve symbol". I changed .net versions but that didn't help either. I even tried every suggestion online to possibly correct it. 

I get the error using DistanceTo with WowPlayer and WowUnit. Basically anytime DistanceTo is used.

Expand  

Weird.

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