Code for serializing items?
I've been working on getting SimpleClient to understand the new netcode in EQEmu 0.6.1 and newer, but I've run into a snag. I can get through character creation and selection on the world server, but to take the next step I need to get SimpleClient able to understand how items are serialized as they are passed from the zone server. I looked in the 0.6.1 code and did a quick search in the 0.7.0 code and I couldn't see anything that tells me how items are serialized.
I'm not going to be able to proceed without this, not to mention that if I want to be able to port my existing database up to 0.6.1 and newer it means that I'll have to add item serialization capability to the admin tool. Can anyone point me to some code that shows how items get serialized in newer EQEmu versions? Thanks, Wind |
Look at common/patches/Client62.cpp and common/patches/Titanium.cpp at function char *SerializeItem(const ItemInst *inst, sint16 slot_id, uint32 *length, uint8 depth).
There is an article in the Wiki that describes serialization as well. Edit: Wiki article: http://www.eqemulator.net/wiki/wikka...=ItemStructure |
Thanks a lot. I'm a bit concerned about the Wiki as it doesn't mention what EQEmu version it refers to (I could presume that it's the current version, but when it comes to Wikis in general you never know). From what I've seen when building SimpleClient, Item serialization has tended to change for every EQEmu version as it has kept up with live. I think this will help a lot, though.
WC |
Thanks for the wiki page link, Derision. I hadn't seen that one before lol. It is really useful for my work on SoF. Now that I understand the breakdown of how the serialization works a little better, I think I know what I need to do to get it working right for SoF. I am still not clear on the item instance/merchant slot stuff, but hopefully I can get it working without knowing what that is exactly.
Windcatcher, it is just a guess, but from looking at the edit dates on that Wiki page, I am pretty sure that the page was written for the Titanium client. It seems to line up with the Titanium client serialization accept for 1 part I can't figure out. Here is the instancing info and the beginning of the item info from the example on that wiki page: Code:
1|0|4|0|0|12688|0|-1|0|"0|Signet of the Arcane|Raw power flows into your body|IT63|16257|15|255|0|0|18|1|548| Code:
MakeAnyLenString(&instance, I think this is the item instance part from the wiki example: Code:
1|0|4|0|0|12688|0|-1|0| Code:
1|0|4|0|0|12688|0|-1|0|"0| Here is what I think the Titanium.cpp serialization breaks down to: Code:
1|0|MerchSlot|Price|MerchCount|0|InstanceID|instnodrop|charges|0|0| Code:
inst->GetPrice(), Code:
(merchant_slot==0) ? slot_id : merchant_slot, Once I figure out that part, I think the rest of what I need for SoF is just to add in a bunch of 0 fields to finish the item instancing part. The serialization section for EQLive is 16 fields long, and I am pretty sure that SoF is as well, or at least close to that. |
I can verify that at least for titanium client that it isn't necessary to send equipment in any fashion in order to zone into the game.
I think zeroed out the equipment slots in the pp and didn't have a problem. |
All times are GMT -4. The time now is 03:58 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.