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


C# AosElementAttribute類代碼示例

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


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


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