Exemplo n.º 1
0
 public Pet(int id, PetFamily family, string name, List <Spell> spells)
 {
     Id     = id;
     Family = family;
     Name   = name;
     Spells = spells;
 }
Exemplo n.º 2
0
 public XuFuEncounter(int ID, string name, PetFamily family, string section)
 {
     this.ID = ID;
     Name    = name;
     Family  = family;
     Section = section;
 }
Exemplo n.º 3
0
 public PetBattleLink(string iD, int criteriaNumber, string name, PetBattleLink parent, string externalLink, PetFamily family)
 {
     ID             = iD;
     CriteriaNumber = criteriaNumber;
     Name           = name;
     Parent         = parent;
     ExternalLink   = externalLink;
     Family         = family;
 }
Exemplo n.º 4
0
        public static PetFamilyTree PetFamilyToPetFamilyTree(PetFamily family)
        {
            switch (family)
            {
            case PetFamily.Bat:
            case PetFamily.BirdOfPrey:
            case PetFamily.Chimaera:
            case PetFamily.Dragonhawk:
            case PetFamily.NetherRay:
            case PetFamily.Ravager:
            case PetFamily.Serpent:
            case PetFamily.Silithid:
            case PetFamily.Spider:
            case PetFamily.SporeBat:
            case PetFamily.WindSerpent:
                return(PetFamilyTree.Cunning);

            case PetFamily.Bear:
            case PetFamily.Boar:
            case PetFamily.Crab:
            case PetFamily.Crocolisk:
            case PetFamily.Gorilla:
            case PetFamily.Rhino:
            case PetFamily.Scorpid:
            case PetFamily.Turtle:
            case PetFamily.WarpStalker:
            case PetFamily.Worm:
                return(PetFamilyTree.Tenacity);

            case PetFamily.CarrionBird:
            case PetFamily.Cat:
            case PetFamily.CoreHound:
            case PetFamily.Devilsaur:
            case PetFamily.Hyena:
            case PetFamily.Moth:
            case PetFamily.Raptor:
            case PetFamily.SpiritBeast:
            case PetFamily.Tallstrider:
            case PetFamily.Wasp:
            case PetFamily.Wolf:
                return(PetFamilyTree.Ferocity);
            }

            // hmmm!
            return(PetFamilyTree.None);
        }
Exemplo n.º 5
0
        private void HandleConfigurationSelection(string text, PetFamily family)
        {
            if (text == String.Empty)
            {
                return;
            }

            ListViewItem foundItem = null;

            if (this.ListView_Configurations.Items.Count > 0)
            {
                foundItem = this.ListView_Configurations.FindItemWithText(text, false, 0);
            }

            if (foundItem != null)
            {
                foundItem.Selected = true;
            }
            else
            {
                ListViewItem newItem = new ListViewItem()
                {
                    Text       = text,
                    ImageIndex = IconFactory.GetPetFamilyIconIndex(family.FamilyType),
                    Group      = this.ListView_Configurations.Groups[String.Format("ListViewGroup_{0}_{1}", family.ClassType, family.Language)],
                    Tag        = new EmoteConfiguration(text, family)
                };

                this.ListView_Configurations.Items.Add(newItem);

                newItem.Selected = true;

                if (this.defaultEmotes.HasConfigurationForPetFamily(family.FamilyType, family.Language))
                {
                    this.ToolStripDropDownButton_Import.Select();
                }
                else
                {
                    this.ToolStripButton_AddNode.Select();
                }
            }
        }
Exemplo n.º 6
0
        private void FillAddConfigurationMenu()
        {
            ToolStripMenuItem hunter = new ToolStripMenuItem(Resources.ClassName_Hunter);

            hunter.Name  = "ToolStripMenuItem_AddConfiguration_Hunter";
            hunter.Image = Icons.INV_Weapon_Bow_07;

            ToolStripMenuItem warlock = new ToolStripMenuItem(Resources.ClassName_Warlock);

            warlock.Name  = "ToolStripMenuItem_AddConfiguration_Warlock";
            warlock.Image = Icons.Spell_Nature_Drowsy;

            this.ToolStripDropDownButton_AddConfiguration.DropDownItems.Insert(0, warlock);
            this.ToolStripDropDownButton_AddConfiguration.DropDownItems.Insert(0, hunter);

            foreach (PetFamily family in PetFamily.List())
            {
                if (family.Language == CultureInfo.CurrentUICulture.TwoLetterISOLanguageName)
                {
                    ToolStripMenuItem familyItem = new ToolStripMenuItem(family.Name);

                    familyItem.Name   = "ToolStripMenuItem_AddConfiguration_" + family.Name.GetHashCode().ToString();
                    familyItem.Image  = family.Image;
                    familyItem.Tag    = family;
                    familyItem.Click += new EventHandler(this.ToolStripMenuItem_AddConfiguration_Click);

                    if (family.ClassType == PetClassTypes.Hunter)
                    {
                        hunter.DropDownItems.Add(familyItem);
                    }
                    else if (family.ClassType == PetClassTypes.Warlock)
                    {
                        warlock.DropDownItems.Add(familyItem);
                    }
                    else
                    {
                        this.ToolStripDropDownButton_AddConfiguration.DropDownItems.Add(familyItem);
                    }
                }
            }
        }
Exemplo n.º 7
0
 PetFamily IPetCalculator.WeakenedBy(PetFamily family)
 {
     return(WeakenedByTable[family]);
 }
Exemplo n.º 8
0
 PetFamily IPetCalculator.EmpoweredBy(PetFamily family)
 {
     return(EmpoweredByTable[family]);
 }
Exemplo n.º 9
0
 PetFamily IPetCalculator.WeakenedVs(PetFamily ability)
 {
     return(WeakenedTable[ability]);
 }
Exemplo n.º 10
0
 PetFamily IPetCalculator.EmpoweredVs(PetFamily ability)
 {
     return(EmpoweredTable[ability]);
 }
Exemplo n.º 11
0
 bool IPetCalculator.IsWeakened(PetFamily ability, PetFamily target)
 {
     return(WeakenedTable[ability] == target);
 }
Exemplo n.º 12
0
 bool IPetCalculator.IsEmpowered(PetFamily ability, PetFamily target)
 {
     return(EmpoweredTable[ability] == target);
 }