Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-01-2015, 05:13 AM
kilst87
Sarnak
 
Join Date: Dec 2008
Location: sydney
Posts: 35
Default 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
Reply With Quote
  #2  
Old 09-01-2015, 05:20 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Well, /target is a client-side command, but the opcode for it is likely handled server-side and then encoded for client use. Not sure what you're wanting to do, but usually bad practice to modify something if you don't know how it works.
Reply With Quote
  #3  
Old 09-01-2015, 06:03 AM
kilst87
Sarnak
 
Join Date: Dec 2008
Location: sydney
Posts: 35
Default

Shot you a PM
Reply With Quote
  #4  
Old 09-01-2015, 07:50 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

My understanding is that the name matching is done on the clientside (since the client already has all the necessary information readily available), and the packet is just there to inform the server of the entityID of the target the client has already found and to give it a chance to say "no".
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:29 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3