Example #1
0
        public async Task CEventRemainTime(GSSession session, CEventRemainTime message)
        {
            var res = new SEventRemainTime {
                EventType = message.EventType
            };

            switch (message.EventType)
            {
            case EventEnterType.DevilSquare:
                var evds = Program.EventManager.GetEvent <DevilSquares>();
                res.RemainTime  = evds.RemainTime;
                res.EnteredUser = evds.Count;
                break;

            case EventEnterType.BloodCastle:
                var evbc = Program.EventManager.GetEvent <DevilSquares>();
                res.RemainTime = evbc.RemainTime;
                break;

            case EventEnterType.ChaosCastle:
                var ev = Program.EventManager.GetEvent <ChaosCastles>();
                res.RemainTime  = ev.RemainTime;
                res.EnteredUser = ev.Count;
                break;

            case EventEnterType.IllusionTemple:
                res.RemainTime = 0;
                break;
            }

            await session.SendAsync(res);
        }
Example #2
0
        public void CEventRemainTime(GSSession session, CEventRemainTime message)
        {
            var res = new SEventRemainTime {
                EventType = message.EventType
            };

            switch (message.EventType)
            {
            case EventEnterType.DevilSquare:
                res.RemainTime = 0;
                break;

            case EventEnterType.BloodCastle:
                res.RemainTime = BloodCastles.RemainTime();
                break;

            case EventEnterType.ChaosCastle:
                res.RemainTime = 0;
                break;

            case EventEnterType.IllusionTemple:
                res.RemainTime = 0;
                break;
            }

            session.SendAsync(res);
        }