Esempio n. 1
0
 public static void Serialize(this Item item, Packet packet)
 {
     packet.WriteByte(item.Slot);
     packet.WriteInt32(item.ItemId);
     packet.WriteUInt32(0x00000000); //EC D9 14 91  (Serial Number)
     packet.WriteX(item.StackSize);
     packet.WriteX(0);               //CF 46 00 00  (Hitpoints => Current Durability?)
     packet.WriteX(0);               //18 47 00 00  (Maximum Hitpoints => Maximum Durability?)
     packet.WriteUInt32(0x00000000); //00 00 00 00  (Word => ?)
     packet.WriteByte(0x00);         //00  (Ability Option => ?)
     packet.WriteByte(0x00);         //00  (Item Resistance => ?)
     packet.WriteByte(0x00);         //00  (Resistance Ability Option => ?)
     packet.WriteX(0x00000000);      //00 00 00 00  (Keep Time)
     packet.WriteByte(0x00);         //00  (Item Lock)
     packet.WriteUInt32(0x00000000); //00 00 00 00  (Bind End Time)
     packet.WriteByte(0x00);         //00  (Stability => ?)
     packet.WriteByte(0x00);         //00  (Quality => ?)
     packet.WriteByte(0x00);         //00  (Ability Rate => ?)
     packet.WriteX(0);               //00 00 00 00  (Use Time => ?)
     packet.WriteX(0);               //00 00 00 00  (Buy 'tm' => Buy Time?)
     packet.WriteX(0);               //00 00 00 00  (Price => Sell/Buy?)
     packet.WriteX(0);               //00 00 00 00  (Pay 银币 => ?)
     packet.WriteX(0);               //00 00 00 00  (Free 银币 => ?)
     packet.WriteUInt32(Constants.ServerId);
     packet.WriteByte(0);            //Attributes
 }