Пример #1
0
        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;
        }
Пример #2
0
        public IEnumerator SSGetBlackStoreItems(Coroutine coroutine,
                                                ActivityService _this,
                                                SSGetBlackStoreItemsInMessage msg)
        {
            var serverId = msg.Request.ServerId;
            var tempList = new List <StoneItem>();
            var result   = ServerBlackStoreManager.ApplyStoreInfo(serverId, ref tempList);

            if (result != (int)ErrorCodes.OK)
            {
                msg.Reply(result);
                yield break;
            }
            //Logger.Warn("GetBlackStoreItems--------------serverId : {0}", serverId);
            msg.Response.items.AddRange(tempList);
            msg.Reply((int)ErrorCodes.OK);
            yield break;
        }