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

C# AosElementAttribute类代码示例

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

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



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

示例1: EarringsOfProtection

        public EarringsOfProtection( AosElementAttribute element )
            : base(0x1087, Layer.Earrings)
        {
            Resistances[ ( (AosElementAttribute)element ) ] = 2;

            m_Attribute = element;
            LootType = LootType.Regular;
        }
开发者ID:vexilar,项目名称:RunUO_Rebar,代码行数:8,代码来源:EarringsOfProtection.cs


示例2: EarringsOfProtection

        public EarringsOfProtection(AosElementAttribute element)
            : base(0x1087, Layer.Earrings)
        {
            this.Resistances[((AosElementAttribute)element)] = 2;

            this.m_Attribute = element;
            this.LootType = LootType.Blessed;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:8,代码来源:EarringsOfProtection.cs


示例3: ApplyAttribute

		private static void ApplyAttribute( AosElementAttributes attrs, int min, int max, AosElementAttribute attr, int low, int high )
		{
			attrs[attr] = Scale( min, max, low, high );
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:4,代码来源:BaseRunicTool.cs


示例4: GetValue

		public int this[AosElementAttribute attribute]
		{
			get { return GetValue( (int)attribute ); }
			set { SetValue( (int)attribute, value ); }
		}
开发者ID:bugraerdogan,项目名称:silverlight-uo-client,代码行数:5,代码来源:AOS.cs


示例5: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
            m_Attribute = (AosElementAttribute)reader.ReadInt();
        }
开发者ID:vexilar,项目名称:RunUO_Rebar,代码行数:7,代码来源:EarringsOfProtection.cs


示例6: GetItemData

        public static int GetItemData( AosElementAttribute element, bool label )
        {
            switch( element )
            {
                case AosElementAttribute.Physical: return ( label ) ? 1071091 : 0;         // Earring of Protection (Physical)  1071091
                case AosElementAttribute.Fire:     return ( label ) ? 1071092 : 0x4ec;     // Earring of Protection (Fire)      1071092
                case AosElementAttribute.Cold:     return ( label ) ? 1071093 : 0x4f2;     // Earring of Protection (Cold)      1071093
                case AosElementAttribute.Poison:   return ( label ) ? 1071094 : 0x4f8;     // Earring of Protection (Poison)    1071094
                case AosElementAttribute.Energy:   return ( label ) ? 1071095 : 0x4fe;     // Earring of Protection (Energy)    1071095

                default: return -1;
            }
        }
开发者ID:vexilar,项目名称:RunUO_Rebar,代码行数:13,代码来源:EarringsOfProtection.cs


示例7: ApplyAttribute

 public static void ApplyAttribute( AosElementAttributes attrs, AosElementAttribute attr, int amount )
 {
     attrs[attr] += amount;
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:4,代码来源:BonusAttribute.cs


示例8: AssignElementalDamage

		private static int AssignElementalDamage( BaseWeapon weapon, AosElementAttribute attr, int totalDamage )
		{
			if( totalDamage <= 0 )
				return 0;

			int random = Utility.Random( (int)(totalDamage/10) + 1 ) * 10;
			weapon.AosElementDamages[attr] = random;

			return (totalDamage - random);
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:10,代码来源:BaseRunicTool.cs


示例9: ElementAttributeInfo

 public ElementAttributeInfo(AosElementAttribute 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


示例10: GetPropRange

 public static int[] GetPropRange(AosElementAttribute attr)
 {
     return new int[] { 1, 15 };
 }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:4,代码来源:Imbuing.cs


示例11: HasAttribute

		public static bool HasAttribute(this Item item, AosElementAttribute attr, out int value)
		{
			return (HasAttribute(item, "Resistances", (ulong)attr, out value) /*||
					HasAttribute(item, "AosElementDamages", (ulong)attr, out value)*/);
		}
开发者ID:Vita-Nex,项目名称:Core,代码行数:5,代码来源:AttributesExt.cs


示例12: GetModForAttribute

        public static int GetModForAttribute(AosElementAttribute type)
        {
            switch (type)
            {
                case AosElementAttribute.Physical: return 51;
                case AosElementAttribute.Fire: return 52;
                case AosElementAttribute.Cold: return 53;
                case AosElementAttribute.Poison: return 54;
                case AosElementAttribute.Energy: return 55;
            }

            return -1;
        }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:13,代码来源:Imbuing.cs


示例13: BonusAttribute

 public BonusAttribute( AosElementAttribute attr, int amount )
     : this((object)attr, amount)
 {
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:4,代码来源:BonusAttribute.cs


示例14: RemoveAttribute

 public static void RemoveAttribute( AosElementAttributes attrs, AosElementAttribute attr, int amount )
 {
     attrs[attr] = Math.Max( attrs[attr] - amount, 0 );
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:4,代码来源:BonusAttribute.cs


示例15: GetElementAttributeValue

        private static int GetElementAttributeValue(BaseWeapon weapon, AosElementAttribute element)
        {
            int phys, fire, cold, pois, nrgy, chao, direct;
            weapon.GetDamageTypes(null, out phys, out fire, out cold, out pois, out nrgy, out chao, out direct);

            switch (element)
            {
                case AosElementAttribute.Physical:
                    return phys;
                case AosElementAttribute.Fire:
                    return fire;
                case AosElementAttribute.Cold:
                    return cold;
                case AosElementAttribute.Poison:
                    return pois;
                case AosElementAttribute.Energy:
                    return nrgy;
                case AosElementAttribute.Direct:
                    return direct;
            }
            return -1;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:22,代码来源:WeaponAttributeSearchCriterion.cs


示例16: GetElementalDamages

		public static void GetElementalDamages( BaseWeapon weapon, bool randomizeOrder )
		{
			int fire, phys, cold, nrgy, pois;

			weapon.GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy );

			int totalDamage = phys;

			AosElementAttribute[] attrs = new AosElementAttribute[]
			{
				AosElementAttribute.Cold,
				AosElementAttribute.Energy,
				AosElementAttribute.Fire,
				AosElementAttribute.Poison
			};

			if( randomizeOrder )
			{
				for( int i = 0; i < attrs.Length; i++ )
				{
					int rand = Utility.Random( attrs.Length );
					AosElementAttribute temp = attrs[i];

					attrs[i] = attrs[rand];
					attrs[rand] = temp;
				}
			}


			/*
			totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Cold,		totalDamage );
			totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Energy,	totalDamage );
			totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Fire,		totalDamage );
			totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Poison,	totalDamage );

			weapon.AosElementDamages[AosElementAttribute.Physical] = 100 - totalDamage;
			 * */

			for( int i = 0; i < attrs.Length; i++ )
				totalDamage = AssignElementalDamage( weapon, attrs[i], totalDamage );


			//Order is Cold, Energy, Fire, Poison -> Physical left
			//Cannot be looped, AoselementAttribute is 'out of order'

			weapon.Hue = weapon.GetElementalDamageHue();
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:47,代码来源:BaseRunicTool.cs


示例17:

 public int this[AosElementAttribute attribute]
 {
     get
     {
         return this.ExtendedGetValue((int)attribute);
     }
     set
     {
         this.SetValue((int)attribute, value);
     }
 }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:11,代码来源:AOS.cs


示例18: ApplyResistance

 public static void ApplyResistance(Item item, int value, AosElementAttribute attribute)
 {
     if(item is BaseJewel)
         ((BaseJewel)item).Resistances[attribute] = value;
     else if (item is BaseClothing)
         ((BaseClothing)item).Resistances[attribute] = value;
     else
     {
         switch (attribute)
         {
             default:
             case AosElementAttribute.Physical:
                 if (item is BaseArmor) ((BaseArmor)item).PhysicalBonus = value;
                 else if (item is BaseWeapon) ((BaseWeapon)item).WeaponAttributes.ResistPhysicalBonus = value;
                 break;
             case AosElementAttribute.Fire:
                 if (item is BaseArmor) ((BaseArmor)item).FireBonus = value;
                 else if (item is BaseWeapon) ((BaseWeapon)item).WeaponAttributes.ResistFireBonus = value;
                 break;
             case AosElementAttribute.Cold:
                 if (item is BaseArmor) ((BaseArmor)item).ColdBonus = value;
                 else if (item is BaseWeapon) ((BaseWeapon)item).WeaponAttributes.ResistColdBonus = value; 
                 break;
             case AosElementAttribute.Poison:
                 if (item is BaseArmor) ((BaseArmor)item).PoisonBonus = value;
                 else if (item is BaseWeapon) ((BaseWeapon)item).WeaponAttributes.ResistPoisonBonus = value; 
                 break;
             case AosElementAttribute.Energy:
                 if (item is BaseArmor) ((BaseArmor)item).EnergyBonus = value;
                 else if (item is BaseWeapon) ((BaseWeapon)item).WeaponAttributes.ResistEnergyBonus = value; 
                 break;
         }
     }
 }
开发者ID:mcarriere,项目名称:ServUO,代码行数:34,代码来源:RunicReforging.cs


示例19: ApplyAttribute

 public static void ApplyAttribute( Mobile from, BookOfSpellCrafts book, int craftId, BaseJewel jewel, AosElementAttribute attribute, int minimum, int maximum )
 {
     CheckItem( from, jewel, ( jewel.Resistances[ attribute ] == 0 ) );
     UseMagicJewels( from, book, jewel, SpellCraftConfig.MagicJewelRequirements[craftId] );
     int scalar = ComputeSkillScalar( from );
     ApplyAttribute( jewel.Resistances, SpellCraftConfig.MinimumIntensity * scalar, SpellCraftConfig.MaximumIntensity * scalar, attribute, minimum, maximum );
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:7,代码来源:Spellcraft.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# AosElementAttributes类代码示例发布时间:2022-05-24
下一篇:
C# AosAttributes类代码示例发布时间: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