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

C# AosAttribute类代码示例

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

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



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

示例1: GetValue

		public static int GetValue( Mobile m, AosAttribute att )
		{
			if ( EnhancementList.ContainsKey( m ) )
				return EnhancementList[m].Attributes[att];
			else
				return 0;
		}
开发者ID:suiy187,项目名称:runuocustom,代码行数:7,代码来源:Enhancement.cs


示例2: XmlAosAttribute

 public XmlAosAttribute(AosAttribute attr, int value, int duration)
 {
     Attribute = attr;
     m_Value = value;
     Expiration = TimeSpan.FromMinutes(duration);
     Name = Attribute.ToString() + " " + (Value >= 0 ? ("+" + Value.ToString()) : (Value.ToString()));
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:XmlAosAttribute.cs


示例3: SetValue

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

			if ( att == AosAttribute.BonusStr )
			{
				m.RemoveStatMod( "MagicalEnhancementStr" );
				m.AddStatMod( new StatMod( StatType.Str, "MagicalEnhancementStr", value, TimeSpan.Zero ) );
			}
			else if ( att == AosAttribute.BonusDex )
			{
				m.RemoveStatMod( "MagicalEnhancementDex" );
				m.AddStatMod( new StatMod( StatType.Dex, "MagicalEnhancementDex", value, TimeSpan.Zero ) );
			}
			else if ( att == AosAttribute.BonusInt )
			{
				m.RemoveStatMod( "MagicalEnhancementInt" );
				m.AddStatMod( new StatMod( StatType.Int, "MagicalEnhancementInt", value, TimeSpan.Zero ) );
			}

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


示例4: ApplyAttribute

		private static void ApplyAttribute( AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high, int scale )
		{
			if ( attr == AosAttribute.CastSpeed )
				attrs[attr] += Scale( min, max, low / scale, high / scale ) * scale;
			else
				attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;

			if ( attr == AosAttribute.SpellChanneling )
				attrs[AosAttribute.CastSpeed] -= 1;
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:10,代码来源:BaseRunicTool.cs


示例5: GetValue

        public static int GetValue(Mobile m, AosAttribute attr)
        {
            if (m == null || m.Deleted)
                return 0;

            ArrayList attachments = XmlAttach.FindAttachments(m, typeof(XmlAosAttribute));
            int value = 0;

            if (attachments == null)
                return 0;

            if (attachments.Count > 0)
            {
                foreach (XmlAosAttribute att in attachments)
                {
                    if (att.Attribute == attr)
                        value += att.Value;
                }
            }
            return value;
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:21,代码来源:XmlAosAttribute.cs


示例6: HasAttribute

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


示例7: GetPropRange

 public static int[] GetPropRange(AosAttribute attr)
 {
     switch (attr)
     {
         case AosAttribute.Luck: return new int[] { 1, 100 };
         case AosAttribute.WeaponDamage: return new int[] { 2, 50 };
         case AosAttribute.WeaponSpeed: return new int[] { 5, 30 };
         case AosAttribute.LowerRegCost: return new int[] { 1, 20 };
         case AosAttribute.EnhancePotions: return new int[] { 5, 25 };
         case AosAttribute.AttackChance:
         case AosAttribute.DefendChance:
         case AosAttribute.ReflectPhysical: return new int[] { 1, 15 };
         case AosAttribute.SpellDamage: return new int[] { 1, 12 };
         case AosAttribute.BonusStr:
         case AosAttribute.BonusInt:
         case AosAttribute.BonusDex:
         case AosAttribute.BonusStam:
         case AosAttribute.BonusMana:
         case AosAttribute.LowerManaCost: return new int[] { 1, 8 };
         case AosAttribute.BonusHits: return new int[] { 1, 5 };
         case AosAttribute.CastRecovery:
         case AosAttribute.RegenStam: return new int[] { 1, 3 };
         case AosAttribute.RegenHits:
         case AosAttribute.RegenMana: return new int[] { 1, 2 };
         default:
         case AosAttribute.SpellChanneling:
         case AosAttribute.CastSpeed:
         case AosAttribute.Brittle:
         case AosAttribute.NightSight: return new int[] { 1, 1 };
     }
 }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:31,代码来源:Imbuing.cs


示例8: GetModForAttribute

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

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

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


示例9: GetValue

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

return 0;
/*
			ArrayList items = m.Items;
			int value = 0;

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

				if ( obj is BaseWeapon )
				{
					AosAttributes attrs = ((BaseWeapon)obj).Attributes;

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

					if ( attribute == AosAttribute.Luck )
						value += ((BaseWeapon)obj).GetLuckBonus();
				}
				else if ( obj is BaseArmor )
				{
					AosAttributes attrs = ((BaseArmor)obj).Attributes;

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

					if ( attribute == AosAttribute.Luck )
						value += ((BaseArmor)obj).GetLuckBonus();
				}
				else if ( obj is BaseJewel )
				{
					AosAttributes attrs = ((BaseJewel)obj).Attributes;

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

			return value;
*/			
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:46,代码来源:AOS.cs


示例10: ApplyAttribute

 private static void ApplyAttribute( AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high )
 {
     attrs[attr] = Scale( min, max, low, high );
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:4,代码来源:Spellcraft.cs


示例11: GetAttribute

 public int GetAttribute(AosAttribute attr)
 {
     foreach (ObjectProperty property in this.m_Props.Properties)
     {
         if (property.Number == attr)
         {
             string arguments = property.Arguments;
             switch (arguments)
             {
                 case "":
                 case " ":
                     return 1;
             }
             try
             {
                 return int.Parse(arguments);
             }
             catch
             {
                 return 0;
             }
         }
     }
     return 0;
 }
开发者ID:Skinny1001,项目名称:PlayUO,代码行数:25,代码来源:AosAttributes.cs


示例12: GetValue

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

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

            #region Enhancement
            value += Enhancement.GetValue(m, attribute);
            #endregion

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

                if (obj is BaseWeapon)
                {
                    AosAttributes attrs = ((BaseWeapon)obj).Attributes;

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

                    if (attribute == AosAttribute.Luck)
                        value += ((BaseWeapon)obj).GetLuckBonus();
                }
                else if (obj is BaseArmor)
                {
                    AosAttributes attrs = ((BaseArmor)obj).Attributes;

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

                    if (attribute == AosAttribute.Luck)
                        value += ((BaseArmor)obj).GetLuckBonus();
                }
                else if (obj is BaseJewel)
                {
                    AosAttributes attrs = ((BaseJewel)obj).Attributes;

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

                    if (attrs != null)
                        value += attrs[attribute];
                }
                else if (obj is Spellbook)
                {
                    AosAttributes attrs = ((Spellbook)obj).Attributes;

                    if (attrs != null)
                        value += attrs[attribute];
                }
                else if (obj is BaseQuiver)
                {
                    AosAttributes attrs = ((BaseQuiver)obj).Attributes;

                    if (attrs != null)
                        value += attrs[attribute];
                }
                else if (obj is BaseTalisman)
                {
                    AosAttributes attrs = ((BaseTalisman)obj).Attributes;

                    if (attrs != null)
                        value += attrs[attribute];
                }
				
                #region Mondain's Legacy
                if (attribute == AosAttribute.WeaponDamage)
                {
                    if (BaseMagicalFood.IsUnderInfluence(m, MagicalFood.WrathGrapes))
                        value += 10; // TODO check
                }
                else if (attribute == AosAttribute.SpellDamage)
                {
                    if (BaseMagicalFood.IsUnderInfluence(m, MagicalFood.WrathGrapes))
                        value += 5; // TODO check
                }
                else if (attribute == AosAttribute.CastSpeed)
                {
                    if (MonstrousInterredGrizzle.UnderCacophonicAttack(m) || LadyMelisande.UnderPutridNausea(m))
                        value -= 3; // TODO check
                }
                else if (attribute == AosAttribute.WeaponSpeed || LadyMelisande.UnderPutridNausea(m))
                {
                    if (MonstrousInterredGrizzle.UnderCacophonicAttack(m))
                        value -= 3; // TODO check
                }

                if (obj is ISetItem)
                { 
                    ISetItem item = (ISetItem)obj;

                    AosAttributes attrs = item.SetAttributes;
										
//.........这里部分代码省略.........
开发者ID:jasegiffin,项目名称:JustUO,代码行数:101,代码来源:AOS.cs


示例13: RemoveAttribute

 public static void RemoveAttribute( AosAttributes attrs, AosAttribute attr, int amount )
 {
     if ( attr == AosAttribute.SpellChanneling && attrs.SpellChanneling > 0 )
     {
         attrs[attr] = 0;
         attrs.CastSpeed++;
     }
     else
         attrs[attr] = Math.Max( attrs[attr] - amount, 0 );
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:10,代码来源:BonusAttribute.cs


示例14: BonusAttribute

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


示例15: ApplyAttribute

 public static void ApplyAttribute( AosAttributes attrs, AosAttribute attr, int amount )
 {
     if ( attr == AosAttribute.SpellChanneling && attrs.SpellChanneling == 0 )
     {
         attrs[attr] = 1;
         attrs.CastSpeed--;
     }
     else
         attrs[attr] += amount;
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:10,代码来源:BonusAttribute.cs


示例16: GetChance

        public static int GetChance( AosAttribute attr, AosAttributes itemAttrs )
        {
            int chance;

            switch ( attr )
            {
                case AosAttribute.LowerWeight: 					chance = itemAttrs[attr] / 50; break;
                case AosAttribute.WeaponDamage:					chance = itemAttrs[attr] / 5; break;
                case AosAttribute.Luck: 						chance = 8 + itemAttrs[attr] / 2; break;
                default:
                    chance = itemAttrs[attr] / 2; break;
            }

            return chance;
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:15,代码来源:Enhance.cs


示例17: GetValue

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

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

            #region Enhancement
            value += Enhancement.GetValue(m, attribute);
            #endregion

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

                if (obj is BaseWeapon)
                {
                    AosAttributes attrs = ((BaseWeapon)obj).Attributes;

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

                    if (attribute == AosAttribute.Luck)
                        value += ((BaseWeapon)obj).GetLuckBonus();
                }
                else if (obj is BaseArmor)
                {
                    AosAttributes attrs = ((BaseArmor)obj).Attributes;

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

                    if (attribute == AosAttribute.Luck)
                        value += ((BaseArmor)obj).GetLuckBonus();
                }
                else if (obj is BaseJewel)
                {
                    AosAttributes attrs = ((BaseJewel)obj).Attributes;

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

                    if (attrs != null)
                        value += attrs[attribute];
                }
                else if (obj is Spellbook)
                {
                    AosAttributes attrs = ((Spellbook)obj).Attributes;

                    if (attrs != null)
                        value += attrs[attribute];
                }
                else if (obj is BaseQuiver)
                {
                    AosAttributes attrs = ((BaseQuiver)obj).Attributes;

                    if (attrs != null)
                        value += attrs[attribute];
                }
                else if (obj is BaseTalisman)
                {
                    AosAttributes attrs = ((BaseTalisman)obj).Attributes;

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

                if (obj is ISetItem)
                {
                    ISetItem item = (ISetItem)obj;

                    AosAttributes attrs = item.SetAttributes;

                    if (attrs != null && item.LastEquipped)
                        value += attrs[attribute];
                }
            }

            #region Malus/Buff Handler
            if (attribute == AosAttribute.WeaponDamage)
            {
                if (BaseMagicalFood.IsUnderInfluence(m, MagicalFood.WrathGrapes))
                    value += 35;

                // attacker gets 10% bonus when they're under divine fury
                if (DivineFurySpell.UnderEffect(m))
                    value += 10;

                // Horrific Beast transformation gives a +25% bonus to damage.
                if (TransformationSpellHelper.UnderTransformation(m, typeof(HorrificBeastSpell)))
                    value += 25;

                int defenseMasteryMalus = 0;
                int discordanceEffect = 0;

//.........这里部分代码省略.........
开发者ID:Crome696,项目名称:ServUO,代码行数:101,代码来源:AOS.cs


示例18: AttributeInfo

 public AttributeInfo(AosAttribute 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


示例19: GetValue

		public static int GetValue(Mobile m, AosAttribute attribute)
		{
			return 0; // some day this insanity will all be gone!
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:4,代码来源:AOS.cs


示例20: GetValue

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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