private void GetNews(BaseRegion region)
        {
            BackgroundWorker worker = new BackgroundWorker();

            worker.DoWork += delegate(object s, DoWorkEventArgs args)
            {
                string newsJSON = "";
                using (WebClient client = new WebClient())
                {
                    newsJSON = client.DownloadString(region.NewsAddress);
                }
                JavaScriptSerializer        serializer       = new JavaScriptSerializer();
                Dictionary <string, object> deserializedJSON = serializer.Deserialize <Dictionary <string, object> >(newsJSON);
                newsList = deserializedJSON["news"] as ArrayList;
                ArrayList promoList = deserializedJSON["promos"] as ArrayList;
                foreach (Dictionary <string, object> objectPromo in promoList)
                {
                    newsList.Add(objectPromo);
                }
            };

            worker.RunWorkerCompleted += delegate(object s, RunWorkerCompletedEventArgs args)
            {
                ParseNews();
            };

            worker.RunWorkerAsync();
        }
        private void RecordButton_Click(object sender, RoutedEventArgs e)
        {
            var objectGame = gameList[SelectedGame];
            Dictionary <string, object> SpectatorGame = objectGame as Dictionary <string, object>;
            string key        = "";
            int    gameId     = 0;
            string platformId = "";

            foreach (KeyValuePair <string, object> pair in SpectatorGame)
            {
                if (pair.Key == "gameId")
                {
                    gameId = (int)pair.Value;
                }
                if (pair.Key == "observers")
                {
                    Dictionary <string, object> keyArray = pair.Value as Dictionary <string, object>;
                    foreach (KeyValuePair <string, object> keyArrayPair in keyArray)
                    {
                        if (keyArrayPair.Key == "encryptionKey")
                        {
                            key = keyArrayPair.Value as string;
                        }
                    }
                }
                if (pair.Key == "platformId")
                {
                    platformId = pair.Value as string;
                }
            }

            BaseRegion region = BaseRegion.GetRegion((string)SpectatorComboBox.SelectedValue);
            //region.SpectatorIpAddress, key, gameId, platformId
            var recorder = new ReplayRecorder(region.SpectatorIpAddress + ":8088", gameId, platformId, key);
        }
Exemple #3
0
 public Client(BaseRegion region, string version)
 {
     _heartbeatCount = 0;
     _region         = region;
     _version        = version;
     _client         = new RtmpClient(new Uri(string.Format("rtmps://{0}:2099", region.Server)), GetContext(), ObjectEncoding.Amf3);
 }
Exemple #4
0
        public void ChangeSpectatorRegion(BaseRegion region)
        {
            try
            {
                // @TODO: Move to global worker to prevent mutiple requests on fast region switch
                var worker = new BackgroundWorker();
                worker.DoWork += delegate
                {
                    try
                    {
                        string spectatorJson;
                        using (var client = new WebClient())
                            spectatorJson = client.DownloadString(region.SpectatorLink + "featured");

                        var serializer       = new JavaScriptSerializer();
                        var deserializedJson = serializer.Deserialize <Dictionary <string, object> >(spectatorJson);
                        GameList = deserializedJson["gameList"] as ArrayList;
                    }
                    catch (WebException)
                    {
                        Client.Log("Spectator JSON download timed out.");
                    }
                };

                worker.RunWorkerCompleted += (s, args) => ParseSpectatorGames();
                worker.RunWorkerAsync();
            }
            catch
            {
            }
        }
Exemple #5
0
        public RegionSpawner(DynamicJson json, JsonSerializerOptions options) : base(json, options)
        {
            json.GetProperty("map", options, out Map map);
            json.GetProperty("region", options, out string spawnRegion);

            m_SpawnRegion = Region.Find(spawnRegion, map) as BaseRegion;
            m_SpawnRegion?.InitRectangles();
        }
Exemple #6
0
 private void SpectatorComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (SpectatorComboBox.SelectedIndex != -1 && SpectatorComboBox.SelectedValue != null)
     {
         BaseRegion region = BaseRegion.GetRegion((string)SpectatorComboBox.SelectedValue);
         ChangeSpectatorRegion(region);
     }
 }
Exemple #7
0
 private void RefreshTimer_Tick(object sender, EventArgs e)
 {
     if (SpectatorComboBox.SelectedIndex != -1 && SpectatorComboBox.SelectedValue != null)
     {
         BaseRegion region = BaseRegion.GetRegion((string)SpectatorComboBox.SelectedValue);
         ChangeSpectatorRegion(region);
     }
 }
Exemple #8
0
        public void Mark(Mobile m)
        {
            m_Marked = true;

            bool setDesc = false;

            if (EraAOS)
            {
                m_House = BaseHouse.FindHouseAt(m);

                if (m_House == null)
                {
                    m_Target    = m.Location;
                    m_TargetMap = m.Map;
                }
                else
                {
                    HouseSign sign = m_House.Sign;

                    m_Description = sign != null ? sign.Name : null;

                    if (m_Description == null || (m_Description = m_Description.Trim()).Length == 0)
                    {
                        m_Description = "an unnamed house";
                    }

                    setDesc = true;

                    int x = m_House.BanLocation.X;
                    int y = m_House.BanLocation.Y + 2;
                    int z = m_House.BanLocation.Z;

                    Map map = m_House.Map;

                    if (map != null && !map.CanFit(x, y, z, 16, false, false))
                    {
                        z = map.GetAverageZ(x, y);
                    }

                    m_Target    = new Point3D(x, y, z);
                    m_TargetMap = map;
                }
            }
            else
            {
                m_House     = null;
                m_Target    = m.Location;
                m_TargetMap = m.Map;
            }

            if (!setDesc)
            {
                m_Description = BaseRegion.GetRuneNameFor(Region.Find(m_Target, m_TargetMap));
            }

            //CalculateHue();
            InvalidateProperties();
        }
Exemple #9
0
 public void AddRange(List <Account> accounts, BaseRegion region, string version)
 {
     _version = version;
     accounts.ForEach((account) =>
     {
         account.FinishedLeveling += OnAccountFinished;
         Bots.Add(new Instance(this, account, version, Bots.Count == 0));
     });
 }
Exemple #10
0
        private void ParseNews(BaseRegion region)
        {
            if (NewsList == null)
            {
                return;
            }

            if (NewsList.Count <= 0)
            {
                return;
            }

            string imageUri = string.Empty;

            foreach (Dictionary <string, object> pair in NewsList)
            {
                var item = new NewsItem
                {
                    Margin = new Thickness(0, 5, 0, 5)
                };
                foreach (var kvPair in pair)
                {
                    if (kvPair.Key == "title")
                    {
                        item.NewsTitle.Content = kvPair.Value;
                    }

                    if (kvPair.Key == "description")
                    {
                        imageUri =
                            ((string)kvPair.Value).Substring(
                                ((string)kvPair.Value).IndexOf("src", StringComparison.Ordinal) + 6);
                        imageUri = imageUri.Remove(imageUri.IndexOf("?itok", StringComparison.Ordinal));

                        string noHtml           = Regex.Replace(((string)kvPair.Value), @"<[^>]+>|&nbsp;", "").Trim();
                        string noHtmlNormalised = Regex.Replace(noHtml, @"\s{2,}", " ");

                        item.DescriptionLabel.Text = noHtmlNormalised;
                    }

                    if (kvPair.Key == "link")
                    {
                        item.Tag = kvPair.Value;
                    }

                    var promoImage = new BitmapImage();
                    promoImage.BeginInit();
                    promoImage.UriSource =
                        new Uri("http://" + region.RegionName + ".leagueoflegends.com/" + imageUri,
                                UriKind.RelativeOrAbsolute);
                    promoImage.CacheOption = BitmapCacheOption.OnLoad;
                    promoImage.EndInit();
                    item.PromoImage.Source = promoImage;
                }
                NewsItemListView.Items.Add(item);
            }
        }
Exemple #11
0
        public void Mark(Mobile m)
        {
            m_Marked      = true;
            m_Target      = m.Location;
            m_TargetMap   = m.Map;
            m_Description = BaseRegion.GetRuneNameFor(Region.Find(m_Target, m_TargetMap));

            InvalidateProperties();
        }
        public void Mark(Mobile m)
        {
            Marked      = true;
            Target      = m.Location;
            TargetMap   = m.Map;
            Description = BaseRegion.GetRuneNameFor(Region.Find(Target, TargetMap));

            CalculateHue();
        }
Exemple #13
0
        /// <summary>
        /// Notify child form that the drag drop event has ended.
        /// </summary>
        /// <param name="appointment">The dragged appointment</param>
        /// <param name="x">The x coordinate it was dropped on.</param>
        /// <param name="y">The y coordinate it was dropped on.</param>
        protected virtual void DragDropEnd(Appointment appointment, int x, int y)
        {
            BaseRegion day = HitTestDayRegion(x, y);

            if (day != null && day.Date.DayOfYear != appointment.DateStart.DayOfYear)
            {
                var newDate = new DateTime(day.Date.Year, day.Date.Month, day.Date.Day, appointment.DateStart.Hour, appointment.DateStart.Minute, appointment.DateStart.Second);
                FireAppointmentMove(appointment, newDate);
            }
        }
Exemple #14
0
            public GhostTeleporter() : base()
            {
                Name = "GhostTeleporter";

                if (m_GhostRegion == null)
                {
                    m_GhostRegion = new BaseRegion("DoomGhostTeleportRegion", Map.Malas, 55, m_GhostRegionBounds);
                    m_GhostRegion.Register();
                }
            }
Exemple #15
0
        public MainPage(BaseRegion region)
        {
            InitializeComponent();
            AppDomain current = AppDomain.CurrentDomain;

            GotPlayerData(Client.LoginPacket);
            SpectatorComboBox.SelectedValue = Client.LoginPacket.CompetitiveRegion;
            ChangeSpectatorRegion(region);
            GetNews(region);
        }
        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            Client.PVPNet = null;
            Client.PVPNet = new PVPNetConnect.PVPNetConnection();

            if (string.IsNullOrEmpty(Properties.Settings.Default.Guid))
            {
                Properties.Settings.Default.Guid = Guid.NewGuid().ToString();
            }
            Properties.Settings.Default.Save();
            SHA1 sha = new SHA1CryptoServiceProvider();

            if (RememberPasswordCheckbox.IsChecked == true)
            {
                Properties.Settings.Default.SavedPassword = LoginPasswordBox.Password.EncryptStringAES(sha.ComputeHash(System.Text.Encoding.UTF8.GetBytes(Properties.Settings.Default.Guid)).ToString());
            }
            else
            {
                Properties.Settings.Default.SavedPassword = "";
            }

            if (RememberUsernameCheckbox.IsChecked == true)
            {
                Properties.Settings.Default.SavedUsername = LoginUsernameBox.Text;
            }
            else
            {
                Properties.Settings.Default.SavedUsername = "";
            }

            Properties.Settings.Default.AutoLogin = (bool)AutoLoginCheckBox.IsChecked;
            Properties.Settings.Default.Region    = (string)RegionComboBox.SelectedValue;
            Properties.Settings.Default.Save();

            HideGrid.Visibility              = Visibility.Hidden;
            ErrorTextBox.Visibility          = Visibility.Hidden;
            LoggingInLabel.Visibility        = Visibility.Visible;
            LoggingInProgressRing.Visibility = Visibility.Visible;
            Client.PVPNet.OnError           += PVPNet_OnError;
            Client.PVPNet.OnLogin           += PVPNet_OnLogin;
            Client.PVPNet.OnMessageReceived += Client.OnMessageReceived;
            BaseRegion SelectedRegion = BaseRegion.GetRegion((string)RegionComboBox.SelectedValue);

            Client.Region = SelectedRegion;
            //Client.Version = "4.18.14";
            if (SelectedRegion.PVPRegion != PVPNetConnect.Region.CS)
            {
                Client.PVPNet.Connect(LoginUsernameBox.Text, LoginPasswordBox.Password, SelectedRegion.PVPRegion, Client.Version);
            }
            else
            {
                Dictionary <String, String> settings = SelectedRegion.Location.LeagueSettingsReader();
                Client.PVPNet.Connect(LoginUsernameBox.Text, LoginPasswordBox.Password, SelectedRegion.PVPRegion, Client.Version, true, settings["host"], settings["lq_uri"], SelectedRegion.Locale);
            }
        }
Exemple #17
0
        private void GetNews(BaseRegion region)
        {
            var worker = new BackgroundWorker();

            worker.DoWork += delegate
            {
                string newsXml;
                using (var webClient = new WebClient())
                {
                    // To skip the 403 Error (Forbbiden)
                    try
                    {
                        webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
                        webClient.Headers.Add("Content-Type", "text/html; charset=UTF-8");
                        webClient.Headers.Add("Accept-Encoding", "gzip,deflate,sdch");
                        webClient.Headers.Add("Referer", "http://google.com/");
                        webClient.Headers.Add("Accept",
                                              "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
                    }
                    catch
                    {
                    }

                    newsXml = webClient.DownloadString(region.NewsAddress);
                }
                string newsJson;
                try
                {
                    var xmlDocument = new XmlDocument();
                    xmlDocument.LoadXml(newsXml);
                    newsJson = JsonConvert.SerializeXmlNode(xmlDocument);
                }
                catch
                {
                    newsJson = newsXml;
                }
                var serializer       = new JavaScriptSerializer();
                var deserializedJson = serializer.Deserialize <Dictionary <string, object> >(newsJson);
                var rss = deserializedJson["rss"] as Dictionary <string, object>;
                if (rss == null)
                {
                    return;
                }

                var channel = rss["channel"] as Dictionary <string, object>;
                if (channel != null)
                {
                    NewsList = channel["item"] as ArrayList;
                }
            };

            worker.RunWorkerCompleted += delegate { ParseNews(region); };

            worker.RunWorkerAsync();
        }
Exemple #18
0
        public MainPage()
        {
            InitializeComponent();
            GotPlayerData(Client.LoginPacket);
            SpectatorComboBox.SelectedValue = Client.LoginPacket.CompetitiveRegion;
            BaseRegion region = BaseRegion.GetRegion(Client.LoginPacket.CompetitiveRegion);

            ChangeSpectatorRegion(region);

            GetNews(region);
        }
Exemple #19
0
        public void Mark(Mobile m)
        {
            m_Marked = true;

            m_House     = null;
            m_Target    = m.Location;
            m_TargetMap = m.Map;

            m_Description = BaseRegion.GetRuneNameFor(Region.Find(m_Target, m_TargetMap));

            CalculateHue();
        }
Exemple #20
0
            public override void Deserialize(GenericReader reader)
            {
                base.Deserialize(reader);

                int version = reader.ReadEncodedInt();

                if (m_GhostRegion == null)
                {
                    m_GhostRegion = new BaseRegion("DoomGhostTeleportRegion", Map.Malas, 55, m_GhostRegionBounds);
                    m_GhostRegion.Register();
                }
            }
Exemple #21
0
        public MainPage()
        {
            InitializeComponent();
            GotPlayerData(Client.LoginPacket);
            SpectatorComboBox.SelectedValue = Client.Region.RegionName;
            BaseRegion region = BaseRegion.GetRegion(Client.Region.RegionName);

            uiLogic.Profile = new ProfilePage();
            ChangeSpectatorRegion(region);
            GetNews(region);
            GetPendingInvites();
            var update = new Timer
            {
                Interval = 5000
            };

            update.Elapsed +=
                (o, e) =>
                Client.ChatClient.Presence(Client.CurrentPresence, Client.GetPresence(), Client.presenceStatus, 0);
            timer.Interval = (5000);
            //timer.Start();

            timer.Elapsed += (o, e) => Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
            {
                string jid =
                    Client.GetChatroomJID(Client.GetObfuscatedChatroomName("legendaryclient", ChatPrefixes.Public),
                                          string.Empty, true);

                GroupChatItem item = Join(jid, "LegendaryClient");
                var chatGroup      = new NotificationChatGroup
                {
                    Tag            = item,
                    GroupTitle     = item.GroupTitle,
                    Margin         = new Thickness(1, 0, 1, 0),
                    GroupLabelName = { Content = item.GroupTitle }
                };
                if (Client.GroupChatItems.All(i => i.GroupTitle != "LegendaryClient"))
                {
                    Client.ChatListView.Items.Add(chatGroup);
                    Client.GroupChatItems.Add(item);
                }

                timer.Stop();
            }));

            /*if (Client.Dev)
             * {
             *  fakeend.Visibility = Visibility.Visible;
             *  testChat.Visibility = Visibility.Visible;
             *  testInvite.Visibility = Visibility.Visible;
             * }*/
        }
Exemple #22
0
        public static void Register(Type type, string regionName, LootCollection collection)
        {
            BaseRegion reg = Find(regionName);

            if (reg != null)
            {
                reg.LootTable.Add(type, collection);
            }
            else
            {
                m_Table.Add(type, collection);
            }
        }
 private void SetupProperties()
 {
     region = BaseRegion.GetRegion(Properties.Settings.Default.Region);
     if (region == null)
     {
         region = new NA();
     }
     regionComboBox.SelectedValue = Properties.Settings.Default.Region;
     usernameBox.Text             = Properties.Settings.Default.Username;
     passwordBox.Password         = Properties.Settings.Default.Password;
     usernameCheck.IsChecked      = Properties.Settings.Default.RememberingUsername;
     passwordCheck.IsChecked      = Properties.Settings.Default.RememberingPassword;
 }
Exemple #24
0
        public async void AddAccount(BaseRegion region, Account account, string version, bool isMaster = false)
        {
            if (Bots.FindAll(b => b.CurrentAccount == account).Count > 0)
            {
                Log.Write("[{0}] account already exists!", account.Username);
                AddAccount(Globals.Region, Program.Accounts.Dequeue(), _version, isMaster);
                return;
            }

            Log.Write("[{0}] Loading...", account.Username);
            var bot = new Instance(this, account, version, isMaster);

            Bots.Add(bot);
            var retValue = StartStatus.Failed;

            try
            {
                for (int i = 0; i < 5; ++i)
                {
                    retValue = await bot.Start();

                    if (retValue == StartStatus.Ok)
                    {
                        return;
                    }
                    else if (retValue == StartStatus.Finished)
                    {
                        break;
                    }
                }

                if (retValue == StartStatus.Failed)
                {
                    Bots.Remove(bot);
                    AddAccount(Globals.Region, Program.Accounts.Dequeue(), _version, bot.Master);
                }

                if (retValue == StartStatus.Finished)
                {
                    OnAccountFinished(bot, null);
                }
            }
            catch (Exception e)
            {
                Log.Write("Exception: {0}", e);
                var nextAccount = Program.Accounts.Dequeue();
                Bots.Remove(bot);
                AddAccount(Globals.Region, nextAccount, _version, bot.Master);
            }
        }
Exemple #25
0
        public virtual void Mark(Mobile m)
        {
            m_Marked    = true;
            LootType    = LootType.Regular;
            m_House     = null;
            m_Target    = m.Location;
            m_TargetMap = m.Map;

            m_Description = BaseRegion.GetRuneNameFor(Region.Find(m_Target, m_TargetMap));
            m_ChargesLeft = (int)m.Skills.Magery.Value;

            //CalculateHue();
            InvalidateProperties();
        }
Exemple #26
0
        /// <summary>
        /// Raises the <see cref="E:System.Windows.Forms.Control.MouseClick"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.Windows.Forms.MouseEventArgs"/> that contains the event data.</param>
        protected override void OnMouseClick(MouseEventArgs e)
        {
            AppointmentGrid.Focus();

            //record the location of a right mouse click
            if (e.Button == MouseButtons.Right)
            {
                //TODO: for right clicks, should all other code be aborted
                LastRightMouseClickCoords = e.Location;
            }

            //handle day clicks
            foreach (BaseRegion day in this.DayRegions)
            {
                if (day.TitleBounds.Contains(e.Location))
                {
                    SelectedSlot = day;
                    this.Invalidate();
                    return;
                }
                if (day.BodyBounds.Contains(e.Location))
                {
                    foreach (AppointmentRegion appt in day.Appointments)
                    {
                        if (appt.Bounds.Contains(e.Location))
                        {
                            SelectedSlot        = day;
                            SelectedAppointment = appt.Appointment;
                            IsUpdating          = true;
                            AppointmentGrid.ClearSelection();
                            foreach (DataGridViewRow row in AppointmentGrid.Rows)
                            {
                                if (row.DataBoundItem == SelectedAppointment)
                                {
                                    row.Selected = true;
                                    AppointmentGrid.CurrentCell = row.Cells[0];
                                    break;
                                }
                            }
                            IsUpdating = false;
                            this.Invalidate();
                            return;
                        }
                    }
                    break;
                }
            }
            base.OnMouseClick(e);
        }
Exemple #27
0
        public OldVoliBot(string username, string password, console _parent, QueueTypes queue)
        {
            parent                         = _parent;
            ipath                          = parent.lolPath; Accountname = username; Password = password; queueType = queue;
            baseRegion                     = BaseRegion.GetRegion(_parent.region.ToString());
            connection.OnConnect          += new LoLConnection.OnConnectHandler(connection_OnConnect);
            connection.OnDisconnect       += new LoLConnection.OnDisconnectHandler(connection_OnDisconnect);
            connection.OnError            += new LoLConnection.OnErrorHandler(connection_OnError);
            connection.OnLogin            += new LoLConnection.OnLoginHandler(connection_OnLogin);
            connection.OnLoginQueueUpdate += new LoLConnection.OnLoginQueueUpdateHandler(connection_OnLoginQueueUpdate);
            connection.OnMessageReceived  += new LoLConnection.OnMessageReceivedHandler(connection_OnMessageReceived);
            string pass = Regex.Replace(password, @"\s+", "");

            connection.Connect(Accountname, pass, baseRegion.PVPRegion, _parent.currentVersion + "." + Config.clientSubVersion);
        }
        private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (loaded)
            {
                var    comboBox   = sender as ComboBox;
                string tempRegion = (String)comboBox.SelectedValue;
                Console.WriteLine("Region is " + tempRegion);
                region = BaseRegion.GetRegion(tempRegion);

                Properties.Settings.Default.Region = tempRegion;
                Properties.Settings.Default.Save();
                ConfigurationManager.RefreshSection("userSettings");
            }
            loaded = true;
        }
Exemple #29
0
        public MainPage()
        {
            InitializeComponent();
            curentlyRecording = new List <int>();
            AppDomain current = AppDomain.CurrentDomain;

            GotPlayerData(Client.LoginPacket);
            SpectatorComboBox.SelectedValue = Client.Region.RegionName;
            BaseRegion region = BaseRegion.GetRegion(Client.Region.RegionName);

            uiLogic.CreateProfile(Client.LoginPacket.AllSummonerData.Summoner.Name);
            ChangeSpectatorRegion(region);
            GetNews(region);
            var update = new Timer();

            update.Interval = 5000;
            update.Elapsed +=
                (o, e) =>
            {
                Client.ChatClient.Presence(Client.CurrentPresence, Client.GetPresence(), Client.presenceStatus, 0);
            };
            timer.Interval = (5000);
            //timer.Start();

            timer.Elapsed += (o, e) =>
            {
                Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
                {
                    string JID =
                        Client.GetChatroomJID(Client.GetObfuscatedChatroomName("legendaryclient", ChatPrefixes.Public),
                                              string.Empty, true);

                    GroupChatItem item               = Join(JID, "LegendaryClient");
                    var ChatGroup                    = new NotificationChatGroup();
                    ChatGroup.Tag                    = item;
                    ChatGroup.GroupTitle             = item.GroupTitle;
                    ChatGroup.Margin                 = new Thickness(1, 0, 1, 0);
                    ChatGroup.GroupLabelName.Content = item.GroupTitle;
                    if (!Client.GroupChatItems.Any(i => i.GroupTitle == "LegendaryClient"))
                    {
                        Client.ChatListView.Items.Add(ChatGroup);
                        Client.GroupChatItems.Add(item);
                    }

                    timer.Stop();
                }));
            };
        }
Exemple #30
0
 private static void processContainer(PlayerVendor vendor, Container container)
 {
     foreach (Item i in container.Items)
     {
         VendorItem vi = vendor.GetVendorItem(i);
         if (vi != null)
         {
             if (vi.IsForSale)
             {
                 MyVendorItem mvi = new MyVendorItem();
                 mvi.Name        = vi.Item is BaseContainer ? "container" : StringUtils.GetString(vi.Item.Name, Sphere.ComputeName(vi.Item));
                 mvi.Description = vi.Description;
                 mvi.Price       = vi.Price;
                 if (vi.Item is CommodityDeed)
                 {
                     Item commodity = (vi.Item as CommodityDeed).Commodity;
                     if (commodity == null) // skip empty deeds
                     {
                         continue;
                     }
                     mvi.Amount = commodity.Amount;
                     mvi.Name  += " - " + Sphere.ComputeName(commodity);
                 }
                 else
                 {
                     mvi.Amount = vi.Item.Amount;
                 }
                 if (mvi.Amount != 0)
                 {
                     mvi.PricePer = mvi.Price / mvi.Amount;
                 }
                 else
                 {
                     mvi.PricePer = mvi.Price;
                 }
                 mvi.VendorName = vendor.Name;
                 mvi.OwnerName  = vendor.Owner.Name;
                 mvi.Location   = StringUtils.GetString(vendor.Region.Name, BaseRegion.GetRuneNameFor(vendor.Region)) + " " + vendor.Location.X + "," + vendor.Location.Y;
                 m_VendorItems.Add(mvi);
             }
             else if (vi.Item is Container)
             {
                 processContainer(vendor, vi.Item as Container);
             }
         }
     }
 }