Looking for some info on /target
			 
			 
			
		
		
		
		Just wanted to know how /target works.  I know that a lot of the checks (MQ2, range, gm etc etc) are done in Client::Handle_OP_TargetCommand (client_packet.cpp), and I've read through most of the parts of the code I think have to do with targeting, but I can't, for the life of me, see where the target is chosen. 
 
Say if I do a "/target a_", it should target the nearest npc starting with a_*****. I'm looking for the code that decides which npc to target (is nearest). 
 
Any information on how /target works would be appreciated though. 
 
Cheers 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 |