本文整理汇总了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;
}
示例2: EarringsOfProtection
public EarringsOfProtection(AosElementAttribute element)
: base(0x1087, Layer.Earrings)
{
this.Resistances[((AosElementAttribute)element)] = 2;
this.m_Attribute = element;
this.LootType = LootType.Blessed;
}
示例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 );
}
示例4: GetValue
public int this[AosElementAttribute attribute]
{
get { return GetValue( (int)attribute ); }
set { SetValue( (int)attribute, value ); }
}
示例5: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Attribute = (AosElementAttribute)reader.ReadInt();
}
示例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;
}
}
示例7: ApplyAttribute
public static void ApplyAttribute( AosElementAttributes attrs, AosElementAttribute attr, int amount )
{
attrs[attr] += amount;
}
示例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);
}
示例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;
}
示例10: GetPropRange
public static int[] GetPropRange(AosElementAttribute attr)
{
return new int[] { 1, 15 };
}
示例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)*/);
}
示例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;
}
示例13: BonusAttribute
public BonusAttribute( AosElementAttribute attr, int amount )
: this((object)attr, amount)
{
}
示例14: RemoveAttribute
public static void RemoveAttribute( AosElementAttributes attrs, AosElementAttribute attr, int amount )
{
attrs[attr] = Math.Max( attrs[attr] - amount, 0 );
}
示例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;
}