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); }
        }
Beispiel #2
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); }
        }
Beispiel #3
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); }
        }
Beispiel #4
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);}
        }
        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);}
        }
Beispiel #6
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);}
        }
Beispiel #7
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);}
        }
        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); }
        }
        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); }
        }
Beispiel #10
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); }
        }
Beispiel #11
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); }
        }
Beispiel #12
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); }
        }
Beispiel #13
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); }
        }
Beispiel #14
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); }
        }
Beispiel #15
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);}
        }
Beispiel #16
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); }
        }
Beispiel #17
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);}
        }
        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);}
        }
Beispiel #19
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);}
        }
        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); }
        }
Beispiel #21
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);}
        }
Beispiel #22
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); }
            }
        }
Beispiel #23
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);}
 }
Beispiel #24
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);}
        }
Beispiel #25
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;
        }
Beispiel #26
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);}
        }
Beispiel #27
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); }
        }
Beispiel #28
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);}
        }
Beispiel #29
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); }
        }
        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);}
        }