Exemple #1
0
        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);
        }
Exemple #2
0
        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);
    }
Exemple #4
0
        public bool DelateSkillCD(int protoId)
        {
            ItemSample item = Get(protoId);

            if (null == item)
            {
                return(false);
            }

            return(mItems.Remove(protoId));
        }
Exemple #5
0
/*		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);
            }
        }
Exemple #6
0
        public void AddSkillCD(ItemSample Item)
        {
            if (null == Item)
            {
                return;
            }
            if (Item.protoData.skillId == 0)
            {
                return;
            }

            mItems[Item.protoId] = Item;
        }
Exemple #7
0
        public float GetFillcount(int id)
        {
            ItemSample item = Get(id);

            if (item == null)
            {
                return(0);
            }
            else
            {
                return(mFillcount);
            }
        }
Exemple #8
0
 public override void SetItem(ItemAsset.ItemSample itemGrid, bool showNew = false)
 {
     base.SetItem(itemGrid, showNew);
     this.UpdateQuickBarKeyState();
 }