Advertisement
NatedogServer

UF Item Code

Nov 8th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.81 KB | None | 0 0
  1.         hdr.last_cast_time = ((item->RecastDelay > 1) ? 1212693140 : 0);
  2.         hdr.charges = (stackable ? (item->MaxCharges ? 1 : 0) : charges);
  3.         hdr.inst_nodrop = inst->IsInstNoDrop() ? 1 : 0;
  4.         hdr.unknown044 = 0;
  5.         hdr.unknown048 = 0;
  6.         hdr.unknown052 = 0;
  7.         hdr.isEvolving = item->EvolvingLevel > 0 ? 1 : 0;
  8.         ss.write((const char*)&hdr, sizeof(Underfoot::structs::ItemSerializationHeader));
  9.        
  10.         if (item->EvolvingLevel > 0) {
  11.             Underfoot::structs::EvolvingItem evotop;
  12.             evotop.unknown001 = 0;
  13.             evotop.unknown002 = 0;
  14.             evotop.unknown003 = 0;
  15.             evotop.unknown004 = 0;
  16.             evotop.evoLevel = item->EvolvingLevel;
  17.             evotop.progress = 95.512;
  18.             evotop.Activated = 1;
  19.             evotop.evomaxlevel = 7;
  20.             ss.write((const char*)&evotop, sizeof(Underfoot::structs::EvolvingItem));
  21.         }
  22.         //ORNAMENT IDFILE / ICON -
  23.         uint16 ornaIcon = 0;
  24.         if (inst->GetOrnamentationAug(ornamentationAugtype)) {
  25.             const Item_Struct *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
  26.             ss.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
  27.             ss.write((const char*)&null_term, sizeof(uint8));
  28.             ornaIcon = aug_weap->Icon;
  29.         }
  30.         else {
  31.             ss.write((const char*)&null_term, sizeof(uint8)); //no idfile
  32.         }
  33.        
  34.         Underfoot::structs::ItemSerializationHeaderFinish hdrf;
  35.         hdrf.ornamentIcon = ornaIcon;
  36.         hdrf.unknown060 = 0; //This is Always 0.. or it breaks shit..
  37.         hdrf.unknown061 = 0; //possibly ornament / special ornament
  38.         hdrf.isCopied = 0; //Flag for item to be 'Copied'
  39.         hdrf.ItemClass = item->ItemClass;
  40.         ss.write((const char*)&hdrf, sizeof(Underfoot::structs::ItemSerializationHeaderFinish));
  41.  
  42.         if (strlen(item->Name) > 0)
  43.         {
  44.             ss.write(item->Name, strlen(item->Name));
  45.             ss.write((const char*)&null_term, sizeof(uint8));
  46.         }
  47.         else
  48.         {
  49.             ss.write((const char*)&null_term, sizeof(uint8));
  50.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement