Exemplo n.º 1
0
        public static void GenerateRaid(MapInstanceType raidType, byte faction)
        {
            ServerManager.GetMapInstance(ServerManager.GetBaseMapInstanceIdByMapId((short)(129 + faction))).CreatePortal(new Portal()
            {
                SourceMapId      = (short)(129 + faction),
                SourceX          = 53,
                SourceY          = 53,
                DestinationMapId = 0,
                DestinationX     = 1,
                DestinationY     = 1,
                Type             = (short)(9 + faction)
            });

            Act4RaidThread raidThread = new Act4RaidThread();

            Observable.Timer(TimeSpan.FromMinutes(0)).Subscribe(X => raidThread.Run(raidType, faction));
        }
Exemplo n.º 2
0
        public static void GenerateRaid(MapInstanceType raidType, byte faction)
        {
            Guardians = new List <MapMonster>();
            MapInstance bitoren = ServerManager.GetMapInstance(ServerManager.GetBaseMapInstanceIdByMapId(134));

            bitoren.CreatePortal(new Portal
            {
                SourceMapId      = 134,
                SourceX          = 140,
                SourceY          = 100,
                DestinationMapId = 0,
                DestinationX     = 1,
                DestinationY     = 1,
                Type             = (short)(9 + faction)
            });

            #region Guardian Spawning

            Guardians.Add(new MapMonster
            {
                MonsterVNum   = (short)(678 + faction),
                MapX          = 147,
                MapY          = 88,
                MapId         = 134,
                Position      = 2,
                IsMoving      = false,
                MapMonsterId  = bitoren.GetNextMonsterId(),
                ShouldRespawn = false,
                IsHostile     = true
            });
            Guardians.Add(new MapMonster
            {
                MonsterVNum   = (short)(678 + faction),
                MapX          = 149,
                MapY          = 94,
                MapId         = 134,
                Position      = 2,
                IsMoving      = false,
                MapMonsterId  = bitoren.GetNextMonsterId(),
                ShouldRespawn = false,
                IsHostile     = true
            });
            Guardians.Add(new MapMonster
            {
                MonsterVNum   = (short)(678 + faction),
                MapX          = 147,
                MapY          = 101,
                MapId         = 134,
                Position      = 2,
                IsMoving      = false,
                MapMonsterId  = bitoren.GetNextMonsterId(),
                ShouldRespawn = false,
                IsHostile     = true
            });
            Guardians.Add(new MapMonster
            {
                MonsterVNum   = (short)(678 + faction),
                MapX          = 139,
                MapY          = 105,
                MapId         = 134,
                Position      = 2,
                IsMoving      = false,
                MapMonsterId  = bitoren.GetNextMonsterId(),
                ShouldRespawn = false,
                IsHostile     = true
            });
            Guardians.Add(new MapMonster
            {
                MonsterVNum   = (short)(678 + faction),
                MapX          = 132,
                MapY          = 101,
                MapId         = 134,
                Position      = 2,
                IsMoving      = false,
                MapMonsterId  = bitoren.GetNextMonsterId(),
                ShouldRespawn = false,
                IsHostile     = true
            });
            Guardians.Add(new MapMonster
            {
                MonsterVNum   = (short)(678 + faction),
                MapX          = 129,
                MapY          = 94,
                MapId         = 134,
                Position      = 2,
                IsMoving      = false,
                MapMonsterId  = bitoren.GetNextMonsterId(),
                ShouldRespawn = false,
                IsHostile     = true
            });
            Guardians.Add(new MapMonster
            {
                MonsterVNum   = (short)(678 + faction),
                MapX          = 132,
                MapY          = 88,
                MapId         = 134,
                Position      = 2,
                IsMoving      = false,
                MapMonsterId  = bitoren.GetNextMonsterId(),
                ShouldRespawn = false,
                IsHostile     = true
            });

            #endregion

            foreach (MapMonster monster in Guardians)
            {
                monster.Initialize(bitoren);
                bitoren.AddMonster(monster);
                bitoren.Broadcast(monster.GenerateIn());
            }

            Act4RaidThread raidThread = new Act4RaidThread();
            Observable.Timer(TimeSpan.FromMinutes(0)).Subscribe(X => raidThread.Run(raidType, faction));
        }