public GameClient()
        {
            HpRegenTimer = new GameServerTimer(
                TimeSpan.FromMilliseconds(ServerContext.Config.RegenRate));

            MpRegenTimer = new GameServerTimer(
                TimeSpan.FromMilliseconds(ServerContext.Config.RegenRate / 2));
        }
        private void SetupRegenTimers()
        {
            var HpregenRate = ServerContext.Config.RegenRate;
            var MpregenRate = ServerContext.Config.RegenRate / 2;

            HpRegenTimer = new GameServerTimer(
                TimeSpan.FromMilliseconds(HpregenRate));
            MpRegenTimer = new GameServerTimer(
                TimeSpan.FromMilliseconds(MpregenRate));
        }
        private void SetupRegenTimers()
        {
            var HpregenRate = 200 / Aisling.Con * ServerContext.Config.RegenRate * 100 / 100 * 1000;
            var MpregenRate = 200 / Aisling.Wis * ServerContext.Config.RegenRate * 100 / 100 * 1000;

            HpRegenTimer = new GameServerTimer(
                TimeSpan.FromMilliseconds(1000 + HpregenRate));
            MpRegenTimer = new GameServerTimer(
                TimeSpan.FromMilliseconds(1000 + MpregenRate));
        }
示例#4
0
        public void InitializeGameServer()
        {
            ServerTimer   = new GameServerTimer(TimeSpan.FromMilliseconds(ServerContext.Config.MinimalLatency));
            ObjectFactory = new ObjectService();

            Components = new Dictionary <Type, GameServerComponent>
            {
                [typeof(MonolithComponent)]    = new MonolithComponent(this),
                [typeof(DaytimeComponent)]     = new DaytimeComponent(this),
                [typeof(MundaneComponent)]     = new MundaneComponent(this),
                [typeof(MessageComponent)]     = new MessageComponent(this),
                [typeof(ObjectComponent)]      = new ObjectComponent(this),
                [typeof(PingComponent)]        = new PingComponent(this),
                [typeof(ServerCacheComponent)] = new ServerCacheComponent(this)
            };

            Console.WriteLine(Components.Count + " Server Components loaded.");
        }