Example #1
0
        internal static void UpdateSelectedItems(int i)
        {
            List <DressItemNew> items = RazorEnhanced.Settings.Dress.ItemsRead(DressListName);

            if (items.Count != Assistant.Engine.MainWindow.DressListView.Items.Count)
            {
                return;
            }

            ListViewItem lvi = Assistant.Engine.MainWindow.DressListView.Items[i];
            DressItemNew old = items[i];

            if (lvi != null && old != null)
            {
                DressItemNew item = new Dress.DressItemNew(old.Name, old.Layer, old.Serial, lvi.Checked);
                RazorEnhanced.Settings.Dress.ItemReplace(RazorEnhanced.Dress.DressListName, i, item);
            }
        }
Example #2
0
        internal static void ReadPlayerDress()
        {
            if (World.Player == null)             // non loggato
            {
                AddLog("You are not logged in game!");
                return;
            }

            RazorEnhanced.Settings.Dress.ItemClear(Assistant.Engine.MainWindow.DressListSelect.Text);

            foreach (Layer l in LayerList)
            {
                Assistant.Item layeritem = Assistant.World.Player.GetItemOnLayer(l);
                if (layeritem == null)                 // slot vuoto
                {
                    continue;
                }

                RazorEnhanced.Dress.DressItemNew itemtoinsert = new DressItemNew(layeritem.Name, l, layeritem.Serial, true);
                RazorEnhanced.Settings.Dress.ItemInsert(Assistant.Engine.MainWindow.DressListSelect.Text, itemtoinsert);
            }

            RazorEnhanced.Dress.RefreshItems();
        }