Jump to content

Find NPC by ID (longer than visible range)


Recommended Posts

I'm trying to find NPCs which are out of range, in other words no longer visible.

I know that in WotLK addons like NPCScan were able to locate mobs really FAR away, further than visible.

Is this something that can be done in vanilla?

I tried code below which works if the NPC is still within the visible range but right when I go step farther so that it disappears the NPC is no longer valid.

var guard = wManager.Wow.ObjectManager.ObjectManager.GetNearestWoWUnit(wManager.Wow.ObjectManager.ObjectManager.GetWoWUnitByEntry(8147));
		if (guard.IsValid)
		{
			float distance = guard.GetDistance;
			string myString = distance.ToString(); 
			MessageBox.Show(myString);
		}
		else
		{
			MessageBox.Show("Not found");
		}

Also found a vanilla API call "TargetByName" which can reach as far as the above code.

Any ideas if this is a limitation of vanilla or if this can be managed somehow.

Thanks

Link to comment
Share on other sites

14 minutes ago, Seminko said:

Any ideas if this is a limitation of vanilla or if this can be managed somehow.

Hello, this is a limitation from the server itself, other servers could also have a dynamic object scope(performance reasons).

Link to comment
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
 Share

×
×
  • Create New...