Ordush 185 Posted May 14, 2018 Share Posted May 14, 2018 (edited) 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 May 14, 2018 by Ordush Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/ Share on other sites More sharing options...
iMod 99 Posted May 14, 2018 Share Posted May 14, 2018 (edited) 2 hours ago, 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. ? 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 May 14, 2018 by iMod Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43588 Share on other sites More sharing options...
Ordush 185 Posted May 14, 2018 Author Share Posted May 14, 2018 1 minute ago, 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 ? cool so use GUID which i get with Party and then check position between the two GUIDs? Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43589 Share on other sites More sharing options...
iMod 99 Posted May 14, 2018 Share Posted May 14, 2018 (edited) 7 minutes ago, Ordush said: cool so use GUID which i get with Party and then check position between the two GUIDs? 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 May 14, 2018 by iMod Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43590 Share on other sites More sharing options...
Ordush 185 Posted May 14, 2018 Author Share Posted May 14, 2018 6 minutes ago, 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. 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. ? Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43591 Share on other sites More sharing options...
Zan 99 Posted May 14, 2018 Share Posted May 14, 2018 @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. Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43594 Share on other sites More sharing options...
iMod 99 Posted May 14, 2018 Share Posted May 14, 2018 (edited) 2 minutes ago, 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. 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 May 14, 2018 by iMod Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43595 Share on other sites More sharing options...
Zan 99 Posted May 14, 2018 Share Posted May 14, 2018 20 minutes ago, 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? 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. Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43596 Share on other sites More sharing options...
iMod 99 Posted May 14, 2018 Share Posted May 14, 2018 4 minutes ago, 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. Just hover with your mouse over the red text and tell me the error message wich should pop up ? Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43597 Share on other sites More sharing options...
Ordush 185 Posted May 14, 2018 Author Share Posted May 14, 2018 1 hour ago, 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. I had the same issue until i used WoWPlayer. ? Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43599 Share on other sites More sharing options...
Zan 99 Posted May 15, 2018 Share Posted May 15, 2018 (edited) 20 hours ago, 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? 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. 17 hours ago, Ordush said: I had the same issue until i used WoWPlayer. ? I get the error using DistanceTo with WowPlayer and WowUnit. Basically anytime DistanceTo is used. Edited May 15, 2018 by Zan Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43645 Share on other sites More sharing options...
Ordush 185 Posted May 15, 2018 Author Share Posted May 15, 2018 Just now, 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. Weird. Link to comment https://wrobot.eu/forums/topic/9395-range-between-two-players/#findComment-43646 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