Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hdr.slot = (merchant_slot == 0) ? slot_id : merchant_slot;
- hdr.price = inst->GetPrice();
- hdr.merchant_slot = (merchant_slot == 0) ? 1 : inst->GetMerchantCount();
- hdr.unknown020 = 0;
- hdr.instance_id = (merchant_slot == 0) ? inst->GetSerialNumber() : merchant_slot;
- hdr.unknown028 = 0;
- hdr.last_cast_time = ((item->RecastDelay > 1) ? 1212693140 : 0);
- hdr.charges = (stackable ? (item->MaxCharges ? 1 : 0) : charges);
- hdr.inst_nodrop = inst->IsInstNoDrop() ? 1 : 0;
- hdr.unknown044 = 0;
- hdr.unknown048 = 0;
- hdr.unknown052 = 0;
- if (item->EvolvingLevel > 0) {
- hdr.isEvolving = item->EvolvingLevel > 0 ? 1 : 0; //Send evolve -- Not correct but there is no field for MaxEvolve yet..
- hdr.unknown057 = 0;
- hdr.ornaIcon = 0;
- ss.write((const char*)&hdr, sizeof(Underfoot::structs::ItemSerializationHeader));
- Underfoot::structs::EvolvingItem evotop;
- evotop.unknown01 = 0;
- evotop.evoLevel = item->EvolvingLevel;
- evotop.progress = 95.512;
- evotop.Activated = 1;
- evotop.evomaxlevel = 7;
- //evotop.unknown02[0] = 0;
- ss.write((const char*)&evotop, sizeof(Underfoot::structs::EvolvingItem));
- Underfoot::structs::EvolvingIcon evobottom;
- //ORNAMENT IDFILE / ICON
- if (inst->GetOrnamentationAug(ornamentationAugtype)) {
- const Item_Struct *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
- ss.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
- ss.write((const char*)&null_term, sizeof(uint8));
- evobottom.evoIcon = aug_weap->Icon;
- }
- else {
- ss.write((const char*)&null_term, sizeof(uint8));
- evobottom.evoIcon = 0;
- }
- ss.write((const char*)&evobottom, sizeof(Underfoot::structs::EvolvingIcon));
- ss.write((const char*)&null_term, sizeof(uint8)); //unknown060
- }
- else {
- hdr.isEvolving = 0;
- hdr.unknown057 = 0;
- if (inst->GetOrnamentationAug(ornamentationAugtype)) {
- const Item_Struct *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
- hdr.ornaIcon = aug_weap->Icon;
- ss.write((const char*)&hdr, sizeof(Underfoot::structs::ItemSerializationHeader));
- ss.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
- ss.write((const char*)&null_term, sizeof(uint8));
- }
- else {
- hdr.ornaIcon = 0;
- ss.write((const char*)&hdr, sizeof(Underfoot::structs::ItemSerializationHeader));
- ss.write((const char*)&null_term, sizeof(uint8)); //unknown060
- }
- }
- Underfoot::structs::ItemSerializationHeaderFinish hdrf;
- //hdrf.unknown060 = 0; //possibly ornament / special ornament
- hdrf.unknown061 = 0; //possibly ornament / special ornament
- hdrf.isCopied = 0; //Flag for item to be 'Copied'
- hdrf.ItemClass = item->ItemClass;
- ss.write((const char*)&hdrf, sizeof(Underfoot::structs::ItemSerializationHeaderFinish));
- if (strlen(item->Name) > 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement