public static void Serialize(uLink.BitStream stream, object value, params object[] codecOptions) { ItemSample itemObj = value as ItemSample; byte[] buff = PETools.Serialize.Export(w => { itemObj.Export4Net(w); }); stream.WriteBytes(buff); }
public static object Deserialize(uLink.BitStream stream, params object[] codecOptions) { byte[] buff = stream.ReadBytes(); ItemSample itemObj = new ItemSample(); PETools.Serialize.Import(buff, r => { itemObj.Import(r); }); return(itemObj); }
void OnSetRewardItemContent(Grid_N grid) { int item_id = _rewardItemIds[grid.ItemIndex]; int item_count = _rewardItemCount[grid.ItemIndex]; //ItemAsset.ItemProto item_proto = ItemAsset.ItemProto.GetItemData(item_id); ItemAsset.ItemSample sample = new ItemAsset.ItemSample(item_id, item_count); grid.SetItem(sample); }
public bool DelateSkillCD(int protoId) { ItemSample item = Get(protoId); if (null == item) { return(false); } return(mItems.Remove(protoId)); }
/* bool mIsinskillcd = false ; * public bool IsInskillCd * { * get * { * return mIsinskillcd ; * } * set * { * mIsinskillcd = value ; * } * } */ public bool IsInSkillCD(int protoId) { ItemSample item = Get(protoId); if (item == null) { return(false); } else { return(true); } }
public void AddSkillCD(ItemSample Item) { if (null == Item) { return; } if (Item.protoData.skillId == 0) { return; } mItems[Item.protoId] = Item; }
public float GetFillcount(int id) { ItemSample item = Get(id); if (item == null) { return(0); } else { return(mFillcount); } }
public override void SetItem(ItemAsset.ItemSample itemGrid, bool showNew = false) { base.SetItem(itemGrid, showNew); this.UpdateQuickBarKeyState(); }