コード例 #1
0
 public static void SendPackageVP(WriteBuffer pw, Session p, uint _itemid, uint _itemuid, byte itemtype, int quantity, int valuePrice, bool flag = false, byte gradeid = 0)
 {
     pw.UInt(_itemid);
     pw.Int(1);
     pw.UInt(_itemuid);
     pw.Int(quantity);
     pw.Int(quantity);
     pw.Byte(0);
     pw.Byte(gradeid);
     pw.HexArray("00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00");
     pw.Byte(itemtype);
     pw.HexArray("00 00 00 00 00 00 00 00 00 00 00");
     pw.Byte(p.Account.CurrentCharacter);
     pw.HexArray("00 00 00 00 00 00 00 00 FF FF FF 9D");
     pw.Int((p.Account.VirtualPoints) - (valuePrice));
     pw.Int(0);
     pw.Int(valuePrice);
     pw.Byte(0);
     if (flag)
     {
         p.Inventory.UpdateItem(p.Account.Login, _itemid, quantity, _itemuid);
     }
     else
     {
         p.Inventory.AddItem(p.Account.Login, _itemid, quantity, _itemuid, gradeid);
     }
 }