本文整理汇总了C#中AosArmorAttribute类的典型用法代码示例。如果您正苦于以下问题:C# AosArmorAttribute类的具体用法?C# AosArmorAttribute怎么用?C# AosArmorAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AosArmorAttribute类属于命名空间,在下文中一共展示了AosArmorAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: GetValue
public static int GetValue(Mobile m, AosArmorAttribute attribute)
{
return 0;
}
示例3:
public int this[AosArmorAttribute attribute]
{
get
{
return this.ExtendedGetValue((int)attribute);
}
set
{
this.SetValue((int)attribute, value);
}
}
示例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 );
}
示例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;
}
示例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;
}
示例7: GetValue
public static int GetValue( Mobile m, AosArmorAttribute att )
{
if ( EnhancementList.ContainsKey( m ) )
return EnhancementList[m].ArmorAttributes[att];
else
return 0;
}
示例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 );
}
示例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;
}
示例10: BonusAttribute
public BonusAttribute( AosArmorAttribute attr, int amount )
: this((object)attr, amount)
{
}
示例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;
}
示例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;
}
示例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 );
}
示例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 };
}
}
示例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));
}