예제 #1
0
        //初始化ServerDb
        public void PushServerData(DBAuctionItemServer dbServer)
        {
            dbs[dbServer.ServerId] = dbServer;
            var del = new List <long>();

            foreach (var item in dbServer.Items)
            {
                var over = DateTime.FromBinary(item.Value.OverTime);
                if (over < DateTime.Now)
                {
                    del.Add(item.Key);
                    continue;
                }
                AddItem(new Auctions {
                    serverId = dbServer.ServerId, dbData = item.Value
                }, false);
            }
            foreach (var l in del)
            {
                dbServer.Items.Remove(l);
            }
        }
예제 #2
0
        private IEnumerator SaveOne(Coroutine coroutine, DBAuctionItemServer value, string dbKeyName)
        {
            var ret = TeamServer.Instance.DB.Set(coroutine, DataCategory.TeamAuctions, dbKeyName, value);

            yield return(ret);
        }