Beispiel #1
0
 private void Remove(StoreOne _this)
 {
     if (_this.trigger != null)
     {
         TeamServerControl.tm.DeleteTrigger(_this.trigger);
         _this.trigger = null;
     }
     _this.mDad.ItemList.Remove(_this.StoreGuid);
 }
Beispiel #2
0
 //尝试加入
 public void TryPushNewItem(StoreOne newItem)
 {
     if (StoreManager.mNewList.Count > 200)
     {
         return;
     }
     if (newItem.lookCount > 9999)
     {
         return;
     }
     PushNewItem(newItem);
 }
Beispiel #3
0
 //心跳
 private void Updata(StoreOne _this)
 {
     _this.UpdataCount++;
     if (_this.UpdataCount >= RemoveCount)
     {
         Remove(_this);
         return;
     }
     if (!_this.isNew)
     {
         StoreManager.TryPushNewItem(_this);
     }
 }
Beispiel #4
0
        //添加一个道具的广播
        public void AddItem(int itemId, int count, int need, ulong cGuid, int level, string name)
        {
            var guid = GetNextId();
            var sl   = GetStoreList(itemId);
            var temp = new StoreOne(sl)
            {
                StoreGuid     = guid,
                ItemId        = itemId,
                Count         = count,
                Need          = need,
                CharacterGuid = cGuid
            };

            sl.ItemList[guid] = temp;
            PushNewItem(temp);
        }
Beispiel #5
0
 public void Construct(StoreOne _this, StoreList d)
 {
     _this.trigger = TeamServerControl.tm.CreateTrigger(DateTime.Now.AddSeconds(5), () => Updata(_this), 5000);
     _this.mDad    = d;
 }
Beispiel #6
0
 //尝试加入
 public static void TryPushNewItem(StoreOne newItem)
 {
     mImpl.TryPushNewItem(newItem);
 }
Beispiel #7
0
 //添加一个新的内容
 private void PushNewItem(StoreOne newItem)
 {
     StoreManager.mNewList.Add(newItem);
 }