Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- hdr.isEvolving = item->EvolvingLevel > 0 ? 1 : 0;
- ss.write((const char*)&hdr, sizeof(Underfoot::structs::ItemSerializationHeader));
- if (item->EvolvingLevel > 0) {
- Underfoot::structs::EvolvingItem evotop;
- evotop.unknown001 = 0;
- evotop.unknown002 = 0;
- evotop.unknown003 = 0;
- evotop.unknown004 = 0;
- evotop.evoLevel = item->EvolvingLevel;
- evotop.progress = 95.512;
- evotop.Activated = 1;
- evotop.evomaxlevel = 7;
- ss.write((const char*)&evotop, sizeof(Underfoot::structs::EvolvingItem));
- }
- //ORNAMENT IDFILE / ICON -
- uint16 ornaIcon = 0;
- 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));
- ornaIcon = aug_weap->Icon;
- }
- else {
- ss.write((const char*)&null_term, sizeof(uint8)); //no idfile
- }
- Underfoot::structs::ItemSerializationHeaderFinish hdrf;
- hdrf.ornamentIcon = ornaIcon;
- hdrf.unknown060 = 0; //This is Always 0.. or it breaks shit..
- 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)
- {
- ss.write(item->Name, strlen(item->Name));
- ss.write((const char*)&null_term, sizeof(uint8));
- }
- else
- {
- ss.write((const char*)&null_term, sizeof(uint8));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement