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


C# AosArmorAttribute類代碼示例

本文整理匯總了C#中AosArmorAttribute的典型用法代碼示例。如果您正苦於以下問題:C# AosArmorAttribute類的具體用法?C# AosArmorAttribute怎麽用?C# AosArmorAttribute使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: GetValue

		public static int GetValue( Mobile m, AosArmorAttribute attribute )
		{
			if( !Core.AOS )
				return 0;

			List<Item> items = m.Items;
			int value = 0;

			for( int i = 0; i < items.Count; ++i )
			{
				Item obj = items[i];

				if( obj is BaseArmor )
				{
					AosArmorAttributes attrs = ((BaseArmor)obj).ArmorAttributes;

					if( attrs != null )
						value += attrs[attribute];
				}
				else if( obj is BaseClothing )
				{
					AosArmorAttributes attrs = ((BaseClothing)obj).ClothingAttributes;

					if( attrs != null )
						value += attrs[attribute];
				}
			}

			return value;
		}
開發者ID:bugraerdogan,項目名稱:silverlight-uo-client,代碼行數:30,代碼來源:AOS.cs

示例2: GetValue

		public static int GetValue(Mobile m, AosArmorAttribute attribute)
		{
			return 0;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:4,代碼來源:AOS.cs

示例3:

 public int this[AosArmorAttribute attribute]
 {
     get
     {
         return this.ExtendedGetValue((int)attribute);
     }
     set
     {
         this.SetValue((int)attribute, value);
     }
 }
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:11,代碼來源:AOS.cs

示例4: ApplyAttribute

 public static void ApplyAttribute( Mobile from, BookOfSpellCrafts book, int craftId, BaseHat hat, AosArmorAttribute attribute, int minimum, int maximum, int scale )
 {
     CheckItem( from, hat, ( hat.ClothingAttributes[ attribute ] == 0 ) );
     UseMagicJewels( from, book, hat, SpellCraftConfig.MagicJewelRequirements[craftId] );
     int scalar = ComputeSkillScalar( from );
     ApplyAttribute( hat.ClothingAttributes, SpellCraftConfig.MinimumIntensity * scalar, SpellCraftConfig.MaximumIntensity * scalar, attribute, minimum, maximum, scale );
     MarkHat( from, hat );
 }
開發者ID:evildude807,項目名稱:kaltar,代碼行數:8,代碼來源:Spellcraft.cs

示例5: ArmorAttributeInfo

 public ArmorAttributeInfo(AosArmorAttribute attribute, string name, AttributeCategory category, int xp, int maxvalue)
 {
     this.m_Attribute = attribute;
     this.m_Name = name;
     this.m_Category = category;
     this.m_XP = xp;
     this.m_MaxValue = maxvalue;
 }
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:8,代碼來源:LevelAttributes.cs

示例6: GetModForAttribute

        public static int GetModForAttribute(AosArmorAttribute attr)
        {
            if (attr == AosArmorAttribute.LowerStatReq)
                return GetModForAttribute(AosWeaponAttribute.LowerStatReq);

            if (attr == AosArmorAttribute.DurabilityBonus)
                return GetModForAttribute(AosWeaponAttribute.DurabilityBonus);

            foreach (KeyValuePair<int, ImbuingDefinition> kvp in m_Table)
            {
                int mod = kvp.Key;
                ImbuingDefinition def = kvp.Value;

                if (def.Attribute is AosArmorAttribute && (AosArmorAttribute)def.Attribute == attr)
                    return mod;
            }

            return -1;
        }
開發者ID:Ziden,項目名稱:ServUO-EC-Test-Fork,代碼行數:19,代碼來源:Imbuing.cs

示例7: GetValue

		public static int GetValue( Mobile m, AosArmorAttribute att )
		{
			if ( EnhancementList.ContainsKey( m ) )
				return EnhancementList[m].ArmorAttributes[att];
			else
				return 0;
		}
開發者ID:suiy187,項目名稱:runuocustom,代碼行數:7,代碼來源:Enhancement.cs

示例8: RemoveAttribute

 public static void RemoveAttribute( AosArmorAttributes attrs, AosArmorAttribute attr, int amount )
 {
     if ( attr == AosArmorAttribute.MageArmor && attrs.MageArmor > 0 )
         attrs[attr] = 0;
     else
         attrs[attr] = Math.Max( attrs[attr] - amount, 0 );
 }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:7,代碼來源:BonusAttribute.cs

示例9: GetValue

		public static int GetValue( Mobile m, AosArmorAttribute attribute )
		{
			if ( !Core.AOS )
				return 0;

			ArrayList items = m.Items;
			int value = 0;

			for ( int i = 0; i < items.Count; ++i )
			{
				object obj = items[i];

				if ( obj is BaseArmor )
				{/*
					AosArmorAttributes attrs = ((BaseArmor)obj).ArmorAttributes;

					if ( attrs != null )
						value += attrs[attribute];*/
				}
			}

			return value;
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:23,代碼來源:AOS.cs

示例10: BonusAttribute

 public BonusAttribute( AosArmorAttribute attr, int amount )
     : this((object)attr, amount)
 {
 }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:4,代碼來源:BonusAttribute.cs

示例11: ApplyAttribute

 public static void ApplyAttribute( AosArmorAttributes attrs, AosArmorAttribute attr, int amount )
 {
     if ( attr == AosArmorAttribute.MageArmor && attrs.MageArmor == 0 )
         attrs[attr] = 1;
     else
         attrs[attr] += amount;
 }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:7,代碼來源:BonusAttribute.cs

示例12: GetChance

        public static int GetChance( AosArmorAttribute attr, AosArmorAttributes itemAttrs )
        {
            int chance;

            switch ( attr )
            {
                case AosArmorAttribute.DurabilityBonus: 		chance = itemAttrs[attr] / 50; break;
                case AosArmorAttribute.LowerStatReq: 			chance = itemAttrs[attr] / 6; break;
                default:
                    chance = itemAttrs[attr] / 2; break;
            }

            return chance;
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:14,代碼來源:Enhance.cs

示例13: ApplyAttribute

		private static void ApplyAttribute( AosArmorAttributes attrs, int min, int max, AosArmorAttribute attr, int low, int high )
		{
			attrs[attr] = Scale( min, max, low, high );
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:4,代碼來源:BaseRunicTool.cs

示例14: GetPropRange

 public static int[] GetPropRange(AosArmorAttribute attr)
 {
     switch (attr)
     {
         case AosArmorAttribute.LowerStatReq:
         case AosArmorAttribute.DurabilityBonus: return new int[] { 10, 100 };
         case AosArmorAttribute.SoulCharge: return new int[] { 1, 10 };
         default:
         case AosArmorAttribute.ReactiveParalyze:
         case AosArmorAttribute.SelfRepair:
         case AosArmorAttribute.MageArmor: return new int[] { 1, 1 };
     }
 }
開發者ID:Ziden,項目名稱:ServUO-EC-Test-Fork,代碼行數:13,代碼來源:Imbuing.cs

示例15: HasAttribute

		public static bool HasAttribute(this Item item, AosArmorAttribute attr, out int value)
		{
			return (HasAttribute(item, "ArmorAttributes", (ulong)attr, out value) ||
					HasAttribute(item, "ClothingAttributes", (ulong)attr, out value) ||
					HasAttribute(item, "JewelAttributes", (ulong)attr, out value));
		}
開發者ID:Vita-Nex,項目名稱:Core,代碼行數:6,代碼來源:AttributesExt.cs


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