當前位置: 首頁>>代碼示例>>C#>>正文


C# AosSkillBonuses.SetValues方法代碼示例

本文整理匯總了C#中AosSkillBonuses.SetValues方法的典型用法代碼示例。如果您正苦於以下問題:C# AosSkillBonuses.SetValues方法的具體用法?C# AosSkillBonuses.SetValues怎麽用?C# AosSkillBonuses.SetValues使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AosSkillBonuses的用法示例。


在下文中一共展示了AosSkillBonuses.SetValues方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ApplySkillBonus

		private static void ApplySkillBonus( AosSkillBonuses attrs, int min, int max, int index, int low, int high )
		{
			SkillName sk, check;
			double bonus;
			bool found;

			do
			{
				found = false;
				sk = m_PossibleBonusSkills[Utility.Random( m_PossibleBonusSkills.Length )];

				for ( int i = 0; !found && i < 5; ++i )
					found = ( attrs.GetValues( i, out check, out bonus ) && check == sk );
			} while ( found );

			attrs.SetValues( index, sk, Scale( min, max, low, high ) );
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:17,代碼來源:BaseRunicTool.cs

示例2: ApplySkillBonus

		private static void ApplySkillBonus( AosSkillBonuses attrs, int min, int max, int index, int low, int high )
		{
			SkillName[] possibleSkills = ( attrs.Owner is Spellbook ? m_PossibleSpellbookSkills : m_PossibleBonusSkills );
			int count = ( Core.SE ? possibleSkills.Length : possibleSkills.Length - 2 );

			SkillName sk, check;
			double bonus;
			bool found;

			do
			{
				found = false;
				sk = possibleSkills[Utility.Random( count )];

				for ( int i = 0; !found && i < 5; ++i )
					found = ( attrs.GetValues( i, out check, out bonus ) && check == sk );
			} while ( found );

			attrs.SetValues( index, sk, Scale( min, max, low, high ) );
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:20,代碼來源:BaseRunicTool.cs

示例3: ApplySkillBonus

        private static void ApplySkillBonus(AosSkillBonuses attrs, int min, int max, int index, int low, int high)
        {
            var possibleSkills = (attrs.Owner is Spellbook ? m_PossibleSpellbookSkills : m_PossibleBonusSkills).ToList();
            var count = (Core.SE ? possibleSkills.Count : possibleSkills.Count - 2);

            SkillName sk, check;
            double bonus;
            bool found;

            do
            {
                found = false;
                sk = possibleSkills[Utility.Random(count)];

                for (var i = 0; !found && i < 5; ++i)
                {
                    found = (attrs.GetValues(i, out check, out bonus) && check == sk);
                }

                possibleSkills.Remove(sk);
                --count;
            }
            while (found && count > 0);

            attrs.SetValues(index, sk, Scale(min, max, low, high));
        }
開發者ID:rokann,項目名稱:JustUO,代碼行數:26,代碼來源:BaseRunicTool.cs


注:本文中的AosSkillBonuses.SetValues方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。