Beispiel #1
0
        /// <summary>
        ///     Add a skill to the start of the queue
        /// </summary>
        /// <param name="skill"></param>
        /// <returns></returns>
        public bool TrainSkillNow(DirectInvType skill)
        {
            //if (!DirectEve.HasSupportInstances())
            //{
            //    DirectEve.Log("DirectEve: Error: This method requires a support instance.");
            //    return false;
            //}

            if (!AreMySkillsReady)
            {
                return(false);
            }

            // Assume level 1
            var currentLevel = 1;

            // Get the skill from 'MySkills'
            var mySkill = MySkills.FirstOrDefault(s => s.TypeId == skill.TypeId);

            if (mySkill != null)
            {
                currentLevel = mySkill.Level;
            }

            return(DirectEve.ThreadedLocalSvcCall("skillqueue", "TrainSkillNow", skill.TypeId, currentLevel));
        }
Beispiel #2
0
        /// <summary>
        ///     Add a skill to the end of the queue
        /// </summary>
        /// <param name="skill"></param>
        /// <returns></returns>
        public bool AddSkillToEndOfQueue(DirectInvType skill)
        {
            //if (!DirectEve.HasSupportInstances())
            //{
            //    DirectEve.Log("DirectEve: Error: This method requires a support instance.");
            //    return false;
            //}

            if (!AreMySkillsReady)
            {
                return(false);
            }

            // Assume level 1
            var currentLevel = 1;

            // Get the skill from 'MySkills'
            var mySkill = MySkills.FirstOrDefault(s => s.TypeId == skill.TypeId);

            if (mySkill != null)
            {
                currentLevel = mySkill.Level;
            }

            // Assume 1 level higher then current
            var nextLevel = currentLevel + 1;

            // Check if the skill is already in the queue
            // due to the OrderByDescending on Level, this will
            // result in the highest version of this skill in the queue
            mySkill = MySkillQueue.OrderByDescending(s => s.Level).FirstOrDefault(s => s.TypeId == skill.TypeId);
            if (mySkill != null)
            {
                nextLevel = mySkill.Level + 1;
            }

            return(DirectEve.ThreadedLocalSvcCall("skillqueue", "AddSkillToEnd", skill.TypeId, currentLevel, nextLevel));
        }
Beispiel #3
0
        /// <summary>
        ///     Add a skill to the start of the queue
        /// </summary>
        /// <param name="skill"></param>
        /// <returns></returns>
        public bool TrainSkillNow(DirectInvType skill)
        {
            //if (!DirectEve.HasSupportInstances())
            //{
            //    DirectEve.Log("DirectEve: Error: This method requires a support instance.");
            //    return false;
            //}

            if (!AreMySkillsReady)
                return false;

            // Assume level 1
            var currentLevel = 1;

            // Get the skill from 'MySkills'
            var mySkill = MySkills.FirstOrDefault(s => s.TypeId == skill.TypeId);
            if (mySkill != null)
                currentLevel = mySkill.Level;

            return DirectEve.ThreadedLocalSvcCall("skillqueue", "TrainSkillNow", skill.TypeId, currentLevel);
        }
Beispiel #4
0
        /// <summary>
        ///     Add a skill to the end of the queue
        /// </summary>
        /// <param name="skill"></param>
        /// <returns></returns>
        public bool AddSkillToEndOfQueue(DirectInvType skill)
        {
            //if (!DirectEve.HasSupportInstances())
            //{
            //    DirectEve.Log("DirectEve: Error: This method requires a support instance.");
            //    return false;
            //}

            if (!AreMySkillsReady)
                return false;

            // Assume level 1
            var currentLevel = 1;

            // Get the skill from 'MySkills'
            var mySkill = MySkills.FirstOrDefault(s => s.TypeId == skill.TypeId);
            if (mySkill != null)
                currentLevel = mySkill.Level;

            // Assume 1 level higher then current
            var nextLevel = currentLevel + 1;

            // Check if the skill is already in the queue
            // due to the OrderByDescending on Level, this will
            // result in the highest version of this skill in the queue
            mySkill = MySkillQueue.OrderByDescending(s => s.Level).FirstOrDefault(s => s.TypeId == skill.TypeId);
            if (mySkill != null)
                nextLevel = mySkill.Level + 1;

            return DirectEve.ThreadedLocalSvcCall("skillqueue", "AddSkillToEnd", skill.TypeId, currentLevel, nextLevel);
        }