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 04-15-2012, 04:09 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default Understanding packet structure

Okay I thought I had this, but maybe I do not.

I am guessing this is the packet that got sent from me sellling a single malachite to a vendor using Underfoot

Code:
[OPCode: 0x0b27] OP_ShopPlayerSell [Server->Client] [Size: 16]
000 | 93 01 00 00 17 00 00 00 01 00 00 00 31 00 00 00  | ............1...
This is 16 bytes if I am right, and have the right packet.

So this would be the structure correct ? It is me selling to the vendor a malachite. The sell struct seems to be larger so it does not looking like a likely candidate.

So this would be the struct.

Code:
struct Merchant_Purchase_Struct {
/*000*/	int32	npcid;			// Merchant NPC's entity id
/*004*/	int32	itemslot;		// Player's entity id
/*008*/	int32	quantity;
/*012*/	int32	price;
};
I can make out the slot and the amount, which was one malachite. But the NPCid does not match me or the vendor, no matter if I read it from right to left or left to right, converted it to decimal. I am thinking I am missing something simple here.

I posted this in a separate thread because this has nothing to really do with the VoA development.
Reply With Quote
  #2  
Old 04-15-2012, 04:20 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

That packet has the following values:
Code:
NPCID	0x00000193	Decimal	403
Slot	0x00000017	Decimal	 23
Qty	0x00000001	Decimal   1
Price	0x00000031	Decimal  49
I'd need to see the OP_ZoneEntry packet for the merchant to tell if the NPCID was correct or not.
Reply With Quote
  #3  
Old 04-15-2012, 04:23 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Code:
[OPCode: 0x4b61] OP_ZoneEntry [Server->Client] [Size: 355]
000 | 4d 65 72 61 62 6f 5f 53 6f 74 61 74 68 30 30 30  | Merabo_Sotath000
016 | 00 93 01 00 00 3c 33 33 53 40 01 00 00 00 1d 00  | .....<33S@......
032 | 00 00 80 bf 00 00 00 00 00 00 80 40 00 00 00 20  | ...........@... 
048 | 3f 00 00 a0 3f 08 00 00 00 01 01 00 00 00 64 00  | ?...?.........d.
064 | 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  | ................
080 | 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 29 00  | ..............).
096 | 64 00 03 15 00 00 00 42 72 65 77 69 6e 67 20 53  | d......Brewing S
112 | 75 70 70 6c 69 65 73 00 00 00 00 00 00 00 00 00  | upplies.........
128 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
144 | 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 00 00  | ................
160 | 00 00 38 03 00 00 00 00 96 00 16 fc 07 00 00 00  | ..8.............
176 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
192 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
208 | 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 15 00  | ................
224 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
256 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
272 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
288 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
304 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
336 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
352 | 00 00 00                                         |
I see the 01 93 in the packet when he was picked up during zone in. I am guessing this in no way reflects his ID of 202081 - Merabo_Sotath (Brewing Supplies)
Reply With Quote
  #4  
Old 04-15-2012, 04:25 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by provocating View Post
Code:
[OPCode: 0x4b61] OP_ZoneEntry [Server->Client] [Size: 355]
000 | 4d 65 72 61 62 6f 5f 53 6f 74 61 74 68 30 30 30  | Merabo_Sotath000
016 | 00 93 01 00 00  3c 33 33 53 40 01 00 00 00 1d 00  | .....<33S@......
032 | 00 00 80 bf 00 00 00 00 00 00 80 40 00 00 00 20  | ...........@... 
048 | 3f 00 00 a0 3f 08 00 00 00 01 01 00 00 00 64 00  | ?...?.........d.
064 | 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  | ................
080 | 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 29 00  | ..............).
096 | 64 00 03 15 00 00 00 42 72 65 77 69 6e 67 20 53  | d......Brewing S
112 | 75 70 70 6c 69 65 73 00 00 00 00 00 00 00 00 00  | upplies.........
128 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
144 | 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 00 00  | ................
160 | 00 00 38 03 00 00 00 00 96 00 16 fc 07 00 00 00  | ..8.............
176 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
192 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
208 | 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 15 00  | ................
224 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
256 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
272 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
288 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
304 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
336 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
352 | 00 00 00                                         |
Yes, that is correct.
Reply With Quote
  #5  
Old 04-15-2012, 04:25 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I see the 01 93 in the packet when he was picked up during zone in. I am guessing this in no way reflects his ID of 202081 - Merabo_Sotath (Brewing Supplies). Sorry I am trying to wrap my head around all of this.
Reply With Quote
  #6  
Old 04-15-2012, 04:34 PM
Noport
Opcode Ninja
 
Join Date: Mar 2009
Location: San francisco
Posts: 426
Default

I forgot to tell provocating take your current voa.conf rename it to patch_Mar15-2012.conf then put with eqextractor2 directory replace the older file with current opcodes
Reply With Quote
  #7  
Old 04-15-2012, 04:34 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

202081 is just his id in the PEQ npc_types table, which is never sent to the client and has no meaning to it.

0x0193 is the entity_id.

Entity_ids are assigned sequentially, starting from 1, to each NPC that is spawned in a zone, so the first NPC to be spawned gets EntityID 1, the next one gets 2, etc, etc. These are what are sent in the OP_ZoneEntry and various other packets and are what tie things together in the packets.

The EntityID an NPC get assigned could change depending on the order things get spawned, so you need to look at the OP_ZoneEntry packet in the particular collect your are looking at to see what it has been assgined.

The EntityID of an NPC is the 32 bit value following the null terminated name string at the start of the OP_ZoneEntry packet.
Reply With Quote
  #8  
Old 04-15-2012, 04:38 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Quote:
Originally Posted by Noport View Post
I forgot to tell provocating take your current voa.conf rename it to patch_mar15.conf then put with eqextractor2 directory replace the older file with current opcodes
I have the Extractor files from just recently, and they do seem to be able to parse the VoA client, are you saying I still need to do this ?
Reply With Quote
  #9  
Old 04-15-2012, 04:47 PM
Noport
Opcode Ninja
 
Join Date: Mar 2009
Location: San francisco
Posts: 426
Default

that is what i have been doing just replacing patch_Mar15-2012.conf file with newer opcode so it will show up correctly.
Reply With Quote
  #10  
Old 04-15-2012, 04:49 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I actually just copied the voa.conf into the directory without replacing anything, it appears to work fine like that ?
Reply With Quote
  #11  
Old 04-15-2012, 04:56 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

EQExtractor2 is looking for a file called patch_Mar15-2012.conf in it's working directory to decode packets collected from the current Live client.

What Noport is saying is that as Trevius updates the patch_VoA.conf in the utils directory with newly found OpCodes, if you want EQExtractor2 to show these OpCodes with their correct name, rather than OP_Unknown, you should copy patch_VoA.conf to the location of your EQExtractor2.exe and rename it to patch_Mar15-2012.conf
Reply With Quote
  #12  
Old 04-15-2012, 05:00 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I figured it just parsed the directory for *.conf files and used them. This is good to know !

In fact a packet that was not getting parsed right, now appears to be. Thanks !
Reply With Quote
  #13  
Old 04-15-2012, 05:03 PM
Noport
Opcode Ninja
 
Join Date: Mar 2009
Location: San francisco
Posts: 426
Default

copy voa.conf to desktop rename patch_Mar15-2012.conf replace older patch_Mar15-2012.conf.. in the program extractor2 you should see patch_mar15 in green correct? if you see voa.conf in green then you ok. i'll let Derision exlpain it to you. i want you to be using current opcode not the older opcode.
Reply With Quote
  #14  
Old 04-15-2012, 05:05 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Well it is definitely a learning curve. I noticed that selling is not working, which Trevius is probably already working on. Selling the exact same item to the exact same vendor yeilds different results.

UNDERFOOT

Code:
[OPCode: 0x0b27] OP_ShopPlayerSell [Server->Client] [Size: 16]
000 | 93 01 00 00 17 00 00 00 01 00 00 00 31 00 00 00  | ............1...
VOA

Code:
[OPCode: 0x0b27] OP_ShopPlayerSell [Client->Server] [Size: 20]
000 | 93 01 00 00 17 00 ff ff ff ff cf 42 01 00 00 00   | ...........B....
016 | 36 09 ff c2                                      | 6...
One more byte to the packet and obviously some info padded in there.
Reply With Quote
  #15  
Old 04-15-2012, 05:16 PM
501st
Sarnak
 
Join Date: Jan 2009
Location: Virginia
Posts: 51
Default

That's likely due to the merchant window revamp. In fact since you're referring to SELLING an item my guess would be that extra information is to handle the new "buy back" tab. Where apparently items you sell default to if the merchant's inventory is full. So you can buy back items sold by mistake.
__________________
Rainbowdash Spectrum - 54 Dark Elf Magician - P99
Rainbowdash Poxleitner - 100 Dark Elf Magician - Live/Test
Miku X'Lottl - Vet Rank 11 Khajiit Nightblade - ESO
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:47 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