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


C# AosWeaponAttribute類代碼示例

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


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

示例1: GetValue

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

示例2: WeaponAttributeInfo

 public WeaponAttributeInfo(AosWeaponAttribute 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

示例3: ExpireTimer

            public ExpireTimer(BaseWeapon weapon, AosWeaponAttribute attribute, Mobile from, TimeSpan delay)
                : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
            {
                m_From = from;
                this.m_Weapon = weapon;
                this.m_Attribute = attribute;
                this.m_End = DateTime.UtcNow + delay;

                this.Priority = TimerPriority.TwoFiftyMS;
            }
開發者ID:g4idrijs,項目名稱:ServUO,代碼行數:10,代碼來源:EnchantGump.cs

示例4: GetChance

        public static int GetChance( AosWeaponAttribute attr, AosWeaponAttributes itemAttrs )
        {
            int chance;

            switch ( attr )
            {
                case AosWeaponAttribute.DurabilityBonus: 		chance = itemAttrs[attr] / 50; break;
                case AosWeaponAttribute.LowerStatReq: 			chance = itemAttrs[attr] / 6; break;
                case AosWeaponAttribute.ResistPhysicalBonus:
                case AosWeaponAttribute.ResistFireBonus:
                case AosWeaponAttribute.ResistColdBonus:
                case AosWeaponAttribute.ResistPoisonBonus:
                case AosWeaponAttribute.ResistEnergyBonus:		chance = itemAttrs[attr]; break;
                default:
                    chance = itemAttrs[attr] / 2; break;
            }

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

示例5: GetValue

		public int this[AosWeaponAttribute attribute]
		{
			get { return GetValue( (int)attribute ); }
			set { SetValue( (int)attribute, value ); }
		}
開發者ID:bugraerdogan,項目名稱:silverlight-uo-client,代碼行數:5,代碼來源:AOS.cs

示例6: ApplyAttribute

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

示例7: GetModForAttribute

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

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

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

示例8:

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

示例9: RemoveAttribute

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

示例10: IsHitAreaOrSpell

 private static bool IsHitAreaOrSpell(AosWeaponAttribute attr, int mod)
 {
     if (attr >= AosWeaponAttribute.HitMagicArrow && attr <= AosWeaponAttribute.HitDispel)
         return mod >= 35 && mod <= 39;
     else if (attr >= AosWeaponAttribute.HitColdArea && attr <= AosWeaponAttribute.HitPhysicalArea)
         return mod >= 30 && mod <= 34;
     return false;
 }
開發者ID:Ziden,項目名稱:ServUO-EC-Test-Fork,代碼行數:8,代碼來源:Imbuing.cs

示例11: BonusAttribute

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

示例12: ApplyAttribute

 public static void ApplyAttribute( AosWeaponAttributes attrs, AosWeaponAttribute attr, int amount )
 {
     attrs[attr] += amount;
 }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:4,代碼來源:BonusAttribute.cs

示例13: GetPropRange

        public static int[] GetPropRange(Item item, AosWeaponAttribute attr)
        {
            if (Core.SA && item is BaseWeapon && (attr == AosWeaponAttribute.HitLeechHits || attr == AosWeaponAttribute.HitLeechMana))
            {
                BaseWeapon wep = item as BaseWeapon;

                int max = (int)(wep.MlSpeed * 2500 / (100 + wep.Attributes.WeaponSpeed));

                if (wep is BaseRanged) max /= 2;

                return new int[] { 2, max };
            }

            switch (attr)
            {
                case AosWeaponAttribute.DurabilityBonus:
                case AosWeaponAttribute.LowerStatReq: return new int[] { 10, 100 };
                case AosWeaponAttribute.HitLeechHits:
                case AosWeaponAttribute.HitLeechMana:
                case AosWeaponAttribute.HitLeechStam:
                case AosWeaponAttribute.HitLowerAttack:
                case AosWeaponAttribute.HitLowerDefend:
                case AosWeaponAttribute.HitMagicArrow:
                case AosWeaponAttribute.HitHarm:
                case AosWeaponAttribute.HitLightning:
                case AosWeaponAttribute.HitFireball:
                case AosWeaponAttribute.HitDispel:
                case AosWeaponAttribute.HitColdArea:
                case AosWeaponAttribute.HitFireArea:
                case AosWeaponAttribute.HitPhysicalArea:
                case AosWeaponAttribute.HitPoisonArea:
                case AosWeaponAttribute.HitCurse:
                case AosWeaponAttribute.HitFatigue:
                case AosWeaponAttribute.HitManaDrain: return new int[] { 2, 50 };
                case AosWeaponAttribute.HitEnergyArea:
                case AosWeaponAttribute.ResistFireBonus:
                case AosWeaponAttribute.ResistColdBonus:
                case AosWeaponAttribute.ResistPoisonBonus:
                case AosWeaponAttribute.ResistEnergyBonus:
                case AosWeaponAttribute.ResistPhysicalBonus: return new int[] { 1, 15 };
                case AosWeaponAttribute.MageWeapon: return new int[] { 1, 10 };
                case AosWeaponAttribute.SelfRepair: return new int[] { 1, 5 };
                case AosWeaponAttribute.SplinteringWeapon: return new int[] { 5, 30 };
                default:
                case AosWeaponAttribute.UseBestSkill:
                case AosWeaponAttribute.BattleLust:
                case AosWeaponAttribute.BloodDrinker: return new int[] { 1, 1 };
            }
        }
開發者ID:Ravenwolfe,項目名稱:ServUO,代碼行數:49,代碼來源:Imbuing.cs

示例14: GetValue

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

示例15: GetPropRange

 public static int[] GetPropRange(AosWeaponAttribute attr)
 {
     switch (attr)
     {
         case AosWeaponAttribute.DurabilityBonus:
         case AosWeaponAttribute.LowerStatReq: return new int[] { 10, 100 };
         case AosWeaponAttribute.HitLeechHits:
         case AosWeaponAttribute.HitLeechMana:
         case AosWeaponAttribute.HitLeechStam:
         case AosWeaponAttribute.HitLowerAttack:
         case AosWeaponAttribute.HitLowerDefend:
         case AosWeaponAttribute.HitMagicArrow:
         case AosWeaponAttribute.HitHarm:
         case AosWeaponAttribute.HitLightning:
         case AosWeaponAttribute.HitFireball:
         case AosWeaponAttribute.HitDispel:
         case AosWeaponAttribute.HitColdArea:
         case AosWeaponAttribute.HitFireArea:
         case AosWeaponAttribute.HitPhysicalArea:
         case AosWeaponAttribute.HitPoisonArea:
         case AosWeaponAttribute.HitCurse:
         case AosWeaponAttribute.HitFatigue:
         case AosWeaponAttribute.HitManaDrain: return new int[] { 2, 50 };
         case AosWeaponAttribute.HitEnergyArea:
         case AosWeaponAttribute.ResistFireBonus:
         case AosWeaponAttribute.ResistColdBonus:
         case AosWeaponAttribute.ResistPoisonBonus:
         case AosWeaponAttribute.ResistEnergyBonus:
         case AosWeaponAttribute.ResistPhysicalBonus: return new int[] { 1, 15 };
         case AosWeaponAttribute.MageWeapon: return new int[] { 1, 10 };
         case AosWeaponAttribute.SelfRepair: return new int[] { 1, 5 };
         case AosWeaponAttribute.SplinteringWeapon: return new int[] { 5, 30 };
         default:
         case AosWeaponAttribute.UseBestSkill:
         case AosWeaponAttribute.BattleLust:
         case AosWeaponAttribute.BloodDrinker: return new int[] { 1, 1 };
     }
 }
開發者ID:Ziden,項目名稱:ServUO-EC-Test-Fork,代碼行數:38,代碼來源:Imbuing.cs


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