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|
And here is what titanium.cpp shows for the item instance section:
Code:
MakeAnyLenString(&instance,
"%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|",
stackable ? charges : 0,
0,
(merchant_slot==0) ? slot_id : merchant_slot,
inst->GetPrice(),
(merchant_slot==0) ? 1 : inst->GetMerchantCount(),
0,
merchant_slot, //instance ID, bullshit for now
inst->IsInstNoDrop() ? 1 : 0, //not sure where this field is
(stackable ? ((inst->GetItem()->ItemType == ItemTypePotion) ? 1 : 0) : charges),
0,
0
);
Judging by what titanium.cpp shows, it seems like there should be more fields in the instancing section from the example on the wiki page. I see there are 11 fields used for item instancing in titanium.cpp, but there are only 9 fields used in the wiki page example as far as I can tell.
I think this is the item instance part from the wiki example:
Code:
1|0|4|0|0|12688|0|-1|0|
But, there is an extra 0 in the field after that as seen here:
Code:
1|0|4|0|0|12688|0|-1|0|"0|
Though, that last 0 has a quote before it, which if I understand correctly, means that it is part of the actual item fields from the Titanium_itemfields.h. When looking at the actual itemfields for titanium, it looks like they start with the item name, so maybe that first 0 inside the quotes is actually the last 0 from the item instancing section. That is my guess anyway. So, that brings the wiki page example up to 10 fields for item instancing, but it is still 1 short from what titanium.cpp shows.
Here is what I think the Titanium.cpp serialization breaks down to:
Code:
1|0|MerchSlot|Price|MerchCount|0|InstanceID|instnodrop|charges|0|0|
I don't see anything that looks like an actual price in the wiki page example, so maybe this field:
in the titanium.cpp isn't actually being used. I think either one of the fields isn't being used, or maybe it just isn't used in this particular example and would add in an extra field if it is used. But, I don't think the serialization has variable field numbers, which means that one of the 11 probably isn't used. It would have to be one of these:
Code:
(merchant_slot==0) ? slot_id : merchant_slot,
inst->GetPrice(),
(merchant_slot==0) ? 1 : inst->GetMerchantCount(),
Because, all of the other fields line up with the example.
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.