Exemplo n.º 1
0
        public static void GenerateLod(int lodtime = 60)
        {
            if (!ServerManager.Instance.LodTimes)
            {
                return;
            }

            const int hornTime   = 30;
            const int hornRepawn = 4;
            const int hornStay   = 1;

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

            Observable.Timer(TimeSpan.FromMinutes(0)).Subscribe(x =>
                                                                lodThread.Run(lodtime * 60, hornTime * 60, hornRepawn * 60, hornStay * 60));
            List <MapNpc> portalList = ServerManager.Instance.GetMapNpcsPerVNum(453);

            if (portalList != null)
            {
                foreach (MapNpc npc in portalList)
                {
                    npc.EffectActivated = true;
                }
            }
        }
Exemplo n.º 2
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));
        }