Ejemplo n.º 1
0
        private void btn_Skills_Click(object sender, EventArgs e)
        {
            if (!API.BMain.IsInGame)
            {
                return;
            }

            var player = ObjectManager.Player;

            if (!API.BMain.IsInGame)
            {
                return;
            }
            //List<Game.Static.Skills.Skill> Skills = new Game.Static.Skills().GetAllPlayerSkills();
            player.Skills = new Game.Static.Skills().GetAllPlayerSkills();

            foreach (var tmpPlayerSkill in player.Skills)
            {
                Enums.Skills tmpSkill = tmpPlayerSkill.Id;
                Helpers.Logger.Append("My skill in " + tmpSkill.ToString() + " is " + tmpPlayerSkill.CurrentLevel + "/ " + tmpPlayerSkill.MaxLevel);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Check if we have a high enough skill to gather the resource in question
        /// </summary>
        /// <param name="skillType"></param>
        /// <param name="targetObject"></param>
        /// <returns></returns>
        private bool HasEnoughSkill(Enums.Skills skillType, WoWGameObject targetObject)
        {
            var player = ObjectManager.Player;

            //update the skills, just in case
            player.Skills = new Game.Static.Skills().GetAllPlayerSkills();

            foreach (var tmpPlayerSkill in player.Skills)
            {
                if (tmpPlayerSkill.Id == skillType)
                {
                    if (tmpPlayerSkill.CurrentLevel >= targetObject.GatherInfo.RequiredSkill)
                    {
                        return(true);
                    }


                    return(false);
                }
            }


            return(false);
        }