Example #1
0
        /// <summary>
        /// Returns the current success chance.
        /// </summary>
        /// <returns></returns>
        private float GetChance()
        {
            var item2       = this.GetItem2();
            var optionSetId = this.GetOptionSetId(item2);
            var chance      = 0f;

            // Get chance
            if (optionSetId != 0)
            {
                var powder        = this.GetMagicPowder(this.Creature1);
                var optionSetData = AuraData.OptionSetDb.Find(optionSetId);

                if (powder != null && optionSetData != null)
                {
                    chance = Enchant.GetChance(this.Creature2, powder, SkillId.Enchant, optionSetData);
                }
            }

            return(chance);
        }