Ejemplo n.º 1
0
        public static void GenerateLod(int lodtime = 120)
        {
            const int HornTime   = 30;
            const int HornRepawn = 4;
            const int HornStay   = 1;

            EventHelper.Instance.RunEvent(new EventContainer(ServerManager.GetMapInstance(ServerManager.GetBaseMapInstanceIdByMapId(98)), EventActionType.NPCSEFFECTCHANGESTATE, true));
            LODThread lodThread = new LODThread();

            Observable.Timer(TimeSpan.FromMinutes(0)).Subscribe(X => lodThread.Run(lodtime * 60, HornTime * 60, HornRepawn * 60, HornStay * 60));
        }
Ejemplo n.º 2
0
        public static void GenerateLod()
        {
            const int LOD_TIME          = 60;
            const int HORN_TIME         = 30;
            const int HORN_STAY_TIME    = 1;
            const int HORN_RESPAWN_TIME = 4;

            EventHelper.Instance.RunEvent(new EventContainer(ServerManager.GetMapInstance(ServerManager.GetBaseMapInstanceIdByMapId(98)), EventActionType.NPCSEFFECTCHANGESTATE, true));
            LODThread lodThread = new LODThread();

            Observable.Timer(TimeSpan.FromMinutes(0)).Subscribe(s => lodThread.Run(LOD_TIME * 60, (HORN_TIME + 1) * 60, (HORN_RESPAWN_TIME + HORN_STAY_TIME) * 60, HORN_STAY_TIME * 60));
        }