• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AosArmorAttribute类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AosArmorAttribute的典型用法代码示例。如果您正苦于以下问题:C# AosArmorAttribute类的具体用法?C# AosArmorAttribute怎么用?C# AosArmorAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AosArmorAttribute类属于命名空间,在下文中一共展示了AosArmorAttribute类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: SetValue

		public static void SetValue( Mobile m, AosArmorAttribute att, int value, string title )
		{
			if ( !EnhancementList.ContainsKey( m ) )
				AddMobile( m, title );

			if ( title != EnhancementList[m].Title )
				EnhancementList[m].ArmorAttributes[att] = value;
			else
				EnhancementList[m].ArmorAttributes[att] += value;
		}
开发者ID:suiy187,项目名称:runuocustom,代码行数:10,代码来源:Enhancement.cs



注:本文中的AosArmorAttribute类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AosArmorAttributes类代码示例发布时间:2022-05-24
下一篇:
C# AnyObjectId类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap