Пример #1
0
        public List <IPacket> GetMapItems(RegionType language)
        {
            var packets = new List <IPacket>();

            // TODO: Parallelize getting of items of mapinstance
            Portals.ForEach(s => packets.Add(s.GenerateGp()));

            Monsters.ForEach(s =>
            {
                packets.Add(s.GenerateIn());

                if (s.Size != 10)
                {
                    packets.Add(s.GenerateCharSc());
                }
            });

            Npcs.ForEach(s =>
            {
                packets.Add(s.GenerateIn());

                if (s.Shop != null)
                {
                    var shopPacket = s.GenerateShop(language);
                    packets.Add(shopPacket);
                }

                if (s.Size != 10)
                {
                    packets.Add(s.GenerateCharSc());
                }
            });
            MapItems.Values.ToList().ForEach(s => packets.Add(s.GenerateIn()));
            return(packets);
        }
Пример #2
0
        public List <PacketDefinition> GetMapItems()
        {
            var packets = new List <PacketDefinition>();

            // TODO: Parallelize getting of items of mapinstance
            Portals.ForEach(s => packets.Add(s.GenerateGp()));
            Monsters.ForEach(s =>
            {
                packets.Add(s.GenerateIn());

                if (s.Size != 10)
                {
                    packets.Add(s.GenerateCharSc());
                }
            });

            Npcs.ForEach(s =>
            {
                packets.Add(s.GenerateIn());

                if (s.Shop != null)
                {
                    packets.Add(s.GenerateShop());
                }

                if (s.Size != 10)
                {
                    packets.Add(s.GenerateCharSc());
                }
            });
            MapItems.Values.ToList().ForEach(s => packets.Add(s.GenerateIn()));
            return(packets);
        }
Пример #3
0
        public List <string> GetMapItems()
        {
            List <string> packets = new List <string>();

            Sessions.Where(s => s.Character != null && !s.Character.InvisibleGm).ToList().ForEach(s =>
            {
                s.Character.Mates.Where(m => m.IsTeamMember).ToList().ForEach(m => packets.Add(m.GenerateIn()));
            });
            // TODO: Parallelize getting of items of mapinstance
            Portals.ForEach(s => packets.Add(s.GenerateGp()));
            ScriptedInstances.Where(s => s.Type == ScriptedInstanceType.TimeSpace).ToList().ForEach(s => packets.Add(s.GenerateWp()));

            Monsters.ForEach(s =>
            {
                packets.Add(s.GenerateIn());
                if (s.IsBoss)
                {
                    packets.Add(s.GenerateBoss());
                }
            });
            Npcs.ForEach(s => packets.Add(s.GenerateIn()));
            packets.AddRange(GenerateNPCShopOnMap());
            Parallel.ForEach(DroppedList.GetAllItems(), session => packets.Add(session.GenerateIn()));

            Buttons.ForEach(s => packets.Add(s.GenerateIn()));
            packets.AddRange(GenerateUserShops());
            packets.AddRange(GeneratePlayerShopOnMap());
            return(packets);
        }
Пример #4
0
        public List <PacketDefinition> GetMapItems()
        {
            var packets = new List <PacketDefinition>();

            // TODO: Parallelize getting of items of mapinstance
            Portals.ForEach(s => packets.Add(s.GenerateGp()));
            Monsters.ForEach(s => packets.Add(s.GenerateIn()));
            Npcs.ForEach(s => packets.Add(s.GenerateIn()));
            return(packets);
        }
Пример #5
0
        public List <string> GetMapItems()
        {
            List <string> packets = new List <string>();

            Portals.ForEach(s => packets.Add(s.GenerateGp()));
            ScriptedInstances.Where(s => s.Type == ScriptedInstanceType.TimeSpace).ToList().ForEach(s => packets.Add(s.GenerateWp()));
            Monsters.ForEach(s =>
            {
                packets.Add(s.GenerateIn());
                if (s.IsBoss)
                {
                    packets.Add(s.GenerateBoss());
                }
            });
            Npcs.ForEach(s => { packets.Add(s.GenerateIn()); });
            packets.AddRange(GenerateNpcShopOnMap());
            Parallel.ForEach(DroppedList.Select(s => s.Value), session => { packets.Add(session.GenerateIn()); });
            Buttons.ForEach(s => { packets.Add(s.GenerateIn()); });
            packets.AddRange(GenerateUserShops());
            packets.AddRange(GeneratePlayerShopOnMap());
            return(packets);
        }
Пример #6
0
        public List <string> GetMapItems()
        {
            List <string> packets = new List <string>();

            Sessions.Where(s => s.Character != null && !s.Character.InvisibleGm).ToList().ForEach(s =>
            {
                s.Character.Mates.Where(m => m.IsTeamMember).ToList().ForEach(m => packets.Add(m.GenerateIn()));
            });

            Portals.ForEach(s => packets.Add(s.GenerateGp()));
            TimeSpaces.ForEach(s => packets.Add(s.GenerateWp()));

            Monsters.ForEach(s => packets.Add(s.GenerateIn()));
            Npcs.ForEach(s => packets.Add(s.GenerateIn()));
            packets.AddRange(GenerateNPCShopOnMap());
            DroppedList.GetAllItems().ForEach(s => packets.Add(s.GenerateIn()));

            Buttons.ForEach(s => packets.Add(s.GenerateIn()));
            packets.AddRange(GenerateUserShops());
            packets.AddRange(GeneratePlayerShopOnMap());
            return(packets);
        }
Пример #7
0
        public List <string> GetMapItems()
        {
            List <string> packets = new List <string>();

            Sessions.Where(s => s.Character?.InvisibleGm == false).ToList().ForEach(s => s.Character.Mates.Where(m => m.IsTeamMember).ToList().ForEach(m => packets.Add(m.GenerateIn())));
            Portals.ForEach(s => packets.Add(s.GenerateGp()));
            ScriptedInstances.Where(s => s.Type == ScriptedInstanceType.TimeSpace).ToList().ForEach(s => packets.Add(s.GenerateWp()));
            Monsters.ForEach(s =>
            {
                packets.Add(s.GenerateIn());
                if (s.IsBoss)
                {
                    packets.Add(s.GenerateBoss());
                }
            });
            Npcs.ForEach(s => packets.Add(s.GenerateIn()));
            packets.AddRange(GenerateNPCShopOnMap());
            DroppedList.ForEach(s => packets.Add(s.GenerateIn()));
            Buttons.ForEach(s => packets.Add(s.GenerateIn()));
            packets.AddRange(GenerateUserShops());
            packets.AddRange(GeneratePlayerShopOnMap());
            return(packets);
        }