public static IEnumerable <ShopPacket> GetShopsPackets(this IMapLayer layer)
        {
            IEnumerable <ShopPacket> tmp     = layer.GetEntitiesByType <INpcEntity>(VisualType.Npc).Where(s => s.HasShop).Select(s => s.GenerateShopPacket());
            IEnumerable <ShopPacket> players = layer.GetEntitiesByType <IPlayerEntity>(VisualType.Character).Where(s => s.HasShop).Select(s => s.GenerateShopPacket());

            return(tmp.Union(players));
        }
 public static IEnumerable <GpPacket> GetPortalsPackets(this IMapLayer map)
 {
     return(map.GetEntitiesByType <IPortalEntity>(VisualType.Portal)?.Select(s => s.Portal.GenerateGpPacket()));
 }
 public static IEnumerable <PairyPacket> GetPairyPackets(this IMapLayer layer, IPlayerEntity player)
 {
     return(layer.GetEntitiesByType <IPlayerEntity>(VisualType.Character).Select(s => s == player ? null : s.GeneratePairyPacket()));
 }