Esempio n. 1
0
        private void GetGems()
        {
            SetupGemsList();
            foreach (GemSetting gemSetting in Parent.Machine.Utility.BotSettings.GemSettings)
            {
                HudList.HudListRowAccessor row = Gems.AddRow();
                using (HudStaticText text = new HudStaticText())
                {
                    text.Text = gemSetting.Name;
                    row[0]    = text;
                }

                using (HudStaticText text = new HudStaticText())
                {
                    text.Text = gemSetting.Keyword;
                    row[1]    = text;
                }

                using (HudStaticText text = new HudStaticText())
                {
                    text.Text = gemSetting.Heading.ToString();
                    row[2]    = text;
                }
            }
        }
Esempio n. 2
0
        private void LoadSuits()
        {
            try
            {
                foreach (Equipment item in Parent.Machine.Utility.EquipmentSettings.IdleEquipment)
                {
                    HudList.HudListRowAccessor row = IdleEquipmentList.AddRow();
                    using (HudStaticText newItem = new HudStaticText())
                    {
                        newItem.Text = item.Name;
                        row[0]       = newItem;
                    }
                }

                foreach (Equipment item in Parent.Machine.Utility.EquipmentSettings.BuffingEquipment)
                {
                    HudList.HudListRowAccessor row = BuffEquipmentList.AddRow();
                    using (HudStaticText newItem = new HudStaticText())
                    {
                        newItem.Text = item.Name;
                        row[0]       = newItem;
                    }
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 3
0
        void LoginCompleteAdd_Hit(object sender, EventArgs e)
        {
            try
            {
                var command = loginCompleteText.Text;

                if (String.IsNullOrEmpty(command))
                {
                    return;
                }

                loginCompleteText.Text = String.Empty;

                var commands = Settings.SettingsManager.Server.GetOnLoginCompleteCommands(CoreManager.Current.CharacterFilter.Server);

                commands.Add(command);

                Settings.SettingsManager.Server.SetOnLoginCompleteCommands(CoreManager.Current.CharacterFilter.Server, commands);

                HudList.HudListRowAccessor newRow = loginCompleteList.AddRow();

                ((HudStaticText)newRow[0]).Text  = command;
                ((HudPictureBox)newRow[1]).Image = 0x60028FC;
                ((HudPictureBox)newRow[2]).Image = 0x60028FD;
                ((HudPictureBox)newRow[3]).Image = 0x60011F8;
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 4
0
        private void BuffAddEquipment_Hit(object sender, EventArgs e)
        {
            try
            {
                if (Parent.Machine.FinishedInitialScan)
                {
                    if (Parent.Machine.Core.CharacterFilter.Name.Equals(Parent.Machine.BuffingCharacter))
                    {
                        if (!Parent.Machine.Core.Actions.CurrentSelection.Equals(0) && Parent.Machine.Core.CharacterFilter.Name.Equals(Parent.Machine.BuffingCharacter))
                        {
                            foreach (WorldObject item in Parent.Machine.CharacterEquipment)
                            {
                                if (item.Id.Equals(Parent.Machine.Core.Actions.CurrentSelection))
                                {
                                    Equipment newEquipment = new Equipment
                                    {
                                        Id          = item.Id,
                                        Name        = item.Name,
                                        EquipMask   = item.Values(LongValueKey.EquipableSlots),
                                        ObjectClass = item.ObjectClass.ToString()
                                    };

                                    if (!Parent.Machine.Utility.EquipmentSettings.BuffingEquipment.Contains(newEquipment))
                                    {
                                        HudList.HudListRowAccessor row = BuffEquipmentList.AddRow();
                                        using (HudStaticText control = new HudStaticText())
                                        {
                                            control.Text = item.Name;
                                            row[0]       = control;
                                        }

                                        Parent.Machine.Utility.EquipmentSettings.BuffingEquipment.Add(newEquipment);
                                        Parent.Machine.Utility.SaveEquipmentSettings();
                                    }
                                    else
                                    {
                                        Debug.ToChat("This item is already in the buffing suit.");
                                    }

                                    break;
                                }
                            }
                        }
                        else
                        {
                            Debug.ToChat("Make sure you have an item selected.");
                        }
                    }
                    else
                    {
                        Debug.ToChat("You must set the buffing character to this character, or be logged into the buffing character to add equipment.");
                    }
                }
                else
                {
                    Debug.ToChat("Please wait until finished scanning your inventory.");
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 5
0
        private void CreatePopoutList()
        {
            popoutList.ClearColumnsAndRows();
            popoutEvents.Clear();
            popoutList.AddColumn(typeof(HudStaticText), 70, "name");
            popoutList.AddColumn(typeof(HudCheckBox), 30, "?");

            for (int i = 1; i < TabView.TabCount; i++)
            {
                string tabName = TabView.GetTabName(i);
                HudList.HudListRowAccessor newRow = popoutList.AddRow();
                ((HudStaticText)newRow[0]).Text = tabName;
                HudCheckBox temp = new HudCheckBox();

                //Check if tab starts popped out, and check it.
                if (popoutWindows[tabName].visible)
                {
                    temp.Checked = true;
                }

                popoutWindows[tabName].setCheckBox(temp);

                EventHandler tempEH = new EventHandler((s, e) => TogglePopout(s, e, tabName));
                popoutEvents.Add(tabName, tempEH);
                temp.Change += tempEH;
                newRow[1]    = temp;
            }
        }
Esempio n. 6
0
        public CorpseTrackerGUI(IItemTracker <TrackedCorpse> tracker, HudList hudList)
        {
            try
            {
                this.tracker = tracker;
                this.hudList = hudList;

                hudList.ClearColumnsAndRows();

                hudList.AddColumn(typeof(HudStaticText), 53, null);
                hudList.AddColumn(typeof(HudStaticText), 162, null);
                hudList.AddColumn(typeof(HudStaticText), 100, null);
                hudList.AddColumn(typeof(HudStaticText), 0, null);

                HudList.HudListRowAccessor newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text = "Time";
                ((HudStaticText)newRow[1]).Text = "Name";
                ((HudStaticText)newRow[2]).Text = "Coords";
                ((HudStaticText)newRow[3]).Text = "Id";

                tracker.ItemsAdded  += new Action <System.Collections.Generic.ICollection <TrackedCorpse> >(corpseTracker_ItemsAdded);
                tracker.ItemChanged += new Action <TrackedCorpse>(corpseTracker_ItemChanged);
                tracker.ItemRemoved += new Action <TrackedCorpse>(corpseTracker_ItemRemoved);

                hudList.Click += new HudList.delClickedControl(hudList_Click);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 7
0
        override protected void RemoveHandlers(HudList.HudListRowAccessor row, FavoriteQuestsViewData quest)
        {
            // Navigation Button
            var navigation = (HudButton)row[(int)Column.Navigation];

            navigation.MouseEvent -= quest.StartNavigation_ClickHandler;

            // Favorite
            var favorite = (HudCheckBox)row[(int)Column.Favorite];

            favorite.Change -= quest.Favorite_Changed;


            // Priority Up
            var priorityUp = (HudButton)row[(int)Column.PriorityUp];

            priorityUp.MouseEvent -= quest.PriorityUp_ClickHandler;

            // Priority Down
            var priorityDown = (HudButton)row[(int)Column.PriorityDown];

            priorityDown.MouseEvent -= quest.PriorityDown_ClickHandler;

            // Quest Name
            var questName = (HudStaticText)row[(int)Column.QuestName];

            questName.Hit -= quest.QuestName_Hit;
        }
Esempio n. 8
0
        private void SetupGemsList()
        {
            try
            {
                HudList.HudListRowAccessor row = Gems.AddRow();
                using (HudStaticText text = new HudStaticText())
                {
                    text.Text = "Gem";
                    row[0]    = text;
                }

                using (HudStaticText text = new HudStaticText())
                {
                    text.Text = "Keyword";
                    row[1]    = text;
                }
                using (HudStaticText text = new HudStaticText())
                {
                    text.Text = "Heading";
                    row[2]    = text;
                }
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
            }
        }
Esempio n. 9
0
        void CharacterFilter_LoginComplete(object sender, EventArgs e)
        {
            try
            {
                hudView = new HudView("Mag-HUD", 200, 80, new ACImage(Color.Black), false);

                hudView.Visible         = true;
                hudView.UserMinimizable = false;
                hudView.ShowIcon        = false;
                hudView.UserResizeable  = true;
                //View.ClickThrough = true;
                hudView.Theme = HudViewDrawStyle.GetThemeByName("Minimalist Transparent");

                hudView.LoadUserSettings();

                hudListHead = new HudList();
                hudView.Controls.HeadControl = hudListHead;

                hudListHead.Padding       = 0;           // Default: 1
                hudListHead.WPadding      = 0;           // Default: 7
                hudListHead.WPaddingOuter = 0;           // Default: 3

                hudListHead.AddColumn(typeof(HudPictureBox), 16, null);
                hudListHead.AddColumn(typeof(HudStaticText), 999, null);

                HudList.HudListRowAccessor newRow = hudListHead.AddRow();
                ((HudPictureBox)newRow[0]).Image = new ACImage(13107);                 // Major Mana Stone
                //((HudStaticText)newRow[1]).Text = "Cool Stuff Here 0 1 2 3 45 6 7 8sdf 8asdf 8asdf8asdf8asdf";

                hudUpdateTimer.Interval = 1000;
                hudUpdateTimer.Start();
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 10
0
        private void loadCSV()
        {
            raresFound.ClearRows();
            List <string> temp = Util.ImportCSV();

            HudList.HudListRowAccessor testRow2 = raresFound.InsertRow(0);

            foreach (string s in temp)
            {
                string[] split = s.Split(',');
                HudList.HudListRowAccessor testRow = raresFound.InsertRow(0);
                ((HudStaticText)testRow[0]).Text = split[0] + "";
                ((HudStaticText)testRow[1]).Text = split[1].Replace('!', ' ').Trim() + "";
                ((HudStaticText)testRow[2]).Text = split[2] + "";
                ((HudStaticText)testRow[3]).Text = split[3] + "";

                if (split.Length == 5)
                {
                    ((HudStaticText)testRow[4]).Text = split[4] + "";
                }
                else
                {
                    ((HudStaticText)testRow[4]).Text = DateTime.Today.ToString("MM/dd/yy");
                }
            }
        }
Esempio n. 11
0
        private void _processListView_Clicked(HudList listView, int row, int col)
        {
            try
            {
                HudList.HudListRowAccessor acc = listView[row];
                string name   = ((HudStaticText)acc[1]).Text;
                Player player = _playerManager.GetByName(name);

                if (player == null)
                {
                    return;
                }

                _globals.Core.Actions.SelectItem(player.Id);

                if (player.Enemy)
                {
                    return;
                }

                if (col == 2)
                {
                    WorldObjectService.CastHeal(player.Id);
                }

                if (col == 3)
                {
                    WorldObjectService.CastSpell(2082, player.Id);
                }
            } catch (Exception ex) { _logger.Error(ex); }
        }
Esempio n. 12
0
        private void _processPlayerAdd(Player player)
        {
            bool    enemy       = player.Enemy;
            HudList playersView = enemy ? _enemyListView : _friendlyListView;
            int     icon        = enemy ? EnemyIcon : FriendlyIcon;
            D3DObj  playerIcon  = CoreManager.Current.D3DService.MarkObjectWithShape(player.Id, D3DShape.Sphere, Color.Red.ToArgb());

            playerIcon.Scale(enemy ? 0.3f : 0.3f);
            playerIcon.Anchor(player.Id, 0.2f, 0.0f, 0.0f, 2.5f);
            playerIcon.Color = enemy ? Color.FromArgb(200, Color.Red).ToArgb() : Color.FromArgb(220, Color.LightBlue).ToArgb();
            playerIcon.OrientToCamera(true);
            _playerIcons.Add(_playerIconFactory(player.Id, playerIcon));

            HudList.HudListRowAccessor row = playersView.AddRow();
            ((HudPictureBox)row[0]).Image     = icon;
            ((HudStaticText)row[1]).Text      = player.Name;
            ((HudStaticText)row[1]).TextColor = enemy ? Color.Red : Color.LightBlue;

            if (!enemy)
            {
                ((HudStaticText)row[1]).TextColor = Color.LightGreen;
                ((HudPictureBox)row[2]).Image     = 100670841;
                ((HudPictureBox)row[3]).Image     = 100670842;
            }
        }
Esempio n. 13
0
        private void updateList(bool showAll)
        {
            totalRares.ClearRows();
            if (!showAll)
            {
                foreach (KeyValuePair <string, int> entry in rl.getNonZeros())
                {
                    HudList.HudListRowAccessor newRow = totalRares.AddRow();
                    ((HudStaticText)newRow[0]).Text = entry.Key;
                    ((HudStaticText)newRow[1]).Text = $"{entry.Value}";
                }
            }
            else
            {
                foreach (KeyValuePair <string, RareItem> entry in rl.getList())
                {
                    HudList.HudListRowAccessor newRow = totalRares.AddRow();
                    ((HudStaticText)newRow[0]).Text = entry.Key;
                    ((HudStaticText)newRow[1]).Text = $"{entry.Value.count}";
                }
            }

            int count = 0;

            foreach (KeyValuePair <string, RareItem> entry in rl.getList())
            {
                count += entry.Value.count;
            }

            totalInvRares.Text = "Total Rares: " + count;
        }
Esempio n. 14
0
        private void UpdatePkRow(string name, DateTime deathtime, HudList.HudListRowAccessor row, string killer)
        {
            try
            {
                List <string> list = (from f in lib.AuthIds.Split(new char[] { ',' })
                                      select f.Trim()).ToList <string>();

                ((HudPictureBox)row[0]).Image = 100667896;
                ((HudStaticText)row[1]).Text  = this.name;
                if (list.Contains(name + "::Admin") == true || list.Contains(name))
                {
                    ((HudStaticText)row[1]).TextColor = Color.LawnGreen;
                }
                else
                {
                    ((HudStaticText)row[1]).TextColor = Color.Red;
                }
                ((HudStaticText)row[2]).Text = (300 - counter).ToString();
                if (counter >= 290)
                {
                    ((HudStaticText)row[2]).TextColor = Color.Red;
                }
                else
                {
                    ((HudStaticText)row[2]).TextColor = Color.White;
                }
                ((HudStaticText)row[3]).Text      = this.deathtime.ToString("h:mm:ss tt");
                ((HudStaticText)row[3]).TextColor = Color.Red;
                ((HudStaticText)row[5]).Text      = this.killer;
                ((HudStaticText)row[5]).Visible   = false;
            }
            catch (Exception ex) { Repo.RecordException(ex); }
        }
Esempio n. 15
0
        private void AddAdvertisement_Hit(object sender, EventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(NewAdvertisement.Text))
                {
                    HudList.HudListRowAccessor row = Advertisements.AddRow();
                    using (HudStaticText control = new HudStaticText())
                    {
                        string ad = NewAdvertisement.Text;
                        control.Text          = ad;
                        row[0]                = control;
                        NewAdvertisement.Text = "";

                        Advertisement advertisement = new Advertisement
                        {
                            Message = ad
                        };
                        Parent.Machine.Utility.BotSettings.Advertisements.Add(advertisement);
                        Parent.Machine.Utility.SaveBotSettings();
                    }
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 16
0
        // Confirmed Derived Class

        protected override void SetupRow(HudList.HudListRowAccessor row, QuestViewData quest)
        {
            // Navigation Button
            var navigation = (HudButton)row[(int)Column.Navigation];

            navigation.OverlayImage = StartRoute;

            // Next Available
            var nextAvailable = (HudStaticText)row[(int)Column.NextAvailable];

            nextAvailable.TextAlignment = WriteTextFormats.Right;

            // Xp reward
            var levelRequirement = (HudStaticText)row[(int)Column.LevelRequirement];

            levelRequirement.TextAlignment = WriteTextFormats.Right;

            // Xp reward
            var xpReward = (HudStaticText)row[(int)Column.XpReward];

            xpReward.TextAlignment = WriteTextFormats.Right;

            // Lum Reward
            var lumReward = (HudStaticText)row[(int)Column.LumReward];

            lumReward.TextAlignment = WriteTextFormats.Right;

            // Key Reward
            var keyReward = (HudStaticText)row[(int)Column.KeyReward];

            keyReward.TextAlignment = WriteTextFormats.Right;

            DrawItem(row, quest);
            AddHandlers(row, quest);
        }
Esempio n. 17
0
        public PlayerTrackerGUI(ITracker <TrackedPlayer> tracker, HudList hudList)
        {
            try
            {
                this.tracker = tracker;
                this.hudList = hudList;

                hudList.ClearColumnsAndRows();

                hudList.AddColumn(typeof(HudStaticText), 75, null);
                hudList.AddColumn(typeof(HudStaticText), 140, null);
                hudList.AddColumn(typeof(HudStaticText), 100, null);
                hudList.AddColumn(typeof(HudStaticText), 0, null);

                HudList.HudListRowAccessor newRow = hudList.AddRow();
                ((HudStaticText)newRow[0]).Text = "Time";
                ((HudStaticText)newRow[1]).Text = "Name";
                ((HudStaticText)newRow[2]).Text = "Coords";
                ((HudStaticText)newRow[3]).Text = "Id";

                tracker.ItemAdded   += new Action <TrackedPlayer>(playerTracker_ItemAdded);
                tracker.ItemChanged += new Action <TrackedPlayer>(playerTracker_ItemChanged);
                tracker.ItemRemoved += new Action <TrackedPlayer>(playerTracker_ItemRemoved);

                hudList.Click += new HudList.delClickedControl(hudList_Click);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 18
0
        void corpseTracker_ItemsAdded(System.Collections.Generic.ICollection <TrackedCorpse> items)
        {
            try
            {
                foreach (var item in items)
                {
                    if (item.Opened)
                    {
                        return;
                    }

                    HudList.HudListRowAccessor newRow = hudList.InsertRow(1);

                    ((HudStaticText)newRow[0]).Text = item.TimeStamp.ToString("ddd HH:mm");

                    ((HudStaticText)newRow[1]).Text = item.Description;

                    CoordsObject newCords = Mag.Shared.Util.GetCoords(item.LandBlock, item.LocationX, item.LocationY);
                    ((HudStaticText)newRow[2]).Text = newCords.ToString();

                    ((HudStaticText)newRow[3]).Text = item.Id.ToString(CultureInfo.InvariantCulture);
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 19
0
        void manaTracker_ItemAdded(IEquipmentTrackedItem obj)
        {
            try
            {
                WorldObject wo = CoreManager.Current.WorldFilter[obj.Id];

                if (wo == null)
                {
                    return;
                }

                if (wo.Name != null && wo.Name.Contains("Aetheria") ||                                  // // We don't display aetheria
                    wo.Values(LongValueKey.EquipableSlots) == 134217728 ||                              // // We don't display cloaks (EquipableSlots: 134217728)
                    wo.Values(LongValueKey.EquippedSlots) == 8388608)                                   // // We don't display archer/missile ammo (arrows)
                {
                }
                else
                {
                    HudList.HudListRowAccessor newRow = mainView.ManaList.AddRow();

                    ((HudPictureBox)newRow[0]).Image = wo.Icon + 0x6000000;
                    ((HudStaticText)newRow[1]).Text  = wo.Name;
                    ((HudStaticText)newRow[5]).Text  = obj.Id.ToString(CultureInfo.InvariantCulture);
                }

                Item_Changed(obj);

                obj.Changed += new Action <IEquipmentTrackedItem>(Item_Changed);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 20
0
        public void Clear()
        {
            hudList.ClearRows();

            HudList.HudListRowAccessor newRow = hudList.AddRow();
            ((HudStaticText)newRow[0]).Text = "Time";
            ((HudStaticText)newRow[1]).Text = "Message";
        }
Esempio n. 21
0
        public InventoryTrackerGUI(IItemTracker <TrackedProfitLoss> profitLossTracker, IItemTracker <TrackedInventory> inventoryTracker, HudList hudList)
        {
            try
            {
                this.profitLossTracker = profitLossTracker;
                this.inventoryTracker  = inventoryTracker;
                this.hudList           = hudList;

                hudList.ClearColumnsAndRows();

                hudList.AddColumn(typeof(HudPictureBox), 16, null);
                hudList.AddColumn(typeof(HudStaticText), 55, null);
                hudList.AddColumn(typeof(HudStaticText), 35, null);
                hudList.AddColumn(typeof(HudStaticText), 65, null);
                hudList.AddColumn(typeof(HudStaticText), 65, null);
                hudList.AddColumn(typeof(HudStaticText), 40, null);

                HudList.HudListRowAccessor newRow = hudList.AddRow();
                ((HudStaticText)newRow[3]).Text          = "MMD/h ~5m";
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).Text          = "MMD/h ~1h";
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Peas";

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Comps";

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Salvage";

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[1]).Text = "Net Profit";

                hudList.AddRow();

                newRow = hudList.AddRow();
                ((HudStaticText)newRow[2]).Text          = "Count";
                ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text          = "Avg/h ~5m";
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).Text          = "Avg/h ~1h";
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[5]).Text          = "(Hrs)";
                ((HudStaticText)newRow[5]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                profitLossTracker.ItemsAdded  += new Action <ICollection <TrackedProfitLoss> >(profitLossTracker_ItemsAdded);
                profitLossTracker.ItemChanged += new Action <TrackedProfitLoss>(profitLossTracker_ItemChanged);
                profitLossTracker.ItemRemoved += new Action <TrackedProfitLoss>(profitLossTracker_ItemRemoved);

                inventoryTracker.ItemsAdded  += new Action <ICollection <TrackedInventory> >(consumableTracker_ItemsAdded);
                inventoryTracker.ItemChanged += new Action <TrackedInventory>(consumableTracker_ItemChanged);
                inventoryTracker.ItemRemoved += new Action <TrackedInventory>(consumableTracker_ItemRemoved);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 22
0
        private void Refresh()
        {
            if (lib.gameStatus > 0)
            {
                for (int n = 0; n < MainView.PlayerList.RowCount; n++)
                {
                    bool flag1 = true;
                    HudList.HudListRowAccessor hudListRowAccessor = MainView.PlayerList[n];
                    HudStaticText hudStaticText1 = (HudStaticText)hudListRowAccessor[5];
                    int           num1           = Convert.ToInt32(hudStaticText1.Text);
                    if (lib.MyCore.Actions.IsValidObject(num1))
                    {
                        WorldObject worldObject1 = lib.MyCore.WorldFilter[num1];
                        if (worldObject1.ObjectClass == ObjectClass.Player)
                        {
                            UpdateRow(worldObject1, hudListRowAccessor);
                            flag1 = false;
                        }
                    }
                    if (flag1)
                    {
                        MainView.PlayerList.RemoveRow(n);
                    }
                }

                for (int m = 0; m < MainView.GuildList.RowCount; m++)
                {
                    bool flag2 = true;
                    HudList.HudListRowAccessor hudListRowAccessor = MainView.GuildList[m];
                    HudStaticText hudStaticText2 = (HudStaticText)hudListRowAccessor[5];
                    int           num2           = Convert.ToInt32(hudStaticText2.Text);
                    if (lib.MyCore.Actions.IsValidObject(num2))
                    {
                        WorldObject worldObject2 = lib.MyCore.WorldFilter[num2];
                        if (worldObject2.ObjectClass == ObjectClass.Player)
                        {
                            UpdateRow(worldObject2, hudListRowAccessor);
                            flag2 = false;
                        }
                    }
                    if (flag2)
                    {
                        MainView.GuildList.RemoveRow(m);
                    }
                }

                MainView.GuildNote.Text = "Friendlies " + Convert.ToString(MainView.GuildList.RowCount);
                MainView.EnemyNote.Text = Convert.ToString(MainView.PlayerList.RowCount) + " Enemies";

                if (lib.LastSelected != 0 && !lib.MyCore.Actions.IsValidObject(lib.LastSelected))
                {
                    lib.LastSelected = 0;
                    lib.PointArrow.Dispose();
                    lib.PointArrow = null;
                }
            }
        }
Esempio n. 23
0
 protected override void DrawItem(HudList.HudListRowAccessor row, FavoriteQuestsViewData quest)
 {
     ((HudStaticText)row[(int)Column.QuestName]).Text     = quest.Quest.Name;
     ((HudStaticText)row[(int)Column.NextAvailable]).Text = Util.GetFriendlyTimeDifference(_questFlagRepository.WhenIsQuestReady(quest.Quest));
     ((HudStaticText)row[(int)Column.XpReward]).Text      = quest.Quest.XpRewardIn(Quest.RewardAmount.Millions);
     ((HudStaticText)row[(int)Column.LumReward]).Text     = quest.Quest.LuminanceRewardIn(Quest.RewardAmount.Thousands);
     ((HudStaticText)row[(int)Column.KeyReward]).Text     = quest.Quest.KeyReward;
     ((HudCheckBox)row[(int)Column.Favorite]).Checked     = quest.Preferences.IsFavorite;
 }
Esempio n. 24
0
 private void GetAdvertisements()
 {
     for (int i = 0; i < Parent.Machine.Utility.BotSettings.Advertisements.Count; i++)
     {
         HudList.HudListRowAccessor rowAccessor = Advertisements.AddRow();
         using (HudStaticText row = new HudStaticText())
         {
             row.Text       = Parent.Machine.Utility.BotSettings.Advertisements[i].Message;
             rowAccessor[0] = row;
         }
     }
 }
Esempio n. 25
0
        internal void RedrawItems()
        {
            var itemList = GetItems();

            RefreshDrawList(itemList, DisplayedRows);

            for (int x = 0; x < DisplayedRows.Count; x++)
            {
                HudList.HudListRowAccessor row = _hudList[x];
                DrawItem(row, DisplayedRows[x]);
            }
        }
Esempio n. 26
0
        void playerTracker_ItemAdded(TrackedPlayer item)
        {
            try
            {
                HudList.HudListRowAccessor newRow = hudList.InsertRow(1);

                ((HudStaticText)newRow[1]).Text = item.Name;

                playerTracker_ItemChanged(item);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 27
0
 private void Refresh2()
 {
     if (lib.gameStatus > 0)
     {
         for (int k = 0; k < MainView.CorpseList.RowCount; k++)
         {
             bool flag3 = true;
             HudList.HudListRowAccessor hudListRowAccessor = MainView.CorpseList[k];
             HudStaticText hudStaticText3 = (HudStaticText)hudListRowAccessor[5];
             int           num3           = Convert.ToInt32(hudStaticText3.Text);
             if (lib.MyCore.Actions.IsValidObject(num3))
             {
                 WorldObject worldObject2 = lib.MyCore.WorldFilter[num3];
                 if (worldObject2.ObjectClass == ObjectClass.Corpse)
                 {
                     UpdateRow(worldObject2, hudListRowAccessor);
                     flag3 = false;
                 }
             }
             if (flag3)
             {
                 MainView.CorpseList.RemoveRow(k);
             }
         }
         for (int l = 0; l < MainView.PortalList.RowCount; l++)
         {
             bool flag4 = true;
             HudList.HudListRowAccessor hudListRowAccessor = MainView.PortalList[l];
             HudStaticText hudStaticText4 = (HudStaticText)hudListRowAccessor[5];
             int           num4           = Convert.ToInt32(hudStaticText4.Text);
             if (lib.MyCore.Actions.IsValidObject(num4))
             {
                 WorldObject worldObject3 = lib.MyCore.WorldFilter[num4];
                 if (worldObject3.ObjectClass == ObjectClass.Portal)
                 {
                     UpdateRow(worldObject3, hudListRowAccessor);
                     flag4 = false;
                 }
             }
             if (flag4)
             {
                 MainView.PortalList.RemoveRow(l);
             }
         }
         if (lib.LastSelected != 0 && !lib.MyCore.Actions.IsValidObject(lib.LastSelected))
         {
             lib.LastSelected = 0;
             lib.PointArrow.Dispose();
             lib.PointArrow = null;
         }
     }
 }
Esempio n. 28
0
        private void a()
        {
            int num = this.c.get_ScrollPosition();

            this.c.ClearRows();
            foreach (T local in this.a)
            {
                HudList.HudListRowAccessor accessor = this.c.AddRow();
                ((HudPictureBox)accessor.get_Item(0)).set_Image(new ACImage(0x60011f8));
                ((HudStaticText)accessor.get_Item(1)).set_Text(local.k());
            }
            this.c.set_ScrollPosition(num);
        }
Esempio n. 29
0
        public CombatTrackerGUI(CombatTracker combatTracker, HudList monsterList, HudList damageInfoList)
        {
            try
            {
                if (combatTracker == null)
                {
                    return;
                }

                this.combatTracker = combatTracker;
                this.monsterList   = monsterList;

                combatTrackerGUIInfo = new CombatTrackerGUIInfo(damageInfoList);

                monsterList.ClearColumnsAndRows();

                // Each character is a max of 6 pixels wide
                monsterList.AddColumn(typeof(HudStaticText), 5, null);
                monsterList.AddColumn(typeof(HudStaticText), 111, null);
                monsterList.AddColumn(typeof(HudStaticText), 37, null);
                monsterList.AddColumn(typeof(HudStaticText), 55, null);                 // This cannot go any smaller without pruning text
                monsterList.AddColumn(typeof(HudStaticText), 77, null);

                HudList.HudListRowAccessor newRow = monsterList.AddRow();
                ((HudStaticText)newRow[2]).Text          = "KB's";
                ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).Text          = "Dmg Rcvd";
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).Text          = "Dmg Givn";
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                newRow = monsterList.AddRow();
                ((HudStaticText)newRow[0]).Text          = "*";
                ((HudStaticText)newRow[1]).Text          = "All";
                ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                selectedRow = 1;

                monsterList.Click += new HudList.delClickedControl(monsterList_Click);

                combatTracker.InfoCleared         += new Action <bool>(combatTracker_InfoCleared);
                combatTracker.StatsLoaded         += new Action <List <CombatInfo> >(combatTracker_StatsLoaded);
                combatTracker.CombatInfoUpdated   += new Action <CombatInfo>(combatTracker_CombatInfoUpdated);
                combatTracker.AetheriaInfoUpdated += new Action <AetheriaInfo>(combatTracker_AetheriaInfoUpdated);
                combatTracker.CloakInfoUpdated    += new Action <CloakInfo>(combatTracker_CloakInfoUpdated);
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 30
0
        void consumableTracker_ItemsAdded(ICollection <TrackedInventory> items)
        {
            try
            {
                foreach (var item in items)
                {
                    int zIndex = GetZIndex(item.ObjectClass);

                    for (int row = 7; row <= hudList.RowCount; row++)
                    {
                        if (row == hudList.RowCount)
                        {
                            HudList.HudListRowAccessor newRow = hudList.AddRow();

                            ((HudPictureBox)newRow[0]).Image = item.Icon + 0x6000000;
                            ((HudStaticText)newRow[1]).Text  = item.Name;

                            ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[5]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                            cachedInventory.Add(item);

                            break;
                        }

                        if ((cachedInventory[row - 7].ObjectClass == item.ObjectClass && cachedInventory[row - 7].ItemValue < item.ItemValue) || (GetZIndex(cachedInventory[row - 7].ObjectClass) > zIndex))
                        {
                            HudList.HudListRowAccessor newRow = hudList.InsertRow(row);

                            ((HudPictureBox)newRow[0]).Image = item.Icon + 0x6000000;
                            ((HudStaticText)newRow[1]).Text  = item.Name;

                            ((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
                            ((HudStaticText)newRow[5]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

                            cachedInventory.Insert(row - 7, item);

                            break;
                        }
                    }

                    UpdateInventoryItem(item);
                }
            }
            catch (Exception ex) { Debug.LogException(ex); }
        }
Esempio n. 31
0
        private void RenderKillTaskPopUp()
        {
            try
            {
                KTPopView = new HudView(KTHolder.TaskName, 320, 500, null);
                KTPopView.UserAlphaChangeable = false;
                KTPopView.ShowInBar = false;
                KTPopView.UserResizeable = true;
                KTPopView.Visible = true;
                KTPopView.Ghosted = false;
                KTPopView.UserClickThroughable = false;
                KTPopView.UserMinimizable = true;
                KTPopView.UserGhostable = false;

                KTPopTabView = new HudTabView();
                KTPopView.Controls.HeadControl = KTPopTabView;

                KTPopLayout = new HudFixedLayout();
                KTPopTabView.AddTab(KTPopLayout, "Edit");

                KTLabel1 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel1, new Rectangle(0,0,100,16));
                KTLabel1.Text = "Kill Task Name:";

                KTPopTaskName = new HudTextBox();
                KTPopLayout.AddControl(KTPopTaskName, new Rectangle(0,20,mKTSet.HudWidth, 16));
                KTPopTaskName.Text = KTHolder.TaskName;

                KTLabel2 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel2, new Rectangle(0,40,75,16));
                KTLabel2.Text = "Number:";

                KTPopCompleteCount = new HudTextBox();
                KTPopLayout.AddControl(KTPopCompleteCount, new Rectangle(80,40,220,16));
                KTPopCompleteCount.Text = KTHolder.CompleteCount.ToString();

                KTLabel3 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel3, new Rectangle(0,60,100,16));
                KTLabel3.Text = "Creature List:";

                KTPopMobsList = new HudList();
                KTPopLayout.AddControl(KTPopMobsList, new Rectangle(0,80,300,90));
                KTPopMobsList.AddColumn(typeof(HudStaticText),250,null);
                KTPopMobsList.AddColumn(typeof(HudPictureBox),16,null);

                foreach(string mob in KTHolder.MobNames)
                {
                    KTPopRow = KTPopMobsList.AddRow();
                    ((HudStaticText)KTPopRow[0]).Text = mob;
                    ((HudPictureBox)KTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                KTPopMobsList.Click += KTPopMobsList_Click;

                KTPopMobTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopMobTxt, new Rectangle(0,180,250,16));

                KTPopMobAddButton = new HudButton();
                KTPopLayout.AddControl(KTPopMobAddButton, new Rectangle(260,180,40,16));
                KTPopMobAddButton.Text = "Add";

                KTPopMobAddButton.Hit += KTPopMobAddButton_Hit;

                KTLabel4 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel4, new Rectangle(0,200,100,16));
                KTLabel4.Text = "NPC List:";

                KTPopNPCList = new HudList();
                KTPopLayout.AddControl(KTPopNPCList, new Rectangle(0,220,300,90));
                KTPopNPCList.AddColumn(typeof(HudStaticText),250,null);
                KTPopNPCList.AddColumn(typeof(HudPictureBox),16,null);

                foreach(string mob in KTHolder.NPCNames)
                {
                    KTPopRow = KTPopNPCList.AddRow();
                    ((HudStaticText)KTPopRow[0]).Text = mob;
                    ((HudPictureBox)KTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                KTPopNPCList.Click += KTPopNPCList_Click;

                KTPopNPCTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCTxt, new Rectangle(0,320,250,16));

                KTPopNPCAddButton = new HudButton();
                KTPopLayout.AddControl(KTPopNPCAddButton, new Rectangle(260,320,40,16));
                KTPopNPCAddButton.Text = "Add";

                KTPopNPCAddButton.Hit += KTPopNPCAddButton_Hit;

                KTLabel5 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel5, new Rectangle(0,340,75,16));
                KTLabel5.Text = "NPC Info:";

                KTPopNPCInfo = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCInfo, new Rectangle(80,340,220,16));
                KTPopNPCInfo.Text = KTHolder.NPCInfo;

                KTLabel6 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel6, new Rectangle(0,360,75,16));
                KTLabel6.Text = "NPC Coords:";

                KTPopNPCCoords = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCCoords, new Rectangle(80,360,220,16));
                KTPopNPCCoords.Text = KTHolder.NPCCoords;

                KTLabel7 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel7, new Rectangle(0,380,75,16));
                KTLabel7.Text = "Flag Text:";

                KTPopNPCFlagTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCFlagTxt, new Rectangle(80,380,220,16));
                KTPopNPCFlagTxt.Text = KTHolder.NPCYellowFlagText;

                KTLabel8 = new HudStaticText();
                KTPopLayout.AddControl(KTLabel8, new Rectangle(0, 400, 75,16));
                KTLabel8.Text = "Comp. Text:";

                KTPopNPCCompleteTxt = new HudTextBox();
                KTPopLayout.AddControl(KTPopNPCCompleteTxt, new Rectangle(80,400,220,16));
                KTPopNPCCompleteTxt.Text = KTHolder.NPCYellowCompleteText;

                KTPopView.VisibleChanged += KTPopView_VisibleChanged;

            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 32
0
        private void RenderChiefGearInspectPageMenuTabMain()
        {
            try
            {
                if (ChiefGearInspectPageMenuTabMain != null) { DisposeChiefGearInspectPageMenuTabMain(); }

                HudStaticText lblRuleName = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleName.Text = "Rule Name";
                ChiefGearInspectPageMenuTabMain.AddControl(lblRuleName, new Rectangle(70, 5, 90, 16));

                txtRuleName = new HudTextBox();
                txtRuleName.Text = "";
                ChiefGearInspectPageMenuTabMain.AddControl(txtRuleName, new Rectangle(70, 25, 210, 16));

                HudStaticText lblRulePriority = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRulePriority.Text = "Priority (1 - 999)";
                ChiefGearInspectPageMenuTabMain.AddControl(lblRulePriority, new Rectangle(290, 5, 90, 16));

                txtRulePriority = new HudTextBox();
                txtRulePriority.Text = "1";
                ChiefGearInspectPageMenuTabMain.AddControl(txtRulePriority, new Rectangle(290, 25, 30, 16));

                chkRuleEnabled = new HudCheckBox();
                chkRuleEnabled.Text = "Enabled";
                ChiefGearInspectPageMenuTabMain.AddControl(chkRuleEnabled, new Rectangle(5, 25, 60, 16));
              //  chkRuleEnabled.Checked = Convert.ToBoolean(mSelectedRule.Element("Enabled").Value);

                HudStaticText lblRuleApplies = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleApplies.Text = "Item type {required:}";
                ChiefGearInspectPageMenuTabMain.AddControl(lblRuleApplies, new Rectangle(5, 55, 200, 16));

                lstRuleApplies = new HudList();
                lstRuleAppliesListRow = new HudList.HudListRowAccessor();

                ChiefGearInspectPageMenuTabMain.AddControl(lstRuleApplies, new Rectangle(5, 75, 130, 200));
                lstRules.AddColumn(typeof(HudCheckBox), 5, null);
                lstRules.AddColumn(typeof(HudStaticText), 110, null);
                lstRules.AddColumn(typeof(HudStaticText), 1, null);

                txtGearScore = new HudTextBox();
                txtGearScore.Text = "-1";
                ChiefGearInspectPageMenuTabMain.AddControl(txtGearScore, new Rectangle(160, 75, 50, 16));

                HudStaticText lblGearScore = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblGearScore.Text = "GearScore(Min)";
                ChiefGearInspectPageMenuTabMain.AddControl(lblGearScore, new Rectangle(215, 75, 100, 16));

                txtRuleArcaneLore = new HudTextBox();
                txtRuleArcaneLore.Text = "-1";
                ChiefGearInspectPageMenuTabMain.AddControl(txtRuleArcaneLore, new Rectangle(160, 95, 50, 16));

                HudStaticText lblRuleArcaneLore = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleArcaneLore.Text = "Arcane Lore (Max)";
                ChiefGearInspectPageMenuTabMain.AddControl(lblRuleArcaneLore, new Rectangle(215, 95, 100, 16));

                txtRuleMaxCraft = new HudTextBox();
                txtRuleMaxCraft.Text = "-1";
                ChiefGearInspectPageMenuTabMain.AddControl(txtRuleMaxCraft, new Rectangle(160, 115, 50, 16));

                HudStaticText lblRuleWork = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleWork.Text = "Work (Max)";
                ChiefGearInspectPageMenuTabMain.AddControl(lblRuleWork, new Rectangle(215, 115, 115, 16));

                txtRuleWieldLevel = new HudTextBox();
                txtRuleWieldLevel.Text = "-1";
                ChiefGearInspectPageMenuTabMain.AddControl(txtRuleWieldLevel, new Rectangle(160, 135, 50, 16));

                HudStaticText lblRuleWieldLevel = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleWieldLevel.Text = "Char Level (Max)";
                ChiefGearInspectPageMenuTabMain.AddControl(lblRuleWieldLevel, new Rectangle(215, 135, 100, 16));

                txtRuleNumSpells = new HudTextBox();
                txtRuleNumSpells.Text = "-1";
                ChiefGearInspectPageMenuTabMain.AddControl(txtRuleNumSpells, new Rectangle(160, 155, 50, 16));

                HudStaticText lblnumSpells = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblnumSpells.Text = "Num Spells (Min)";
                ChiefGearInspectPageMenuTabMain.AddControl(lblnumSpells, new Rectangle(215, 155, 100, 16));

                HudStaticText lblSlots = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblSlots.Text = "Slots";
                ChiefGearInspectPageMenuTabMain.AddControl(lblSlots, new Rectangle(330, 55, 88, 16));

                lstRuleSlots = new HudList();
                ChiefGearInspectPageMenuTabMain.AddControl(lstRuleSlots, new Rectangle(350, 75, 135, 200));
                lstRuleSlots.AddColumn(typeof(HudCheckBox), 5, null);
                lstRuleSlots.AddColumn(typeof(HudStaticText), 110, null);
                lstRuleSlots.AddColumn(typeof(HudStaticText), 1, null);

                bChiefGearInspectPageTabViewMain = true;
                SubscribeChiefGearInspectPageMenuTabViewPageSearchRuleMainEvents();

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 33
0
        private void FillArmorUpdateHudList()
        {
            try
            {
            //     WriteToChat("toonname " + toonArmorUpdateName);
                currentArmor = new List<XElement>();
                string updateSpells = null;
                string armorupdatepiece = null;
                string armorUpdateClass = null;
                string objArmorUpdateSetName = null;
                currentArmor = new List<XElement>();
                string objArmorUpdateCovers = null;
                xdocGenArmor = XDocument.Load(genArmorFilename);
                IEnumerable<XElement> elements = xdocGenArmor.Element("Objs").Descendants("Obj");

                foreach (XElement el in elements)
                {
                    if (el.Element("ToonName").Value == toonArmorUpdateName)
                    {
                        currentArmor.Add(el);
                        armorUpdateClass = el.Element("ArmorClass").Value;
                        int icon = Convert.ToInt32(el.Element("ArmorIcon").Value);
                        armorupdatepiece = el.Element("ArmorName").Value;
                        updateSpells = el.Element("ArmorSpellXml").Value;
                        objArmorUpdateSetName = String.Empty;
                        objArmorUpdateCovers = String.Empty;
                            try
                            {
                                if (armorUpdateClass == "Armor")
                                {
                                    objCovers = Convert.ToInt32(el.Element("ArmorCovers").Value);
                                    if (Convert.ToInt32(el.Element("ArmorSet").Value) > 0)
                                    { objArmorUpdateSetName = SetsIndex[Convert.ToInt32(el.Element("ArmorSet").Value)].name;  }

                                    if (objCovers > 0)
                                    {
                                        foreach (IDNameLoadable piece in CoverageInvList)
                                        {
                                            if (piece.ID == objCovers)
                                            {
                                                objCoversName = piece.name;

                                                 break;
                                            }
                                        }
                                    } //end of if objcovers

                                } // eof if armorupdateClass

                            } // eof try

                            catch (Exception ex) { LogError(ex); }

                            ArmorUpdateHudListRow = ArmorUpdateHudList.AddRow();
                            ((HudStaticText)ArmorUpdateHudListRow[0]).Text = armorupdatepiece;
                            ((HudStaticText)ArmorUpdateHudListRow[0]).FontHeight = nitemFontHeight;
                            ((HudStaticText)ArmorUpdateHudListRow[1]).Text = objArmorUpdateSetName;
                            ((HudStaticText)ArmorUpdateHudListRow[1]).FontHeight = nitemFontHeight;
                            ((HudStaticText)ArmorUpdateHudListRow[2]).Text = updateSpells;
                            ((HudStaticText)ArmorUpdateHudListRow[2]).FontHeight = nitemFontHeight;
                        }
                    }

                    //   ArmorUpdateHudView.UserResizeable = true;
                xdocGenArmor = null;
            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 34
0
        private void FillArmorAvailableList()
        {
            newDoc = XDocument.Load(armorSelectFilename);
            IEnumerable<XElement> selectedArmor = newDoc.Element("Objs").Descendants("Obj");
            availableSelected = new List<XElement>();
                    foreach (XElement el in selectedArmor)
                    {
                        try
                        {

                            availableSelected.Add(el);
                           // objIcon = Convert.ToInt32(childElement.Element("ObjIcon").Value);
                            armorAvailableClass = txtArmorUpdateClass.Text.ToLower();

                            armorAvailablePiece = el.Element("ObjName").Value;
                            availableArmorToon = el.Element("ToonName").Value.ToString();

                           armorAvailableSpells = el.Element("ObjSpellXml").Value;
                           armorAvailableSetName = "";
                            armorAvailableCovers = "";
                            if (armorAvailableClass == "armor" || armorAvailableClass == "clothing")
                            {
                                //   WriteToChat("I am in function fill armoravailable list coverage");
                                int narmorAvailableCovers = Convert.ToInt32(el.Element("ObjCovers").Value);
                                //  WriteToChat("Int armor covers: " + narmorAvailableCovers.ToString());
                                if (Convert.ToInt32(el.Element("ObjSet").Value) > 0)
                                { armorAvailableSetName = SetsIndex[Convert.ToInt32(el.Element("ObjSet").Value)].name; } //WriteToChat("ArmorAvailablesetname " + armorAvailableSetName); }

                                if (narmorAvailableCovers > 0)
                                {
                                    //     WriteToChat("I am in function to find name of coverage for "  + narmorAvailableCovers.ToString());
                                    foreach (IDNameLoadable piece in CoverageInvList)
                                    {
                                        if (piece.ID == narmorAvailableCovers)
                                        {
                                            armorAvailableCovers = piece.name;
                                            //   WriteToChat(armorAvailableCovers);
                                            break;
                                        }
                                    }
                                }
                            }

                        ArmorAvailableListRow = ArmorAvailableList.AddRow();
                        ((HudStaticText)ArmorAvailableListRow[0]).Text = armorAvailablePiece;
                        ((HudStaticText)ArmorAvailableListRow[0]).FontHeight = nitemFontHeight;
                        ((HudStaticText)ArmorAvailableListRow[1]).Text = availableArmorToon;
                        ((HudStaticText)ArmorAvailableListRow[1]).FontHeight = nitemFontHeight;
                        ((HudStaticText)ArmorAvailableListRow[2]).Text = armorAvailableSetName;
                        ((HudStaticText)ArmorAvailableListRow[2]).FontHeight = nitemFontHeight;
                        ((HudStaticText)ArmorAvailableListRow[3]).Text = armorAvailableCovers;
                        ((HudStaticText)ArmorAvailableListRow[3]).FontHeight = nitemFontHeight;
                        ((HudStaticText)ArmorAvailableListRow[4]).Text = armorAvailableSpells;
                        ((HudStaticText)ArmorAvailableListRow[4]).FontHeight = nitemFontHeight;

                      }catch (Exception ex) { LogError(ex); }
                   }
                    newDoc = null;
        }
Esempio n. 35
0
 private void TacticianDiplayList_Click(object sender, int row, int col)
 {
     try
     {
         int scroll = TacticianDiplayList.ScrollPosition;
         TacticianRowClick = TacticianDiplayList[row];
         if(col == 0)
         {
             Core.Actions.SelectItem(Convert.ToInt32(((HudStaticText)TacticianRowClick[9]).Text));
         }
         if(col == 1)
         {
             FocusHudTarget = Convert.ToInt32(((HudStaticText)TacticianRowClick[9]).Text);
             Core.Actions.RequestId(FocusHudTarget);
             if(FocusHudView == null)
             {
                 RenderFocusHud();
             }
         }
         UpdateTactician();
         TacticianDiplayList.ScrollPosition = scroll;
     }catch(Exception ex){LogError(ex);}
 }
Esempio n. 36
0
        private void KTPopNPCAddButton_Hit(object sender, EventArgs e)
        {
            try
            {
                int scroll = KTPopNPCList.ScrollPosition;

                KTHolder.NPCNames.Add(KTPopNPCTxt.Text);

                KTPopNPCTxt.Text = String.Empty;
                KTPopNPCList.ClearRows();

                foreach(string npc in KTHolder.NPCNames)
                {
                    KTPopRow = KTPopNPCList.AddRow();
                    ((HudStaticText)KTPopRow[0]).Text = npc;
                    ((HudPictureBox)KTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                KTPopNPCList.ScrollPosition = scroll;

            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 37
0
        private void RenderChiefGearInspectPageSearchRules()
        {
            try
            {
                lstRules = new HudList();
                LstRulesHudListRow = new HudList.HudListRowAccessor();
                ChiefGearInspectPageSearchRules.AddControl(lstRules, new Rectangle(5, 5, 480, 90));
                lstRules.AddColumn(typeof(HudCheckBox), 5, null);
                lstRules.AddColumn(typeof(HudStaticText), 20, null);
                lstRules.AddColumn(typeof(HudStaticText), 350, null);
                lstRules.AddColumn(typeof(HudPictureBox), 12, null);
                lstRules.AddColumn(typeof(HudStaticText), 1, null);
                _UpdateRulesTabs();
                WriteToChat("I have been at hud making list rules and now am back after trying to populate list.");
                btnRuleClear = new HudButton();
                btnRuleClear.Text = "Reset Values";
                ChiefGearInspectPageSearchRules.AddControl(btnRuleClear, new Rectangle(10, 110, 110, 20));

                btnRuleNew = new HudButton();
                btnRuleNew.Text = "Add New Rule";
                ChiefGearInspectPageSearchRules.AddControl(btnRuleNew, new Rectangle(130, 110, 110, 20));

                btnRuleClone = new HudButton();
                btnRuleClone.Text = "Clone Current Rule";
                ChiefGearInspectPageSearchRules.AddControl(btnRuleClone, new Rectangle(250, 110, 110, 20));

                btnRuleUpdate = new HudButton();
                btnRuleUpdate.Text = "Save Rule Changes";
                ChiefGearInspectPageSearchRules.AddControl(btnRuleUpdate, new Rectangle(370, 110, 110, 20));

                //Set up for adding menu and choices to ChiefGearInspectPageSearchRules
                ChiefGearInspectPageMenuTabView = new HudTabView();
                ChiefGearInspectPageSearchRules.AddControl(ChiefGearInspectPageMenuTabView, new Rectangle(0, 140, 520, 390));
                ChiefGearInspectPageMenuTabMain = new HudFixedLayout();
                ChiefGearInspectPageMenuTabView.AddTab(ChiefGearInspectPageMenuTabMain, "Main");
                ChiefGearInspectPageMenuTabProperties = new HudFixedLayout();
                ChiefGearInspectPageMenuTabView.AddTab(ChiefGearInspectPageMenuTabProperties, "Properties");
                ChiefGearInspectPageMenuTabAppearance = new HudFixedLayout();
                ChiefGearInspectPageMenuTabView.AddTab(ChiefGearInspectPageMenuTabAppearance, "Appearance");
                ChiefGearInspectPageMenuTabReqSpells = new HudFixedLayout();
                ChiefGearInspectPageMenuTabView.AddTab(ChiefGearInspectPageMenuTabReqSpells, "Req Spells");
                ChiefGearInspectPageMenuTabAdvanced = new HudFixedLayout();
                ChiefGearInspectPageMenuTabView.AddTab(ChiefGearInspectPageMenuTabAdvanced, "Advanced");

                bChiefGearInspectPageSearchRules = true;
                RenderChiefGearInspectPageMenuTabMain();

                SubscribeChiefGearInspectSearchRuleEvents();

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 38
0
        private void UpdateTaskPanel()
        {
            try
            {
                if(TaskHudView == null) {return;}

                taskscrollholder[0] = TaskIncompleteList.ScrollPosition;
                taskscrollholder[1] = TaskCompleteList.ScrollPosition;
                taskscrollholder[2] = KillTaskList.ScrollPosition;
                taskscrollholder[3] = CollectTaskList.ScrollPosition;

                TaskIncompleteList.ClearRows();
                TaskCompleteList.ClearRows();
                KillTaskList.ClearRows();
                CollectTaskList.ClearRows();

                foreach(var ict in mKTSet.MyKillTasks.Where(x => x.track && x.active && x.complete == false).OrderBy(x => x.TaskName))
                {
                    TaskListRow = TaskIncompleteList.AddRow();

                    ((HudStaticText)TaskListRow[0]).Text = ict.TaskName;
                    ((HudStaticText)TaskListRow[0]).TextColor = Color.Orange;
                    ((HudStaticText)TaskListRow[1]).Text = "(" + ict.CurrentCount.ToString() + "/" + ict.CompleteCount.ToString() + ")";
                    ((HudStaticText)TaskListRow[1]).TextColor = Color.Orange;
                }

                foreach(var ict in mKTSet.MyCollectTasks.Where(x => x.track && x.complete == false).OrderBy(x => x.TaskName))
                {
                    TaskListRow = TaskIncompleteList.AddRow();
                    ((HudStaticText)TaskListRow[0]).Text = ict.TaskName;
                    ((HudStaticText)TaskListRow[0]).TextColor = Color.Tan;
                    ((HudStaticText)TaskListRow[1]).Text = "(" + ict.CurrentCount.ToString() + "/" + ict.CompleteCount.ToString() + ")";
                    ((HudStaticText)TaskListRow[1]).TextColor = Color.Tan;
                }

                foreach(var ct in mKTSet.MyKillTasks.Where(x => x.track && x.complete == true).OrderBy(x => x.TaskName))
                {
                    TaskListRow = TaskCompleteList.AddRow();
                    ((HudStaticText)TaskListRow[0]).Text = ct.TaskName;
                    ((HudStaticText)TaskListRow[1]).Text = ct.NPCInfo;
                }

                foreach(var ct in mKTSet.MyCollectTasks.Where(x => x.track && x.complete == true).OrderBy(x => x.TaskName))
                {
                    TaskListRow = TaskCompleteList.AddRow();
                    ((HudStaticText)TaskListRow[0]).Text = ct.TaskName;
                    ((HudStaticText)TaskListRow[1]).Text = ct.NPCInfo;
                }

                foreach(var kt in mKTSet.MyKillTasks.OrderBy(x => x.TaskName))
                {
                    TaskListRow = KillTaskList.AddRow();
                    ((HudCheckBox)TaskListRow[0]).Checked = kt.track;
                    ((HudStaticText)TaskListRow[1]).Text = kt.TaskName;
                    ((HudStaticText)TaskListRow[1]).TextColor = Color.AntiqueWhite;
                    if(kt.complete) {((HudStaticText)TaskListRow[1]).TextColor = Color.Gold;}
                    else if(kt.active) {((HudStaticText)TaskListRow[1]).TextColor = Color.LightSeaGreen;}
                }

                foreach(var ct in mKTSet.MyCollectTasks.OrderBy(x => x.TaskName))
                {
                    TaskListRow = CollectTaskList.AddRow();
                    ((HudCheckBox)TaskListRow[0]).Checked = ct.track;
                    ((HudStaticText)TaskListRow[1]).Text = ct.TaskName;
                    ((HudStaticText)TaskListRow[1]).TextColor = Color.AntiqueWhite;
                    if(ct.complete) {((HudStaticText)TaskListRow[1]).TextColor = Color.Gold;}
                    else if(ct.active) {((HudStaticText)TaskListRow[1]).TextColor = Color.LightSeaGreen;}
                }

                TaskIncompleteList.ScrollPosition = taskscrollholder[0];
                TaskCompleteList.ScrollPosition = taskscrollholder[1];
                KillTaskList.ScrollPosition = taskscrollholder[2];
                CollectTaskList.ScrollPosition = taskscrollholder[3];

            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 39
0
        // items selected need to be added to listview: lstinventory
        private void btnLstInv_Hit(object sender, EventArgs e)
        {
            if (!File.Exists(genInventoryFilename)){WriteToChat("You must first do an inventory.");}
            else if(File.Exists(genInventoryFilename))
            {
                try
                {
                    XDocument tempGIDoc = new XDocument(new XElement("Objs"));
                    tempGIDoc.Save(inventorySelect);
                  //  WriteToChat("I have  set  up inventoryselect prior to finding list.");
                    tempGIDoc = null;
                    lstMySelects = new List<string>();

                    if (txtMyChoice.Text != null)
                    {
                        mySelect = txtMyChoice.Text.Trim();
                        mySelect = mySelect.ToLower();

                        if (mySelect.Contains(';'))
                        {
                            string [] split = mySelect.Split(new Char [] {';' });

                            foreach (string s in split)
                            {

                                if (s.Trim() != "")
                                {
                                    lstMySelects.Add(s);
                                }
                            }
                        }
                        else
                        {
                            lstMySelects.Add(mySelect);
                        }

                    }
                    else  { mySelect = null; }
                    xdocListInv = XDocument.Load(genInventoryFilename);
                }//end of try //

                catch (Exception ex) { LogError(ex); }

                try
                {
                    if (objClass < 1)
                    {
                        objClass = 0;
                    }
                  //  WriteToChat("objClass: " + objClass.ToString());

                    switch (objClass)
                    {
                        case 0:
                            if (lstMySelects.Count > 0)
                            {
                                int n = lstMySelects.Count;
                                XDocument tempdoc = new XDocument();
                                newDoc = new XDocument(new XElement("Objs"));
                                for (int i = 0; i < n; i++)
                                {
                                    tempdoc = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjName").Value.ToLower().Contains(lstMySelects[n]) ||
                                    p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[n])
                                    select p));
                                    newDoc.Root.Add(tempdoc);
                                    tempdoc = null;
                                }

                            }
                            else { WriteToChat("You must either select a class or write something in textbox"); }
                            break;

                        case 1:
                        case 2:
                        case 11:
                            if (lstMySelects != null && lstMySelects[0].Trim() != "")
                            {
                                int n = lstMySelects.Count;
                                 newDoc = new XDocument(new XElement("Objs"));
                                for(int i = 0;i<n;i++)
                                {
                                  if (objArmorSet == 0 && objArmorLevel == 1 && objCovers == 0)
                                  {

                                    var temp =
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                    select p;
                                    newDoc.Root.Add(temp);
                                    temp = null;
                                  //  WriteToChat("In selection of  newDoc for armor");
                                  }

                                  else if (objArmorSet > 0 && objArmorLevel == 1 && objCovers == 0)
                                  {
                                   var temp =
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjSet").Value == objArmorSet.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))

                                    select p;
                                    newDoc.Root.Add(temp);
                                    temp = null;

                                  }
                                  else if ((objArmorLevel > 1 || objArmorLevel < 1) && objArmorSet == 0 && objCovers == 0)
                                  {
                                     var temp =
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjWieldValue").Value == objArmorLevel.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                    select p;
                                    newDoc.Root.Add(temp);
                                    temp = null;

                                  }
                                  else if (objCovers > 0 && objArmorSet == 0 && objArmorLevel == 1)
                                  {

                                     var temp =
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                          p.Element("ObjCovers").Value == objCovers.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                    select p;
                                    newDoc.Root.Add(temp);
                                    temp = null;

                                  }
                                  else if (objArmorSet > 0 && (objArmorLevel < 1 || objArmorLevel > 1) && objCovers == 0)
                                  {
                                      var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                            p.Element("ObjSet").Value == objArmorSet.ToString() &&
                                           p.Element("ObjWieldValue").Value == objArmorLevel.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                    newDoc.Root.Add(temp);
                                    temp = null;

                                  }
                                  else if (objArmorSet > 0 && objCovers > 0 && objArmorLevel == 1)
                                  {
                                   var   temp = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjSet").Value == objArmorSet.ToString() &&
                                          p.Element("ObjCovers").Value == objCovers.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                    select p));
                                    newDoc.Root.Add(temp);
                                    temp = null;

                                 }
                                 else if (objArmorSet == 0 && (objArmorLevel > 1 || objArmorLevel < 1) && objCovers > 0)
                                 {
                                     var temp =
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                       p.Element("ObjWieldValue").Value == objArmorLevel.ToString() &&
                                        p.Element("ObjCovers").Value == objCovers.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                    select p;
                                    newDoc.Root.Add(temp);
                                    temp = null;

                                 }
                                 else if (objArmorSet > 0 && (objArmorLevel > 1 || objArmorLevel < 1) && objCovers > 0)
                                 {
                                      var temp =
                                     from p in xdocListInv.Element("Objs").Descendants("Obj")
                                     where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjSet").Value == objArmorSet.ToString() &&
                                          p.Element("ObjWieldValue").Value == objArmorLevel.ToString() &&
                                           p.Element("ObjCovers").Value == objCovers.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                     select p;
                                    newDoc.Root.Add(temp);
                                    temp = null;

                                }
                              }
                            }

                            else
                            {
                                if (objArmorSet == 0 && objArmorLevel == 1 && objCovers == 0)
                                {

                                    newDoc = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName)
                                    select p));
                                }

                                else if (objArmorSet > 0 && objArmorLevel == 1 && objCovers == 0)
                                {

                                    newDoc = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjSet").Value == objArmorSet.ToString()
                                    select p));
                                }
                                else if ((objArmorLevel > 1 || objArmorLevel < 1) && objArmorSet == 0 && objCovers == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                       p.Element("ObjWieldValue").Value == objArmorLevel.ToString()
                                    select p));
                                }
                                else if (objCovers > 0 && objArmorSet == 0 && objArmorLevel == 1)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                          p.Element("ObjCovers").Value == objCovers.ToString()
                                    select p));
                                }
                                else if (objArmorSet > 0 && (objArmorLevel < 1 || objArmorLevel > 1) && objCovers == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                            p.Element("ObjSet").Value == objArmorSet.ToString() &&
                                           p.Element("ObjWieldValue").Value == objArmorLevel.ToString()
                                        select p));
                                }
                                else if (objArmorSet > 0 && objCovers > 0 && objArmorLevel == 1)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjSet").Value == objArmorSet.ToString() &&
                                          p.Element("ObjCovers").Value == objCovers.ToString()
                                    select p));
                                }
                                else if (objArmorSet == 0 && (objArmorLevel > 1 || objArmorLevel < 1) && objCovers > 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                    from p in xdocListInv.Element("Objs").Descendants("Obj")
                                    where p.Element("ObjClass").Value.Contains(objClassName) &&
                                       p.Element("ObjWieldValue").Value == objArmorLevel.ToString() &&
                                        p.Element("ObjCovers").Value == objCovers.ToString()
                                    select p));
                                }
                                else if (objArmorSet > 0 && (objArmorLevel > 1 || objArmorLevel < 1) && objCovers > 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                     from p in xdocListInv.Element("Objs").Descendants("Obj")
                                     where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjSet").Value == objArmorSet.ToString() &&
                                          p.Element("ObjWieldValue").Value == objArmorLevel.ToString() &&
                                           p.Element("ObjCovers").Value == objCovers.ToString()
                                     select p));
                                }

                            }  //end of if spells
                            break;
                        case 5:
                            if (lstMySelects != null && lstMySelects[0].Trim() != "")
                            {
                                int n = lstMySelects.Count;
                                newDoc = new XDocument(new XElement("Objs"));
                                for (int i = 0; i < n; i++)
                                {
                                    if (objWieldAttrInt == 0 && objDamageTypeInt == 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                   var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                   newDoc.Root.Add(temp);
                                   temp = null;
                                }

                                else if (objWieldAttrInt > 0 && objDamageTypeInt == 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                   newDoc.Root.Add(temp);
                                   temp = null;

                                }

                                else if (objDamageTypeInt > 0 && objWieldAttrInt == 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;

                                }
                                else if ((objLevelInt < 1 || objLevelInt > 1) && objWieldAttrInt == 0 && objDamageTypeInt == 0 && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                                }
                                else if (objEmbueTypeInt > 0 && objWieldAttrInt == 0 && objDamageTypeInt == 1 && objLevelInt == 1)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                                }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                                }
                                else if (objWieldAttrInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objDamageTypeInt == 0 && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                               }
                                else if (objWieldAttrInt > 0 && objEmbueTypeInt > 0 && objDamageTypeInt == 0 && objLevelInt == 1)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                         select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                               }
                                else if (objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objWieldAttrInt == 0 && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                                }
                                else if (objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objWieldAttrInt == 0 && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                         select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                               }
                                else if (objDamageTypeInt > 0 && objEmbueTypeInt > 0 && objWieldAttrInt == 0 && (objLevelInt == 1))
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                                }
                                else if ((objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0 && objWieldAttrInt == 0 && objDamageTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                         select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                              }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt == 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                         select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                               }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && objEmbueTypeInt > 0 && objLevelInt == 1)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                         select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                               }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt == 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                         select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                               }
                                else if (objWieldAttrInt == 0 && objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                        (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                        select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                               }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                {
                                    var temp =
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                         select p;
                                       newDoc.Root.Add(temp);
                                       temp = null;
                                 }
                               } //end of case 5 with spells
                             }//end  of case 5 with spells
                            else
                            {
                                if (objWieldAttrInt == 0 && objDamageTypeInt == 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName)
                                        select p));
                                }

                                else if (objWieldAttrInt > 0 && objDamageTypeInt == 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString()
                                        select p));
                                }

                                else if (objDamageTypeInt > 0 && objWieldAttrInt == 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString()
                                        select p));
                                }

                                else if ((objLevelInt < 1 || objLevelInt > 1) && objWieldAttrInt == 0 && objDamageTypeInt == 0 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString()
                                        select p));
                                }
                                else if (objEmbueTypeInt > 0 && objWieldAttrInt == 0 && objDamageTypeInt == 1 && objLevelInt == 1)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objDamageTypeInt == 0 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt > 0 && objEmbueTypeInt > 0 && objDamageTypeInt == 0 && objLevelInt == 1)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                else if (objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objWieldAttrInt == 0 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString()
                                        select p));
                                }
                                else if (objDamageTypeInt > 0 && objEmbueTypeInt > 0 && objWieldAttrInt == 0 && (objLevelInt == 1))
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }

                                else if ((objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0 && objWieldAttrInt == 0 && objDamageTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && objEmbueTypeInt > 0 && objLevelInt == 1)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt == 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt == 0 && objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                         p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                         p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                else if (objWieldAttrInt > 0 && objDamageTypeInt > 0 && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         p.Element("ObjWieldAttr").Value == objWieldAttrInt.ToString() &&
                                         p.Element("ObjDamage").Value == objDamageTypeInt.ToString() &&
                                        p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                        p.Element("ObjEmbue").Value == (objEmbueTypeInt.ToString())
                                        select p));
                                }

                            } //end of case 5  no spells

                            break;
                        case 4:
                        case 6:
                            if (lstMySelects.Count > 0)
                            {
                                int n = lstMySelects.Count;
                                XDocument tempdoc = new XDocument();
                                newDoc = new XDocument(new XElement("Objs"));
                                for (int i = 0; i < n; i++)
                                {
                                    if (objDamageTypeInt == 0 && objMagicDamageInt == 0 && objLevelInt == 1 && objEmbueTypeInt == 0)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                            (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }

                                    if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && (objLevelInt == 1) && objEmbueTypeInt == 0)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                             (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                              p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString()) &&
                                            (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }
                                    if ((objLevelInt < 1 || objLevelInt > 1) && objDamageTypeInt == 0 && objMagicDamageInt == 0 && objEmbueTypeInt == 0)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                            p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                             (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }
                                    if (objEmbueTypeInt > 0 && objDamageTypeInt == 0 && objMagicDamageInt == 0 && objLevelInt == 1)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                            p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                            (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }

                                    if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt == 0)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                             (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                              p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString()) &&
                                            p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                            (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }
                                    if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && objEmbueTypeInt > 0 && objLevelInt == 1)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                             (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                              p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString()) &&
                                            p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                            (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }
                                    if ((objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0 && objDamageTypeInt == 0 && objMagicDamageInt == 0)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                            p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                            p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                            (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[i]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[i]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }

                                    if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                    {
                                        var temp =
                                            from p in xdocListInv.Element("Objs").Descendants("Obj")
                                            where p.Element("ObjClass").Value.Contains(objClassName) &&
                                             (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                              p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString()) &&
                                            p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                            p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString() &&
                                            (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[0]) ||
                                              p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[0]))
                                            select p;
                                        newDoc.Root.Add(temp);
                                        temp = null;
                                    }
                                }
                            }
                            else
                            {
                                if (objDamageTypeInt == 0 && objMagicDamageInt == 0 && (objLevelInt == 1) && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName)
                                        select p));
                                }

                                if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && (objLevelInt == 1) && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                          p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString())
                                        select p));
                                }
                                if ((objLevelInt < 1 || objLevelInt > 1) && objDamageTypeInt == 0 && objMagicDamageInt == 0 && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjWieldValue").Value == objLevelInt.ToString()
                                        select p));
                                }
                                if (objEmbueTypeInt > 0 && objDamageTypeInt == 0 && objMagicDamageInt == 0 && (objLevelInt == 1))
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                          p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString()) &&
                                        p.Element("ObjWieldValue").Value == objLevelInt.ToString()
                                        select p));
                                }

                                if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && objEmbueTypeInt > 0 && objLevelInt == 1)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                          p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString()) &&
                                        p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                                if ((objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0 && objDamageTypeInt == 0 && objMagicDamageInt == 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                        p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                        p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }

                                if ((objDamageTypeInt > 0 || objMagicDamageInt > 0) && (objLevelInt < 1 || objLevelInt > 1) && objEmbueTypeInt > 0)
                                {
                                    newDoc = new XDocument(new XElement("Objs",
                                        from p in xdocListInv.Element("Objs").Descendants("Obj")
                                        where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         (p.Element("ObjDamage").Value == objDamageTypeInt.ToString() ||
                                          p.Element("ObjMagicDamage").Value == objDamageTypeInt.ToString()) &&
                                        p.Element("ObjWieldValue").Value == objLevelInt.ToString() &&
                                        p.Element("ObjEmbue").Value == objEmbueTypeInt.ToString()
                                        select p));
                                }
                            }

                            break;

                        case 7:

                            if ((objClassName.Contains("Salvage")) && (objSalvWork == "None"))
                            {

                                newDoc = new XDocument(new XElement("Objs",
                                  from p in xdocListInv.Element("Objs").Descendants("Obj")
                                  where p.Element("ObjClass").Value.Contains(objClassName) &&
                                  p.Element("ObjMaterial").Value == objMat.ToString()
                                  select p));
                            }

                            else if ((objClassName.Contains("Salvage")) && ((objSalvWork == "1-6"))) // || (objSalvWork == "7-8") || (objSalvWork == "9")))
                            {
                                newDoc = new XDocument(new XElement("Objs",
                                  from p in xdocListInv.Element("Objs").Descendants("Obj")
                                  where p.Element("ObjClass").Value.Contains(objClassName) &&
                                  p.Element("ObjMaterial").Value == objMat.ToString() &&
                                      //     objSalvWork.Contains(p.Element("ObjWork").Value.Substring(0, 1))
                                   Convert.ToInt16(p.Element("ObjWork").Value) < 7
                                  select p));
                            }

                            else if ((objClassName.Contains("Salvage")) && (objSalvWork == "7-8")) //|| (objSalvWork == "9")))
                            {
                                newDoc = new XDocument(new XElement("Objs",
                                  from p in xdocListInv.Element("Objs").Descendants("Obj")
                                  where p.Element("ObjClass").Value.Contains(objClassName) &&
                                  p.Element("ObjMaterial").Value == objMat.ToString() &&
                                      //     objSalvWork.Contains(p.Element("ObjWork").Value.Substring(0, 1))
                                   Convert.ToInt16(p.Element("ObjWork").Value) > 6 && Convert.ToInt16(p.Element("ObjWork").Value) < 9
                                  select p));
                            }

                            else if ((objClassName.Contains("Salvage")) && (objSalvWork == "9"))
                            {
                                newDoc = new XDocument(new XElement("Objs",
                                  from p in xdocListInv.Element("Objs").Descendants("Obj")
                                  where p.Element("ObjClass").Value.Contains(objClassName) &&
                                  p.Element("ObjMaterial").Value == objMat.ToString() &&
                                    Convert.ToInt16(p.Element("ObjWork").Value) == 9
                                  select p));
                            }

                            else if ((objClassName.Contains("Salvage")) && (objSalvWork == "10"))
                            {
                                newDoc = new XDocument(new XElement("Objs",
                                  from p in xdocListInv.Element("Objs").Descendants("Obj")
                                  where p.Element("ObjClass").Value.Contains(objClassName) &&
                                  p.Element("ObjMaterial").Value == objMat.ToString() &&
                                  objSalvWork.ToString() == p.Element("ObjWork").Value
                                  select p));
                            }

                            break;
                        default:

                            if (objClassName != null && lstMySelects != null && lstMySelects[0].Trim() != "")
                            {

                                newDoc = new XDocument(new XElement("Objs",
                                     from p in xdocListInv.Element("Objs").Descendants("Obj")
                                     where p.Element("ObjClass").Value.Contains(objClassName) &&
                                         (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[0]) ||
                                          p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[0]))
                                     select p));
                            }

                            else if (objClassName != null && (mySelect == null || mySelect.Trim() == ""))
                            {

                                newDoc = new XDocument(new XElement("Objs",
                                     from p in xdocListInv.Element("Objs").Descendants("Obj")
                                     where p.Element("ObjClass").Value.Contains(objClassName)
                                     select p));
                            }

                            break;

                    } //end of switch
                    //{
                    newDoc.Save(inventorySelect);
                   // WriteToChat("I just saved inventorySelect");
                    int m = lstMySelects.Count;
                    if (m > 1)
                    {
                        for (int k = 1; k < m; k++)
                        {
                            newDoc = XDocument.Load(inventorySelect);
                            XDocument tempDoc;
                            tempDoc = new XDocument(new XElement("Objs",
                                  from p in newDoc.Element("Objs").Descendants("Obj")
                                  where
                                (p.Element("ObjName").Value.ToLower().Contains(lstMySelects[k]) ||
                                  p.Element("ObjSpellXml").Value.ToLower().Contains(lstMySelects[k]))
                                  select p));
                            tempDoc.Save(inventorySelect);

                        }
                    }
                    newDoc=null;
                    newDoc = null;
                    //}
                    //else
                    if ((mySelect == null || mySelect.Trim() == "") && objClassName == "None")

                    { GearFoundry.PluginCore.WriteToChat("You must choose a class or type something inbox"); }

                } //end of try //

                catch (Exception ex) { LogError(ex); }

                newDoc = XDocument.Load(inventorySelect);

                try
                {

                    IEnumerable<XElement> childElements = newDoc.Element("Objs").Descendants("Obj");

                    foreach (XElement childElement in childElements)
                    {
                        try
                        {
                            objIcon = Convert.ToInt32(childElement.Element("ObjIcon").Value);

                            objName = childElement.Element("ObjName").Value;
                            if (objClassName.Contains("Salvage"))
                            {
                                int objMaterial = Convert.ToInt32(childElement.Element("ObjMaterial").Value);
                                string objMaterialName = "";
                                foreach (IDNameLoadable item in MaterialInvList)
                                {
                                    if (item.ID == objMaterial)
                                    {
                                        objMaterialName = item.name;
                                        break;
                                    }
                                }

                                //     objName = objMaterialName + " " + objName;
                            }
                            toonInvName = childElement.Element("ToonName").Value.ToString();
                            long objID = Convert.ToInt32(childElement.Element("ObjID").Value);
                            string objIDstr = objID.ToString();
                            InventoryHudListRow = lstHudInventory.AddRow();
                            ((HudPictureBox)InventoryHudListRow[0]).Image = objIcon + 0x6000000;
                            ((HudStaticText)InventoryHudListRow[1]).FontHeight = nitemFontHeight;
                            ((HudStaticText)InventoryHudListRow[1]).Text = objName;
                            ((HudStaticText)InventoryHudListRow[2]).FontHeight = nitemFontHeight;
                            ((HudStaticText)InventoryHudListRow[2]).Text = toonInvName;
                            ((HudStaticText)InventoryHudListRow[3]).Text = objIDstr;
                        }

                        catch (Exception ex) { LogError(ex); }

                    }
                    newDoc = null;

                }
                catch (Exception ex) { LogError(ex); }
            }
        }
Esempio n. 40
0
        private void ButlerHudList_Click(object sender, int row, int col)
        {
            try
            {
                ButlerRow = ButlerHudList[row];
                int ItemGuid = Convert.ToInt32(((HudStaticText)ButlerRow[6]).Text);
                LootObject lo = new LootObject(AetherObjects.Collection[ItemGuid]);

                if(col == 0)
                {
                    Host.Actions.SelectItem(lo.Id);
                }
                if(col == 1)
                {
                    if(mGeneralSettings.EnabledHudSettings.bGearInspectorEnabled)
                    {
                        Core.Actions.SelectItem(lo.Id);
                        Core.Actions.RequestId(lo.Id);
                    }
                    else
                    {
                        if(mGeneralSettings.GearInspectorSettings.GSStrings){HudToChat(lo.GSReportString(),2);}
                        if(mGeneralSettings.GearInspectorSettings.AlincoStrings){HudToChat(lo.LinkString(),2);}
                    }
               			}
                if(col == 2)
                {
                    Core.Actions.MoveItem(lo.Id, AetherCharacter.CharStats.Id, 0, false);
                }
                if(col == 3 && !mButlerFilters.storage)
                {
                    if(Core.Actions.OpenedContainer == 0 || AetherObjects.Collection[Core.Actions.OpenedContainer].Name != "Storage")
                    {
                        WriteToChat("No storage container opened.");
                    }
                    else
                    {
                        Foundry_LoadAction(FoundryActionTypes.AddToStorage, lo.Id);
                    }
                }
                if(col == 4 && !mButlerFilters.storage)
                {
                    if(AetherObjects.Collection[Core.Actions.CurrentSelection].ObjectClass == AObjectClass.Npc ||  AetherObjects.Collection[Core.Actions.CurrentSelection].ObjectClass == AObjectClass.Player)
                    {
                       if(lo.Values(ALongValueKeys.EquippedSlots) > 0 || lo.Values(ALongValueKeys.Unknown10) == 56)
                       {
                           	WriteToChat("Unequip the item first.");
                       }
                       else
                       {
                       		Host.Actions.GiveItem(lo.Id, Host.Actions.CurrentSelection);
                       }
                    }
                    else
                    {
                        WriteToChat("First select an NPC, Player, or yourself.");
                    }
                }
                if(col == 5 && !mButlerFilters.storage)
                {
                    if(AetherTrade.TradeWindow.InTrade)
                    {
                        Core.Actions.TradeAdd(lo.Id);
                    }
                    else if(AetherTrade.VendorId != 0)
                    {
                       if(lo.Values(ALongValueKeys.EquippedSlots) > 0 || lo.Values(ALongValueKeys.Unknown10) == 56)
                       {
                           	WriteToChat("Unequip the item first.");
                       }
                       else
                       {
                       		Core.Actions.VendorAddSellList(lo.Id);
                       }
                    }
                }
            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 41
0
        private void UpdateButlerHudList()
        {
            try
            {
                if (ButlerHudView == null) {return;}
                int scroll = ButlerHudList.ScrollPosition;

                if(mButlerFilters.storage && Core.Actions.OpenedContainer == 0)
                {
                    mButlerFilters.storage = false;
                    ButlerQuickSortStorage.StickyDown = false;
                }

                HashSet<AetherObject> ButlerInventory;

                if(mButlerFilters.storage)
                {
                    ButlerInventory = new HashSet<AetherObject>(AetherObjects.GetByObjectContainer(Core.Actions.OpenedContainer));
                    AetherObject Bag = ButlerInventory.Where(x => x.ObjectClass == AObjectClass.Container).FirstOrDefault();
                    if(Bag != null){ButlerInventory.UnionWith(new HashSet<AetherObject>(AetherObjects.GetByObjectContainer(Bag.Id)));}
                }
                else{ButlerInventory = new HashSet<AetherObject>(AetherObjects.Inventory);}

                if(mButlerFilters.name.Length != 0)
                {
                    ButlerInventory.RemoveWhere(x => [email protected](@mButlerFilters.name));
                }

                if(mButlerFilters.equipped)
                {
                    ButlerInventory.RemoveWhere(x => x.Values(ALongValueKeys.EquippedSlots) == 0);
                }
                else if(mButlerFilters.notquipped)
                {
                    ButlerInventory.RemoveWhere(x => x.Values(ALongValueKeys.EquippedSlots) !=  0);
                    ButlerInventory.RemoveWhere(x => x.Values(ALongValueKeys.Unknown10) ==  56);
                }

                if(mButlerFilters.melee) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.MeleeWeapon);
                else if(mButlerFilters.missile) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.MissileWeapon);
                else if(mButlerFilters.caster) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.WandStaffOrb);
                else if(mButlerFilters.armor) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.Armor && x.ObjectClass != AObjectClass.Clothing);
                else if(mButlerFilters.keys) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.Key);
                else if(mButlerFilters.keyrings) ButlerInventory.RemoveWhere(x => !x.Name.Contains("Keyring"));
                else if(mButlerFilters.manastones) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.ManaStone);
                else if(mButlerFilters.healkits) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.HealingKit);
                else if(mButlerFilters.potion) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.Food);
                else if(mButlerFilters.lockpicks) ButlerInventory.RemoveWhere(x => x.ObjectClass != AObjectClass.Lockpick);

                ButlerHudList.ClearRows();
                if(mButlerFilters.storage)
                {
                    foreach(AetherObject wo in ButlerInventory.OrderBy(x => x.Name))
                    {
                        ButlerHudListRow = ButlerHudList.AddRow();

                        ((HudPictureBox)ButlerHudListRow[0]).Image = wo.Icon + 0x6000000;
                        if(wo.ObjectClass == AObjectClass.Salvage)
                        {
                            ((HudStaticText)ButlerHudListRow[1]).Text = tDataTable.MaterialIndex[(int)wo.Values(ALongValueKeys.Material)].name +
                                " [" + wo.Values(ADoubleValueKeys.SalvageWorkmanship).ToString("0.0") + "]";
                        }
                        else
                        {
                            ((HudStaticText)ButlerHudListRow[1]).Text = wo.Name;
                        }

                        if (wo.Id == Core.Actions.CurrentSelection)
                        {
                            ((HudPictureBox)ButlerHudListRow[0]).Image = 0x6006119;
                            ((HudStaticText)ButlerHudListRow[1]).TextColor = Color.Red;
                        }

                        ((HudPictureBox)ButlerHudListRow[2]).Image = GearGraphics.GB_MAIN_PACK_ICON;
                        ((HudStaticText)ButlerHudListRow[6]).Text = wo.Id.ToString();
                     }
                }
                else
                {
                    foreach(AetherObject wo in ButlerInventory.OrderBy(x => x.Name))
                    {
                        ButlerHudListRow = ButlerHudList.AddRow();

                        ((HudPictureBox)ButlerHudListRow[0]).Image = wo.Icon + 0x6000000;
                        if(wo.ObjectClass == AObjectClass.Salvage)
                        {
                            ((HudStaticText)ButlerHudListRow[1]).Text = tDataTable.MaterialIndex[(int)wo.Values(ALongValueKeys.Material)].name +
                                " [" + wo.Values(ADoubleValueKeys.SalvageWorkmanship).ToString("0.0") + "]";
                        }
                        else
                        {
                            ((HudStaticText)ButlerHudListRow[1]).Text = wo.Name;
                        }

                        if(wo.Values(ALongValueKeys.EquippedSlots) > 0 || wo.Values(ALongValueKeys.Unknown10) == 56)
                        {
                            ((HudStaticText)ButlerHudListRow[1]).TextColor = Color.Gold;
                        }

                        if (wo.Id == Core.Actions.CurrentSelection)
                        {
                            ((HudPictureBox)ButlerHudListRow[0]).Image = 0x6006119;
                            ((HudStaticText)ButlerHudListRow[1]).TextColor = Color.Red;
                        }

                        ((HudPictureBox)ButlerHudListRow[2]).Image = GearGraphics.GB_MAIN_PACK_ICON;
                        ((HudPictureBox)ButlerHudListRow[3]).Image = GearGraphics.GB_STORE_ICON;
                        ((HudPictureBox)ButlerHudListRow[4]).Image = GearGraphics.GB_GIVE_ICON;
                        ((HudPictureBox)ButlerHudListRow[5]).Image = GearGraphics.GB_TRADEVENDOR_ICON;
                        ((HudStaticText)ButlerHudListRow[6]).Text = wo.Id.ToString();
                    }
                }

                ButlerHudList.ScrollPosition = scroll;

                ButlerHudSelectedCount.Text = ButlerInventory.Count.ToString();

                ButlerBurden.Text = (AetherCharacter.BurdenPct * 100).ToString("N0") + "%";
                if(AetherCharacter.BurdenPct < 1){ButlerBurden.TextColor = Color.Green;}
                else if(AetherCharacter.BurdenPct < 2){ButlerBurden.TextColor = Color.Yellow;}
                else if(AetherCharacter.BurdenPct >= 2){ButlerBurden.TextColor = Color.Red;}
                if(mButlerFilters.storage){ButlerPackSpacesAvailable.Text = CalculateAvailableStorage();}
                else{ButlerPackSpacesAvailable.Text = CalculateAvailableSpace();}
            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 42
0
        private void RenderChiefGearInspectPageMenuTabProperties()
        {
            try
            {
                if (ChiefGearInspectPageMenuTabProperties != null) { DisposeChiefGearInspectPageMenuTabProperties(); }
                int i = 0;

                //Controls for Wield Skill
                HudStaticText lblWeapCat = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblWeapCat.Text = "Wield Skill";
                ChiefGearInspectPageMenuTabProperties.AddControl(lblWeapCat, new Rectangle(5, 5, 80, 16));

                ControlGroup WeaponAppliesToChoices = new ControlGroup();
                cboWeaponAppliesTo = new HudCombo(WeaponAppliesToChoices);
                i = 0;
                foreach (IDNameLoadable info in WeaponTypeList)
                {
                    cboWeaponAppliesTo.AddItem(info.name, i);
                    i++;
                }
                cboWeaponAppliesTo.Current = 0;
                ChiefGearInspectPageMenuTabProperties.AddControl(cboWeaponAppliesTo, new Rectangle(5, 20, 125, 20));

                //Controls for mastery
                HudStaticText lblMastCat = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblMastCat.Text = "Mastery";
                ChiefGearInspectPageMenuTabProperties.AddControl(lblMastCat, new Rectangle(5, 45, 80, 20));

                ControlGroup MastCatChoices = new ControlGroup();
                cboMasteryType = new HudCombo(MastCatChoices);
                i = 0;
                foreach (IDNameLoadable info in MasteryIndex)
                {
                    cboMasteryType.AddItem(info.name, i);
                    i++;
                }
                cboMasteryType.Current = 0;
                ChiefGearInspectPageMenuTabProperties.AddControl(cboMasteryType, new Rectangle(5, 65, 125, 20));

                //Controls for Damage Type
                HudStaticText lblDamageTypes = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblDamageTypes.Text = "Damage Type:}";
                ChiefGearInspectPageMenuTabProperties.AddControl(lblDamageTypes, new Rectangle(5, 90, 125, 16));

                lstDamageTypes = new HudList();
                lstDamageTypesListRow = new HudList.HudListRowAccessor();

                ChiefGearInspectPageMenuTabProperties.AddControl(lstDamageTypes, new Rectangle(5, 110, 125, 90));
                lstDamageTypes.AddColumn(typeof(HudCheckBox), 5, null);
                lstDamageTypes.AddColumn(typeof(HudStaticText), 110, null);
                lstDamageTypes.AddColumn(typeof(HudStaticText), 1, null);

                HudStaticText lblEnabled10025 = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblEnabled10025.Text = "Enabled";
                ChiefGearInspectPageMenuTabProperties.AddControl(lblEnabled10025, new Rectangle(5, 205, 40, 16));

                HudStaticText lblRuleReqSkilla = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleReqSkilla.Text = "SkillLevel";
                ChiefGearInspectPageMenuTabProperties.AddControl(lblRuleReqSkilla, new Rectangle(55, 205, 75, 16));

                chkRuleWeaponsa = new HudCheckBox();
                chkRuleWeaponsa.Text = "";
                ChiefGearInspectPageMenuTabProperties.AddControl(chkRuleWeaponsa, new Rectangle(15, 225, 40, 16));
                chkRuleWeaponsa.Checked = true;

                txtRuleReqSkilla = new HudTextBox();
                txtRuleReqSkilla.Text = "355";
                ChiefGearInspectPageMenuTabProperties.AddControl(txtRuleReqSkilla, new Rectangle(55, 225, 75, 16));

                chkRuleWeaponsb = new HudCheckBox();
                chkRuleWeaponsb.Text = "";
                ChiefGearInspectPageMenuTabProperties.AddControl(chkRuleWeaponsb, new Rectangle(15, 245, 40, 16));
                chkRuleWeaponsb.Checked = true;

                txtRuleReqSkillb = new HudTextBox();
                txtRuleReqSkillb.Text = "375";
                ChiefGearInspectPageMenuTabProperties.AddControl(txtRuleReqSkillb, new Rectangle(55, 245, 75, 16));

                chkRuleWeaponsc = new HudCheckBox();
                chkRuleWeaponsc.Text = "";
                ChiefGearInspectPageMenuTabProperties.AddControl(chkRuleWeaponsc, new Rectangle(15, 265, 40, 16));
                chkRuleWeaponsc.Checked = true;

                txtRuleReqSkillc = new HudTextBox();
                txtRuleReqSkillc.Text = "385";
                ChiefGearInspectPageMenuTabProperties.AddControl(txtRuleReqSkillc, new Rectangle(55, 265, 75, 16));

                chkRuleWeaponsd = new HudCheckBox();
                chkRuleWeaponsd.Text = "";
                ChiefGearInspectPageMenuTabProperties.AddControl(chkRuleWeaponsd, new Rectangle(15, 285, 40, 16));
                chkRuleWeaponsd.Checked = false;

                txtRuleReqSkilld = new HudTextBox();
                txtRuleReqSkilld.Text = "";
                ChiefGearInspectPageMenuTabProperties.AddControl(txtRuleReqSkilld, new Rectangle(55, 285, 75, 16));

                //Sets
                HudStaticText lblSets = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblSets.Text = "Sets";
                ChiefGearInspectPageMenuTabProperties.AddControl(lblSets, new Rectangle(150, 5, 110, 16));

                lstRuleSets = new HudList();
                lstRuleSetsListRow = new HudList.HudListRowAccessor();

                ChiefGearInspectPageMenuTabProperties.AddControl(lstRuleSets, new Rectangle(150, 25, 200, 255));
                lstRuleSets.AddColumn(typeof(HudCheckBox), 5, null);
                lstRuleSets.AddColumn(typeof(HudStaticText), 195, null);
                lstRuleSets.AddColumn(typeof(HudStaticText), 1, null);

                SubscribeChiefGearInspectPageMenuTabViewPageSearchRulePropertiesEvents();
            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 43
0
        private void TaskCompleteList_Click(object sender, int row, int col)
        {
            try
            {
                int scroll = TaskCompleteList.ScrollPosition;

                ClickRow = TaskCompleteList[row];

                int ctindex = mKTSet.MyCollectTasks.FindIndex(x => x.TaskName == ((HudStaticText)ClickRow[0]).Text);
                int ktindex = mKTSet.MyKillTasks.FindIndex(x => x.TaskName == ((HudStaticText)ClickRow[0]).Text);

                if(ctindex > -1)
                {
                    string NPCs = String.Empty;
                    foreach(string name in mKTSet.MyCollectTasks[ctindex].NPCNames)
                    {
                        NPCs += ", " + name;
                    }
                    WriteToChat(mKTSet.MyCollectTasks[ctindex].TaskName + NPCs + ", " + mKTSet.MyCollectTasks[ctindex].NPCInfo + CoordsStringLink(mKTSet.MyCollectTasks[ctindex].NPCCoords));
                }

                if(ktindex > -1)
                {
                    string NPCs = String.Empty;
                    foreach(string name in mKTSet.MyKillTasks[ktindex].NPCNames)
                    {
                        NPCs += ", " + name;
                    }
                    WriteToChat(mKTSet.MyKillTasks[ktindex].TaskName + NPCs + ", " + mKTSet.MyKillTasks[ktindex].NPCInfo + CoordsStringLink(mKTSet.MyKillTasks[ktindex].NPCCoords));

                }

                UpdateTaskPanel();

                TaskCompleteList.ScrollPosition = scroll;

            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 44
0
        private void CTPopMobsList_Click(object sender, int row, int col)
        {
            try
            {
                int scroll = CTPopMobsList.ScrollPosition;

                CTPopRow = CTPopMobsList[row];
                if(col == 1)
                {
                    CTHolder.MobNames.RemoveAll(x => x == ((HudStaticText)CTPopRow[0]).Text);
                }

                CTPopMobTxt.Text = String.Empty;
                CTPopMobsList.ClearRows();

                foreach(string mob in CTHolder.MobNames)
                {
                    CTPopRow = CTPopMobsList.AddRow();
                    ((HudStaticText)CTPopRow[0]).Text = mob;
                    ((HudPictureBox)CTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                CTPopMobsList.ScrollPosition = scroll;

            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 45
0
        private void TaskIncompleteList_Click(object sender, int row, int col)
        {
            try
            {
                int scroll = TaskIncompleteList.ScrollPosition;

                ClickRow = TaskIncompleteList[row];

                int ctindex = mKTSet.MyCollectTasks.FindIndex(x => x.TaskName == ((HudStaticText)ClickRow[0]).Text);
                int ktindex = mKTSet.MyKillTasks.FindIndex(x => x.TaskName == ((HudStaticText)ClickRow[0]).Text);

                if(ctindex > -1)
                {
                    WriteToChat(mKTSet.MyCollectTasks[ctindex].TaskName + " (" + mKTSet.MyCollectTasks[ctindex].CurrentCount.ToString() + "/" + mKTSet.MyCollectTasks[ctindex].CompleteCount.ToString() +")");
                    WriteToChat("Drops from the following creature types:");
                    foreach(string creature in mKTSet.MyCollectTasks[ctindex].MobNames)
                    {
                        WriteToChat(creature);
                    }
                }

                if(ktindex > -1)
                {
                    WriteToChat(mKTSet.MyKillTasks[ktindex].TaskName + " (" + mKTSet.MyKillTasks[ktindex].CurrentCount.ToString() + "/" + mKTSet.MyKillTasks[ktindex].CompleteCount.ToString() +")");
                    WriteToChat("Kill any of the following creature types:");
                    foreach(string creature in mKTSet.MyKillTasks[ktindex].MobNames)
                    {
                        WriteToChat(creature);
                    }
                }

                UpdateTaskPanel();

                TaskIncompleteList.ScrollPosition = scroll;
            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 46
0
        private void RenderChiefGearInspectPageMenuTabReqSpells()
        {
            try
            {
                HudStaticText lblCurrentSpells = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblCurrentSpells.Text = "Current Spells";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(lblCurrentSpells, new Rectangle(5, 0, 130, 16));

                lstRuleSpellsEnabled = new HudList();
                lstRuleSpellsEnabledListRow = new HudList.HudListRowAccessor();

                ChiefGearInspectPageMenuTabReqSpells.AddControl(lstRuleSpellsEnabled, new Rectangle(5, 20, 220, 200));
                lstRuleSpellsEnabled.AddColumn(typeof(HudCheckBox), 5, null);
                lstRuleSpellsEnabled.AddColumn(typeof(HudStaticText), 195, null);
                lstRuleSpellsEnabled.AddColumn(typeof(HudStaticText), 1, null);

                HudStaticText lblRuleMoreSpells = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleMoreSpells.Text = "Available Spells";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(lblRuleMoreSpells, new Rectangle(250, 0, 180, 16));

                lstRuleSpells = new HudList();
                lstRuleSpellsListRow = new HudList.HudListRowAccessor();

                ChiefGearInspectPageMenuTabReqSpells.AddControl(lstRuleSpells, new Rectangle(250, 20, 250, 200));
                lstRuleSpells.AddColumn(typeof(HudCheckBox), 5, null);
                lstRuleSpells.AddColumn(typeof(HudStaticText), 195, null);
                lstRuleSpells.AddColumn(typeof(HudStaticText), 1, null);

                HudStaticText lblRuleFilterSpells = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleFilterSpells.Text = "Filter Spells by:";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(lblRuleFilterSpells, new Rectangle(5, 230, 130, 16));

                chkRuleFilterlvl8 = new HudCheckBox();
                chkRuleFilterlvl8.Text = "lvl 8";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(chkRuleFilterlvl8, new Rectangle(5, 250, 70, 16));
                chkRuleFilterlvl8.Checked = false;

                chkRuleFilterLegend = new HudCheckBox();
                chkRuleFilterLegend.Text = "Legendary";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(chkRuleFilterLegend, new Rectangle(80, 250, 70, 16));
                chkRuleFilterLegend.Checked = false;

                chkRuleFilterEpic = new HudCheckBox();
                chkRuleFilterEpic.Text = "Epic";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(chkRuleFilterEpic, new Rectangle(160, 250, 70, 16));
                chkRuleFilterEpic.Checked = false;

                chkRuleFilterMajor = new HudCheckBox();
                chkRuleFilterMajor.Text = "Major";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(chkRuleFilterMajor, new Rectangle(240, 250, 70, 16));
                chkRuleFilterMajor.Checked = false;

                chkRuleFilterCloak = new HudCheckBox();
                chkRuleFilterCloak.Text = "Cloak";
                ChiefGearInspectPageMenuTabReqSpells.AddControl(chkRuleFilterCloak, new Rectangle(320, 250, 70, 16));
                chkRuleFilterCloak.Checked = false;

                SubscribeChiefGearInspectPageMenuTabViewPageSearchRuleReqSpellsEvents();

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 47
0
        private void CTPopMobAddButton_Hit(object sender, EventArgs e)
        {
            try
            {
                int scroll = CTPopMobsList.ScrollPosition;

                CTHolder.MobNames.Add(CTPopMobTxt.Text);
                CTPopMobTxt.Text = String.Empty;
                CTPopMobsList.ClearRows();

                foreach(string mob in CTHolder.MobNames)
                {
                    CTPopRow = CTPopMobsList.AddRow();
                    ((HudStaticText)CTPopRow[0]).Text = mob;
                    ((HudPictureBox)CTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                CTPopMobsList.ScrollPosition = scroll;
            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 48
0
        private void UpdateTactician()
        {
            try
            {
                if(TacticianHudView == null) {return;}

                int scroll = TacticianDiplayList.ScrollPosition;

                TacticianDiplayList.ClearRows();

                for(int mobindex = 0; mobindex < CombatHudMobTrackingList.Count; mobindex++)
                {
                    if(CombatHudMobTrackingList[mobindex].DebuffSpellList.Count > 0 || gtSettings.bShowAll)
                    {
                        TacticianRow = TacticianDiplayList.AddRow();
                        //MobHealthBar
                        ((HudProgressBar)TacticianRow[0]).FontHeight = 8;
                        if(CombatHudMobTrackingList[mobindex].Name.Length > 12)
                        {
                            ((HudProgressBar)TacticianRow[0]).PreText = CombatHudMobTrackingList[mobindex].Name.Substring(0,12);
                        }
                        else
                        {
                            ((HudProgressBar)TacticianRow[0]).PreText = CombatHudMobTrackingList[mobindex].Name;
                        }
                        ((HudProgressBar)TacticianRow[0]).Min = 0;
                        ((HudProgressBar)TacticianRow[0]).Max = 100;
                        ((HudProgressBar)TacticianRow[0]).ProgressEmpty = EmptyBar;
                        if(CombatHudMobTrackingList[mobindex].Id == Core.Actions.CurrentSelection){((HudProgressBar)TacticianRow[0]).ProgressFilled = CurrentBar;}
                        else{((HudProgressBar)TacticianRow[0]).ProgressFilled = RedBar;}
                        ((HudProgressBar)TacticianRow[0]).Position = CombatHudMobTrackingList[mobindex].HealthRemaining;

                        ((HudButton)TacticianRow[1]).Text = CombatHudMobTrackingList[mobindex].DebuffSpellList.Count.ToString();
                        for(int i = 0; i < 7; i++)
                        {
                            if(i < CombatHudMobTrackingList[mobindex].DebuffSpellList.Count)
                            {
                                MonsterObject.DebuffSpell debuff = CombatHudMobTrackingList[mobindex].DebuffSpellList[i];
                                if(debuff.SecondsRemaining <= 15) {((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, DebuffExpiring);}
                                else if(debuff.SecondsRemaining <= 30){((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, DebuffWarning);}
                                else{((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, DebuffCurrent);}
                                ((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, SpellIndex[debuff.SpellId].spellicon);
                            }
                            else
                            {
                                ((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, new ACImage(Color.Black));
                            }

                        }
                        ((HudStaticText)TacticianRow[9]).Text = CombatHudMobTrackingList[mobindex].Id.ToString();

                    }
                }
                if(gtSettings.RenderCurrentTargetDebuffView)
                {
                    if(Core.Actions.CurrentSelection != 0 && Core.WorldFilter[Core.Actions.CurrentSelection].ObjectClass == ObjectClass.Monster)
                    {
                        UpdateCurrentTargetDebuffBar(CombatHudMobTrackingList.Find(x => x.Id == Core.Actions.CurrentSelection));
                    }
                }

                TacticianDiplayList.ScrollPosition = scroll;

            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 49
0
        private void KillTaskList_Click(object sender, int row, int col)
        {
            try
            {
                int scroll = KillTaskList.ScrollPosition;

                ClickRow = KillTaskList[row];
                KillTaskSelected.Text = ((HudStaticText)ClickRow[1]).Text;
                KillTaskSelected.TextColor = Color.Red;

                if(col == 0)
                {
                    mKTSet.MyKillTasks.Find(x => x.TaskName == ((HudStaticText)ClickRow[1]).Text).track = ((HudCheckBox)ClickRow[0]).Checked;
                }
                if(col == 1)
                {
                    KillTask kt = mKTSet.MyKillTasks.Find(x => x.TaskName == ((HudStaticText)ClickRow[1]).Text);
                    string NPCs = String.Empty;
                    foreach(string npc in kt.NPCNames)
                    {
                        NPCs += npc + ", ";
                    }
                    WriteToChat(kt.TaskName + ":  " + NPCs + kt.NPCInfo + CoordsStringLink(kt.NPCCoords));
                }

                UpdateTaskPanel();

                KillTaskList.ScrollPosition = scroll;
            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 50
0
        private void RenderChiefGearInspectPageSalvage()
        {
            try
            {
                lstNotifySalvage = new HudList();
                lstNotifySalvageListRow = new HudList.HudListRowAccessor();
                ChiefGearInspectPageSalvage.AddControl(lstNotifySalvage, new Rectangle(5, 5, 260, 300));
                lstNotifySalvage.AddColumn(typeof(HudCheckBox), 5, null);
                lstNotifySalvage.AddColumn(typeof(HudStaticText), 130, null);
                 lstNotifySalvage.AddColumn(typeof(HudStaticText), 60, null);
                 lstNotifySalvage.AddColumn(typeof(HudStaticText), 1, null);

                HudStaticText lblSalvagelblName = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblSalvagelblName.Text = "Salvage Material: ";
                ChiefGearInspectPageSalvage.AddControl(lblSalvagelblName, new Rectangle(5,310, 250, 16));

                 lblSalvageName = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblSalvageName.Text = "";
                ChiefGearInspectPageSalvage.AddControl(lblSalvageName, new Rectangle(5, 330, 250, 16));

                 HudStaticText lblSalvageString = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblSalvageString.Text= "Salvage Combine String: ";
                ChiefGearInspectPageSalvage.AddControl(lblSalvageString, new Rectangle(5, 360, 150, 16));

                txtSalvageString = new HudTextBox();
                txtSalvageString.Text = "";
                ChiefGearInspectPageSalvage.AddControl(txtSalvageString, new Rectangle(5, 380, 150, 20));

                btnUpdateSalvage = new HudButton();
                btnUpdateSalvage.Text = "Update";
                ChiefGearInspectPageSalvage.AddControl(btnUpdateSalvage, new Rectangle(5, 410, 90, 18));

                SubscribeChiefGearInspectPageSalvage();

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 51
0
        private void KTPopNPCList_Click(object sender, int row, int col)
        {
            try
            {
                int scroll = KTPopNPCList.ScrollPosition;

                KTPopRow = KTPopNPCList[row];
                if(col == 1)
                {
                    KTHolder.NPCNames.RemoveAll(x => x == ((HudStaticText)KTPopRow[0]).Text);
                }

                KTPopNPCTxt.Text = String.Empty;
                KTPopNPCList.ClearRows();

                foreach(string npc in KTHolder.NPCNames)
                {
                    KTPopRow = KTPopNPCList.AddRow();
                    ((HudStaticText)KTPopRow[0]).Text = npc;
                    ((HudPictureBox)KTPopRow[1]).Image = GearGraphics.RemoveCircle;
                }

                KTPopNPCList.ScrollPosition = scroll;
            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 52
0
        private void RenderChiefGearInspectPageMobs()
        {
            try
            {
                WriteToChat("I am in hud to render mobs");

                lstmyMobs = new HudList();
                lstmyMobsListRow = new HudList.HudListRowAccessor();
                ChiefGearInspectPageMobs.AddControl(lstmyMobs, new Rectangle(5, 5, 260, 300));
                lstmyMobs.AddColumn(typeof(HudCheckBox), 5, null);
                lstmyMobs.AddColumn(typeof(HudStaticText), 230, null);
                lstmyMobs.AddColumn(typeof(HudPictureBox), 10, null);

                txtmyMobName = new HudTextBox();
                txtmyMobName.Text = "";
                ChiefGearInspectPageMobs.AddControl(txtmyMobName, new Rectangle(8, 320, 150, 20));

                btnUpdateMobItem = new HudButton();
                btnUpdateMobItem.Text = "Update";
                ChiefGearInspectPageMobs.AddControl(btnUpdateMobItem, new Rectangle(190, 320, 90, 18));

                btnAddMobItem = new HudButton();
                btnAddMobItem.Text = "Add New Mob";
                ChiefGearInspectPageMobs.AddControl(btnAddMobItem, new Rectangle(190, 360, 90, 18));

                chkmyMobExact = new HudCheckBox();
                chkmyMobExact.Text = "Exact Match";
                ChiefGearInspectPageMobs.AddControl(chkmyMobExact, new Rectangle(8, 370, 80, 16));
                chkmyMobExact.Checked = false;

                SubscribeChiefGearInspectPageMobs();

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 53
0
        private void UpdateTactician()
        {
            try
            {
                if(TacticianHudView != null)
                {

                    int scroll = TacticianDiplayList.ScrollPosition;

                    TacticianDiplayList.ClearRows();
                    List<AetherObject> CombatHudMobTrackingList;

                    if(mGeneralSettings.GearTacticianSettings.bShowAll)
                    {
                        CombatHudMobTrackingList = AetherObjects.Monsters.OrderBy(x => AetherObjects.CharacterDistanceVector(x.Id)).ToList();
                    }
                    else
                    {
                        CombatHudMobTrackingList = AetherObjects.DebuffedMonsters.OrderBy(x => AetherObjects.CharacterDistanceVector(x.Id)).ToList();
                    }

                    for(int mobindex = 0; mobindex < CombatHudMobTrackingList.Count; mobindex++)
                    {
                        if(AetherObjects.CharacterDistanceVector(CombatHudMobTrackingList[mobindex].Id) * 100 < mGeneralSettings.GearSenseSettings.LandscapeForgetDistance)
                        {
                            TacticianRow = TacticianDiplayList.AddRow();
                            ((HudProgressBar)TacticianRow[0]).FontHeight = 8;
                            if(CombatHudMobTrackingList[mobindex].Name.Length > 12)
                            {
                                ((HudProgressBar)TacticianRow[0]).PreText = CombatHudMobTrackingList[mobindex].Name.Substring(0,12);
                            }
                            else
                            {
                                ((HudProgressBar)TacticianRow[0]).PreText = CombatHudMobTrackingList[mobindex].Name;
                            }
                            ((HudProgressBar)TacticianRow[0]).Min = 0;
                            ((HudProgressBar)TacticianRow[0]).Max = 100;
                            ((HudProgressBar)TacticianRow[0]).ProgressEmpty = EmptyBar;
                            if(CombatHudMobTrackingList[mobindex].Id == Core.Actions.CurrentSelection){((HudProgressBar)TacticianRow[0]).ProgressFilled = CurrentBar;}
                            else{((HudProgressBar)TacticianRow[0]).ProgressFilled = RedBar;}
                            ((HudProgressBar)TacticianRow[0]).Position = Convert.ToInt32(CombatHudMobTrackingList[mobindex].FractionalHealth * 100);

                            ((HudButton)TacticianRow[1]).Text = CombatHudMobTrackingList[mobindex].DebuffSpells.Count.ToString();
                            for(int i = 0; i < 7; i++)
                            {
                                if(i < CombatHudMobTrackingList[mobindex].DebuffSpells.Count)
                                {
                                    if(CombatHudMobTrackingList[mobindex].DebuffSpells[i].SecondsRemaining <= 15) {((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, DebuffExpiring);}
                                    else if(CombatHudMobTrackingList[mobindex].DebuffSpells[i].SecondsRemaining <= 30){((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, DebuffWarning);}
                                    else{((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, DebuffCurrent);}
                                    ((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, tDataTable.SpellIndex[CombatHudMobTrackingList[mobindex].DebuffSpells[i].DebuffId].spellicon);
                                }
                                else
                                {
                                    ((HudImageStack)TacticianRow[i+2]).Add(DebuffRectangle, new ACImage(Color.Black));
                                }

                            }
                            ((HudStaticText)TacticianRow[9]).Text = CombatHudMobTrackingList[mobindex].Id.ToString();
                        }

                    }
                    TacticianDiplayList.ScrollPosition = scroll;
                }

                UpdateCurrentTargetDebuffBar();

            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 54
0
        private void DisposeArmorUpdateTabLayout()
        {
            try
            {
                if (!ArmorUpdateTab) { return; }
                ArmorUpdateHudList.Click -= (sender, row, col) => ArmorUpdateHudList_Click(sender, row, col);
                ArmorUpdateHudListRow = null;
                ArmorUpdateHudList.Dispose();
                ArmorAvailableList.Click -= (sender, row, col) => ArmorAvailableList_Click(sender, row, col);
                ArmorAvailableListRow = null;
                ArmorAvailableList.Dispose();
                lblToonArmorUpdateName.Text = "";
                lblToonArmorUpdateName = null;
                toonArmorUpdateName = null;
                btnClearListArmorAvailable.Hit -= (sender, index) => btnClearListArmorAvailable_Hit(sender, index);
                btnListArmorAvailable.Hit -= (sender, index) => btnListArmorAvailable_Hit(sender, index);
               btnListArmorAvailable = null;
                btnClearListArmorAvailable = null;
                lblToonArmorUpdateLevel.Text = "";
                lblToonArmorUpdateLevel = null;
                lblToonArmorUpdateMaster.Text = "";
                lblToonArmorUpdateMaster = null;
                lblArmorUpdateChoice.Text = "";
                lblArmorUpdateChoice = null;
                txtArmorUpdateChoice.Text = "";
                txtArmorUpdateChoice = null;
                lblArmorUpdateClass.Text = "";
                lblArmorUpdateClass = null;
                txtArmorUpdateClass.Text = "";
                txtArmorUpdateClass= null;
                lblArmorUpdateCovers.Text = "";
                lblArmorUpdateCovers = null;
                cboArmorUpdateCovers.Current = 0;
                cboArmorUpdateCovers = null;
                lblArmorUpdateSet.Text = "";
                lblArmorUpdateSet = null;
                cboArmorUpdateSet.Current = 0;
                cboArmorUpdateSet = null;
               // lblToonArmorUpdateNameInfo.Text = "";
                //lblToonArmorUpdateNameInfo = null;

                ClearArmorUpdateTabVariables();

                ArmorUpdateTab = false;

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 55
0
        private void FillArmorHudList()
        {
            try
            {
                xdocGenArmor = XDocument.Load(genArmorFilename);
                myArmor = new List<XElement>();

                IEnumerable<XElement> marmor = xdocGenArmor.Element("Objs").Descendants("Obj");

                foreach (XElement el in marmor)
                {
                    if (el.Element("ToonName").Value == toonArmorName)
                    {
                        myArmor.Add(el);

                        int icon = Convert.ToInt32(el.Element("ArmorIcon").Value);
                        string armorpiece = el.Element("ArmorName").Value;
                        string spells = el.Element("ArmorSpellXml").Value;
                        string armorclass = el.Element("ArmorClass").Value;
                        objArmorSetName = String.Empty;
                        if (armorclass == "Armor")
                        {
                            if (Convert.ToInt32(el.Element("ArmorSet").Value) > 0)
                            { objArmorSetName = SetsIndex[Convert.ToInt32(el.Element("ArmorSet").Value)].name; }
                        }

                        ArmorHudListRow = ArmorHudList.AddRow();
                        nitemFontHeight = nitemFontHeight;
                        ((HudPictureBox)ArmorHudListRow[0]).Image = icon + 0x6000000;
                        ((HudStaticText)ArmorHudListRow[1]).Text = armorpiece;
                        ((HudStaticText)ArmorHudListRow[1]).FontHeight = nitemFontHeight;
                        ((HudStaticText)ArmorHudListRow[2]).Text = objArmorSetName;
                        ((HudStaticText)ArmorHudListRow[2]).FontHeight = nitemFontHeight;
                        ((HudStaticText)ArmorHudListRow[3]).Text = spells;
                       ((HudStaticText)ArmorHudListRow[3]).FontHeight = nitemFontHeight;

                    }
                }
                ArmorHudView.UserResizeable = true;
                xdocGenArmor = null;
               }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 56
0
        private void DisposeChiefGearInspectPageMenuTabMain()
        {
            try
            {
                unsubscribeChiefGearInspectPageMenuTabViewPageSearchRuleMainEvents();
                if(lstRuleApplies != null){lstRuleApplies.Dispose();}
                if(lstRuleAppliesListRow != null){lstRuleAppliesListRow = null;}
                if(lstRuleSlots != null){lstRuleSlots.Dispose();}
                if(lstRuleSlotsListRow != null){lstRuleSlotsListRow = null;}
                if(txtRuleName != null){txtRuleName.Dispose();}
                if(txtRulePriority != null){txtRulePriority.Dispose();}
                if(txtRuleMaxCraft != null){txtRuleMaxCraft.Dispose();}
                if(txtGearScore != null){txtGearScore.Dispose();}
                if(txtRuleArcaneLore != null){txtRuleArcaneLore.Dispose();}
                if(txtRuleWieldLevel != null){txtRuleWieldLevel.Dispose();}
                if(txtRuleNumSpells != null){txtRuleNumSpells.Dispose();}
                bChiefGearInspectPageTabViewMain = false;

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 57
0
        private void RenderArmorUpdateTabLayout()
        {
            try
            {
               lblToonArmorUpdateName = new HudStaticText();
                lblToonArmorUpdateName.FontHeight = nmenuFontHeight;
                lblToonArmorUpdateName.Text = "";
                lblToonArmorUpdateLevel = new HudStaticText();
                lblToonArmorUpdateLevel.FontHeight = nmenuFontHeight;
                lblToonArmorUpdateMaster = new HudStaticText();
                lblToonArmorUpdateMaster.FontHeight = nmenuFontHeight;
                ArmorUpdateHudList = new HudList();
                ArmorUpdateHudListRow = new HudList.HudListRowAccessor();
                ArmorAvailableList = new HudList();
                ArmorAvailableListRow = new HudList.HudListRowAccessor();
                armorSelectFilename = currDir + @"\armorSelected.xml";
            //    WriteToChat("Height: " + ArmorHudFirstHeight + ", Width: " + ArmorHudWidth);

                ArmorUpdateHudTabLayout.AddControl(lblToonArmorUpdateName, new Rectangle(0, 0, 100, 50));
                //ArmorUpdateHudTabLayout.AddControl(lblToonArmorUpdateLevel, new Rectangle(120, 0, 40, 16));
                //ArmorUpdateHudTabLayout.AddControl(lblToonArmorUpdateMaster, new Rectangle(150, 0, 60, 16));
                ArmorUpdateHudTabLayout.AddControl(ArmorUpdateHudList, new Rectangle(0, 30, ArmorHudWidth, (ArmorHudHeight) / 3));

                //ArmorHudList.ControlHeight = Convert.ToInt32(.05*ArmorHudHeight);
                ArmorUpdateHudList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.20 * ArmorHudWidth), null);
                ArmorUpdateHudList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.15 * ArmorHudWidth), null);
                ArmorUpdateHudList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.52 * ArmorHudWidth), null);

                ArmorUpdateHudList.Click += (sender, row, col) => ArmorUpdateHudList_Click(sender, row, col);
                ArmorUpdateHudTabLayout.AddControl(ArmorAvailableList, new Rectangle(0, (ArmorHudHeight)/3 + 50, ArmorHudWidth, (3*(ArmorHudHeight/8))));

                //ArmorHudList.ControlHeight = Convert.ToInt32(.08*ArmorHudHeight);
                ArmorAvailableList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.15 * ArmorHudWidth), null);
                ArmorAvailableList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.15 * ArmorHudWidth), null);
                ArmorAvailableList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.10 * ArmorHudWidth), null);
                ArmorAvailableList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.10 * ArmorHudWidth), null);
                ArmorAvailableList.AddColumn(typeof(HudStaticText), Convert.ToInt32(.52 * ArmorHudWidth), null);

                ArmorAvailableList.Click += (sender, row, col) => ArmorAvailableList_Click(sender, row, col);

                lblArmorUpdateCovers = new HudStaticText();
                lblArmorUpdateCovers.FontHeight = nmenuFontHeight;
                lblArmorUpdateCovers.Text = "Cov:";
                ControlGroup CoverageChoices = new ControlGroup();
                cboArmorUpdateCovers = new HudCombo(CoverageChoices);
                cboArmorUpdateCovers.Change += (sender, index) => cboArmorUpdateCovers_Change(sender, index);

                int i = 0;
                foreach (IDNameLoadable info in CoverageInvList)
                {
                    cboArmorUpdateCovers.AddItem(info.name, i);
                    i++;
                }

                lblArmorUpdateSet = new HudStaticText();
                lblArmorUpdateSet.FontHeight = nmenuFontHeight;
                lblArmorUpdateSet.Text = "Set:";
                ControlGroup SetChoices = new ControlGroup();
                cboArmorUpdateSet = new HudCombo(SetChoices);
                cboArmorUpdateSet.Change += (sender, index) => cboArmorUpdateSet_Change(sender, index);

                i = 0;
                foreach (IDNameLoadable info in ArmorSetsInvList)
                {
                    cboArmorUpdateSet.AddItem(info.name, i);
                    i++;
                }
                lblArmorUpdateChoice = new HudStaticText();
                lblArmorUpdateChoice.FontHeight = nmenuFontHeight;
                lblArmorUpdateChoice.Text = "Search spells:";
                lblArmorUpdateClass = new HudStaticText();
                lblArmorUpdateClass.Text = "Armor,Jewelry, or Clothing";
                txtArmorUpdateChoice = new HudTextBox();
                txtArmorUpdateClass = new HudTextBox();

                 btnClearListArmorAvailable = new HudButton();
                btnClearListArmorAvailable.Text = "Clear List";
                btnClearListArmorAvailable.Hit += (sender, index) => btnClearListArmorAvailable_Hit(sender, index);

                btnListArmorAvailable = new HudButton();
                btnListArmorAvailable.Text = "List Inventory";
                btnListArmorAvailable.Hit += (sender, index) => btnListArmorAvailable_Hit(sender, index);

                ArmorUpdateHudTabLayout.AddControl(lblArmorUpdateClass, new Rectangle(0, (5 * (ArmorHudHeight / 6)), ArmorHudWidth/6, 18));
                ArmorUpdateHudTabLayout.AddControl(txtArmorUpdateClass, new Rectangle(ArmorHudWidth / 6, (5 * (ArmorHudHeight / 6)), 60, 18));
                ArmorUpdateHudTabLayout.AddControl(lblArmorUpdateChoice, new Rectangle(ArmorHudWidth/6 + 80, (5 * (ArmorHudHeight / 6)), 80, 18));
                ArmorUpdateHudTabLayout.AddControl(txtArmorUpdateChoice, new Rectangle(ArmorHudWidth/3, (5*(ArmorHudHeight/6)), (ArmorHudWidth / 2), 18));
               ArmorUpdateHudTabLayout.AddControl(lblArmorUpdateCovers, new Rectangle(0, (5 * (ArmorHudHeight / 6)+30),(30), 18));
                ArmorUpdateHudTabLayout.AddControl(cboArmorUpdateCovers, new Rectangle(40, (5 * (ArmorHudHeight / 6)+30), 200, 18));
                ArmorUpdateHudTabLayout.AddControl(lblArmorUpdateSet, new Rectangle(ArmorHudWidth / 2, (5 * (ArmorHudHeight / 6)+30), (ArmorHudWidth / 2) + 30, 18));
                ArmorUpdateHudTabLayout.AddControl(cboArmorUpdateSet, new Rectangle((ArmorHudWidth / 2) + 30, (5 * (ArmorHudHeight / 6)+30), (ArmorHudWidth / 2) + 100, 18));
                ArmorUpdateHudTabLayout.AddControl(btnListArmorAvailable, new Rectangle(ArmorHudWidth/3, (5 * (ArmorHudHeight / 6)+60), 100, 18));
                ArmorUpdateHudTabLayout.AddControl(btnClearListArmorAvailable, new Rectangle(ArmorHudWidth / 2, (5 * (ArmorHudHeight / 6)+60), 100, 18));

                ArmorUpdateTab = true;
                   if (toonArmorName == "" || toonArmorName == "None") { toonArmorName = toonName; }
                    lblToonArmorUpdateName.Text = toonArmorName;
                    toonArmorUpdateName = toonArmorName;
                FillArmorUpdateHudList();

            }

            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 58
0
        private void RenderChiefGearInspectPageMenuTabAppearance()
        {
            try
            {
                HudStaticText lblRuleArmorTypes = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblRuleArmorTypes.Text = "Armor Models";
                ChiefGearInspectPageMenuTabAppearance.AddControl(lblRuleArmorTypes, new Rectangle(5, 0, 100, 16));

                lstRuleArmorTypes = new HudList();
                lstRuleArmorTypesListRow = new HudList.HudListRowAccessor();

                ChiefGearInspectPageMenuTabAppearance.AddControl(lstRuleArmorTypes, new Rectangle(5, 20, 150, 255));
                lstRuleArmorTypes.AddColumn(typeof(HudCheckBox), 5, null);
                lstRuleArmorTypes.AddColumn(typeof(HudStaticText), 195, null);
                lstRuleArmorTypes.AddColumn(typeof(HudStaticText), 1, null);

                HudStaticText lblColorPalettes = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblColorPalettes.Text = "Color Palettes";
                ChiefGearInspectPageMenuTabAppearance.AddControl(lblColorPalettes, new Rectangle(155, 0, 80, 16));
                SubscribeChiefGearInspectPageMenuTabViewPageSearchRuleAppearanceEvents();

            }
            catch (Exception ex) { LogError(ex); }
        }
Esempio n. 59
0
        private void UpdateCorpseHud()
        {
            try
            {
                if(CorpseHudView == null) {return;}

                int scroll = CorpseHudList.ScrollPosition;

                CorpseHudList.ClearRows();

                List<LandscapeObject> UpdateList = CorpseTrackingList.Where(x => x.notify && x.DistanceAway < mGeneralSettings.GearSenseSettings.LandscapeForgetDistance).OrderBy(x => x.DistanceAway).ToList();

                for(int updateindex = 0; updateindex < UpdateList.Count; updateindex++)
                {
                    if(UpdateList[updateindex].notify)
                    {
                        CorpseHudListRow = CorpseHudList.AddRow();
                        ((HudPictureBox)CorpseHudListRow[0]).Image = UpdateList[updateindex].Icon + 0x6000000;
                        if(mGeneralSettings.GearVisectionSettings.RenderMini){((HudStaticText)CorpseHudListRow[1]).Text = UpdateList[updateindex].MiniHudString();}
                        else{((HudStaticText)CorpseHudListRow[1]).Text = UpdateList[updateindex].HudString();}
                        ((HudStaticText)CorpseHudListRow[1]).FontHeight = 10;
                        if(UpdateList[updateindex].IOR == IOResult.corpseselfkill) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.AntiqueWhite;}
                        if(UpdateList[updateindex].IOR == IOResult.corpsepermitted) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Cyan;}
                        if(UpdateList[updateindex].IOR == IOResult.corpseofself) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Yellow;}
                        if(UpdateList[updateindex].IOR == IOResult.corpsewithrare) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Magenta;}
                        if(UpdateList[updateindex].IOR == IOResult.corpsefellowkill) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Green;}
                        if(UpdateList[updateindex].IOR == IOResult.allcorpses) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.SlateGray;}
                        ((HudPictureBox)CorpseHudListRow[2]).Image = GearGraphics.RemoveCircle;
                        ((HudStaticText)CorpseHudListRow[3]).Text = UpdateList[updateindex].Id.ToString();
                    }
                }

            //	    	    foreach(LandscapeObject corpse in CorpseTrackingList)
            //	    	    {
            //	    	    	if(corpse.notify)
            //	    	    	{
            //		    	    	CorpseHudListRow = CorpseHudList.AddRow();
            //		    	    	((HudPictureBox)CorpseHudListRow[0]).Image = corpse.Icon + 0x6000000;
            //		    	    	if(mGeneralSettings.GearVisectionSettings.RenderMini){((HudStaticText)CorpseHudListRow[1]).Text = corpse.MiniHudString();}
            //		    	    	else{((HudStaticText)CorpseHudListRow[1]).Text = corpse.HudString();}
            //	                    ((HudStaticText)CorpseHudListRow[1]).FontHeight = 10;
            //		    	    	if(corpse.IOR == IOResult.corpseselfkill) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.AntiqueWhite;}
            //		    	    	if(corpse.IOR == IOResult.corpsepermitted) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Cyan;}
            //		    	    	if(corpse.IOR == IOResult.corpseofself) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Yellow;}
            //		    	    	if(corpse.IOR == IOResult.corpsewithrare) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Magenta;}
            //		    	    	if(corpse.IOR == IOResult.corpsefellowkill) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.Green;}
            //		    	    	if(corpse.IOR == IOResult.allcorpses) {((HudStaticText)CorpseHudListRow[1]).TextColor = Color.SlateGray;}
            //						((HudPictureBox)CorpseHudListRow[2]).Image = GearGraphics.RemoveCircle;
            //						((HudStaticText)CorpseHudListRow[3]).Text = corpse.Id.ToString();
            //	    	    	}
            //	    	    }

                CorpseHudList.ScrollPosition = scroll;
            }catch(Exception ex){LogError(ex);}
        }
Esempio n. 60
0
        private void RenderChiefGearInspectPageTrophies()
        {
            try
            {
                WriteToChat("I am in function to render trophy hud.");

                lstmyTrophies = new HudList();
                lstmyTrophiesListRow = new HudList.HudListRowAccessor();
                ChiefGearInspectPageTrophies.AddControl(lstmyTrophies, new Rectangle(5, 5, 260, 300));
                lstmyTrophies.AddColumn(typeof(HudCheckBox), 5, null);
                lstmyTrophies.AddColumn(typeof(HudStaticText), 230, null);
                lstmyTrophies.AddColumn(typeof(HudPictureBox), 10, null);

                txtTrophyName = new HudTextBox();
                txtTrophyName.Text = "";
                ChiefGearInspectPageTrophies.AddControl(txtTrophyName, new Rectangle(8, 320, 150, 20));

                btnUpdateTrophyItem = new HudButton();
                btnUpdateTrophyItem.Text = "Update";
                ChiefGearInspectPageTrophies.AddControl(btnUpdateTrophyItem, new Rectangle(190, 320, 90, 18));

                btnAddTrophyItem = new HudButton();
                btnAddTrophyItem.Text = "Add New Item";
                ChiefGearInspectPageTrophies.AddControl(btnAddTrophyItem, new Rectangle(190, 360, 90, 18));

                chkTrophyExact = new HudCheckBox();
                chkTrophyExact.Text = "Exact Match";
                ChiefGearInspectPageTrophies.AddControl(chkTrophyExact, new Rectangle(8, 370, 80, 16));
                chkTrophyExact.Checked = false;

                txtTrophyMax = new HudTextBox();
                txtTrophyMax.Text = "";
                ChiefGearInspectPageTrophies.AddControl(txtTrophyMax, new Rectangle(5, 390, 100, 20));

                HudStaticText lblMyItemsCountMax = new HudStaticText();
                //   lblChiefGearSwitch.FontHeight = nmenuFontHeight;
                lblMyItemsCountMax.Text = "Max # to Loot:";
                ChiefGearInspectPageTrophies.AddControl(lblMyItemsCountMax, new Rectangle(110, 390, 100, 16));

                SubscribeChiefGearInspectPageTrophies();

            }
            catch (Exception ex) { LogError(ex); }
        }