public static void Load(ReceiveGPacket p) { long playerId = p.readQ(); long objId = p.readQ(); int itemid = p.readD(); int equip = p.readC(); int category = p.readC(); uint count = p.readUD(); Account player = AccountManager.getAccount(playerId, true); if (player == null) { return; } ItemsModel item = player._inventory.getItem(objId); if (item == null) { player._inventory.AddItem(new ItemsModel { _objId = objId, _id = itemid, _equip = equip, _count = count, _category = category, _name = "" }); } else { item._count = count; } }
public static void Load(ReceiveGPacket p) { long id = p.readQ(); long num1 = p.readQ(); int num2 = p.readD(); int num3 = (int)p.readC(); int num4 = (int)p.readC(); uint num5 = p.readUD(); Account account = AccountManager.getAccount(id, true); if (account == null) { return; } ItemsModel itemsModel = account._inventory.getItem(num1); if (itemsModel == null) { account._inventory.AddItem(new ItemsModel() { _objId = num1, _id = num2, _equip = num3, _count = num5, _category = num4, _name = "" }); } else { itemsModel._count = num5; } }