public IEnumerator OnServerStart(Coroutine co, ActivityService _this) { //Thread.Sleep(10000); ActivityServer.Instance.Start(_this); SpeMonsterManager.Init(); WorldBossManager.Init(); InAppPurchase.Init(); MieShiManager.Init(); BossHomeManager.Init(); AcientBattleManager.Init(); GeneralActivityManager.Init(); ServerMysteryStoreManager.Init(); ServerBlackStoreManager.Init(); ActivityServer.Instance.IsReadyToEnter = true; ChickenManager.Init(); _this.TickDuration = ActivityServerControl.Performance; var __this = (ActivityServerControl)_this; __this.payDbManagerManager.Init(_this); __this.WebRequestManager = new RequestManager(__this); var timesp = DateTime.Now - DateTime.Parse("1970-1-1"); var milliseconds = timesp.TotalMilliseconds; __this.udidSeed = (long)milliseconds % 100000000000L; __this.Started = true; yield break; }
public IEnumerator ApplyChickenRankData(Coroutine coroutine, ActivityCharacterProxy _this, ApplyChickenRankDataInMessage msg) { var data = ChickenManager.ApplyChickenRank(msg.Request.CharacterId); msg.Response = data; msg.Reply((int)ErrorCodes.OK); yield break; }
public IEnumerator OnServerStop(Coroutine co, ActivityService _this) { MieShiManager.UnInit(); ActivityServer.Instance.DB.Dispose(); ((ActivityServerControl)_this).payDbManagerManager.Stop(); ((ActivityServerControl)_this).WebRequestManager.Stop(); ChickenManager.UnInit(); yield break; }
//读取数据 private IEnumerator ReadDb(Coroutine coroutine) { var tasks = ActivityServer.Instance.DB.Get <DBChickenRankData>(coroutine, DataCategory.Chicken, GetDbName()); yield return(tasks); if (tasks.Data == null) { ChickenManager.InitByBase(); yield break; } PlayerLog.WriteLog((int)LogType.GetCheckenData, "--------------------GetCheckenData--------------------s={0}"); foreach (var lodedata in tasks.Data.RankList) { ChickenManager.mDbData.Add(lodedata); } ChickenManager.InitByBase(); }
public IEnumerator SSSyncChickenScore(Coroutine coroutine, ActivityService _this, SSSyncChickenScoreInMessage msg) { ChickenManager.SaveChickenScore(msg.Request.RankData); yield return(null); }