本文整理汇总了C#中AosWeaponAttributes类的典型用法代码示例。如果您正苦于以下问题:C# AosWeaponAttributes类的具体用法?C# AosWeaponAttributes怎么用?C# AosWeaponAttributes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AosWeaponAttributes类属于命名空间,在下文中一共展示了AosWeaponAttributes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GargishGlasses
public GargishGlasses()
: base(0x4644)
{
this.Layer = Layer.Helm;
this.Weight = 2;
this.m_AosWeaponAttributes = new AosWeaponAttributes(this);
}
示例2: Glasses
public Glasses()
: base(0x2FB8)
{
this.Weight = 2.0;
this.m_AosWeaponAttributes = new AosWeaponAttributes(this);
}
示例3: BaseWeapon
public BaseWeapon( int itemID )
: base(itemID)
{
Layer = (Layer)ItemData.Quality;
m_Quality = WeaponQuality.Regular;
m_StrReq = -1;
m_DexReq = -1;
m_IntReq = -1;
m_MinDamage = -1;
m_MaxDamage = -1;
m_HitSound = -1;
m_MissSound = -1;
m_Speed = -1;
m_MaxRange = -1;
m_Skill = (SkillName)(-1);
m_Type = (WeaponType)(-1);
m_Animation = (WeaponAnimation)(-1);
m_Hits = m_MaxHits = Utility.RandomMinMax(InitMinHits, InitMaxHits);
m_Resource = CraftResource.Iron;
m_AosAttributes = new AosAttributes(this);
m_AosWeaponAttributes = new AosWeaponAttributes(this);
m_AosSkillBonuses = new AosSkillBonuses(this);
}
示例4: Deserialize
//.........这里部分代码省略.........
m_Speed = -1;
if( GetSaveFlag(flags, SaveFlag.MaxRange) )
m_MaxRange = reader.ReadInt();
else
m_MaxRange = -1;
if( GetSaveFlag(flags, SaveFlag.Skill) )
m_Skill = (SkillName)reader.ReadInt();
else
m_Skill = (SkillName)(-1);
if( GetSaveFlag(flags, SaveFlag.Type) )
m_Type = (WeaponType)reader.ReadInt();
else
m_Type = (WeaponType)(-1);
if( GetSaveFlag(flags, SaveFlag.Animation) )
m_Animation = (WeaponAnimation)reader.ReadInt();
else
m_Animation = (WeaponAnimation)(-1);
if( GetSaveFlag(flags, SaveFlag.Resource) )
m_Resource = (CraftResource)reader.ReadInt();
else
m_Resource = CraftResource.Iron;
if( GetSaveFlag(flags, SaveFlag.xAttributes) )
m_AosAttributes = new AosAttributes(this, reader);
else
m_AosAttributes = new AosAttributes(this);
if( GetSaveFlag(flags, SaveFlag.xWeaponAttributes) )
m_AosWeaponAttributes = new AosWeaponAttributes(this, reader);
else
m_AosWeaponAttributes = new AosWeaponAttributes(this);
if( UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile )
{
m_SkillMod = new DefaultSkillMod(AccuracySkill, true, (int)m_AccuracyLevel * 5);
((Mobile)Parent).AddSkillMod(m_SkillMod);
}
if( version < 7 && m_AosWeaponAttributes.MageWeapon != 0 )
m_AosWeaponAttributes.MageWeapon = 30 - m_AosWeaponAttributes.MageWeapon;
if( Core.SE && m_AosWeaponAttributes.MageWeapon != 0 && m_AosWeaponAttributes.MageWeapon != 30 && Parent is Mobile )
{
m_MageMod = new DefaultSkillMod(SkillName.Magery, true, -30 + m_AosWeaponAttributes.MageWeapon);
((Mobile)Parent).AddSkillMod(m_MageMod);
}
if( GetSaveFlag(flags, SaveFlag.PlayerConstructed) )
m_PlayerConstructed = true;
if( GetSaveFlag(flags, SaveFlag.SkillBonuses) )
m_AosSkillBonuses = new AosSkillBonuses(this, reader);
else
m_AosSkillBonuses = new AosSkillBonuses(this);
if( GetSaveFlag(flags, SaveFlag.Slayer2) )
m_Slayer2 = (SlayerName)reader.ReadInt();
break;
}
case 4:
示例5: 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;
}
示例6: Deserialize
//.........这里部分代码省略.........
m_Speed = reader.ReadInt();
else
m_Speed = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxRange ) )
m_MaxRange = reader.ReadInt();
else
m_MaxRange = -1;
if ( GetSaveFlag( flags, SaveFlag.Skill ) )
m_Skill = (SkillName)reader.ReadInt();
else
m_Skill = (SkillName)(-1);
if ( GetSaveFlag( flags, SaveFlag.Type ) )
m_Type = (WeaponType)reader.ReadInt();
else
m_Type = (WeaponType)(-1);
if ( GetSaveFlag( flags, SaveFlag.Animation ) )
m_Animation = (WeaponAnimation)reader.ReadInt();
else
m_Animation = (WeaponAnimation)(-1);
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
m_Resource = (CraftResource)reader.ReadInt();
else
m_Resource = CraftResource.Iron;
// obsolete from version 8 on
if (version < 8)
{
AosAttributes dmy_AosAttributes;
AosWeaponAttributes dmy_AosWeaponAttributes;
if ( GetSaveFlag( flags, SaveFlag.xAttributes ) )
dmy_AosAttributes = new AosAttributes( this, reader );
//else
//dmy_AosAttributes = new AosAttributes( this );
if ( GetSaveFlag( flags, SaveFlag.xWeaponAttributes ) )
dmy_AosWeaponAttributes = new AosWeaponAttributes( this, reader );
//else
//dmy_AosWeaponAttributes = new AosWeaponAttributes( this );
}
if ( UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile )
{
m_SkillMod = new DefaultSkillMod( SkillName.Tactics, true, (int)m_AccuracyLevel * 5 );
((Mobile)Parent).AddSkillMod( m_SkillMod );
}
/*if ( Core.AOS && m_AosWeaponAttributes.MageWeapon != 0 && Parent is Mobile )
{
m_MageMod = new DefaultSkillMod( SkillName.Magery, true, -m_AosWeaponAttributes.MageWeapon );
((Mobile)Parent).AddSkillMod( m_MageMod );
}*/
// erl: made obsolete by PlayerCrafted in version 9
//if (version < 9)
//{
//if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
//PlayerCrafted = true;
//}
break;
示例7: BaseWeapon
public BaseWeapon( int itemID ) : base( itemID )
{
Layer = (Layer)ItemData.Quality;
m_Quality = WeaponQuality.Regular;
m_StrReq = -1;
m_DexReq = -1;
m_IntReq = -1;
m_MinDamage = -1;
m_MaxDamage = -1;
m_HitSound = -1;
m_MissSound = -1;
m_Speed = -1;
m_MaxRange = -1;
m_Skill = (SkillName)(-1);
m_Type = (WeaponType)(-1);
m_Animation = (WeaponAnimation)(-1);
m_Hits = m_MaxHits = Utility.RandomMinMax( InitMinHits, InitMaxHits );
m_Resource = CraftResource.Iron;
m_AosAttributes = new AosAttributes( this );
m_AosWeaponAttributes = new AosWeaponAttributes( this );
m_AosSkillBonuses = new AosSkillBonuses(this);
// mod to randomly add sockets and socketability features to weapons. These settings will yield
// 2% drop rate of socketed/socketable items
// 0.1% chance of 5 sockets
// 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
// 50% chance of 1 socket
// the remainder will be 0 socket (31.4% in this case)
// uncomment the next line to prevent artifacts from being socketed
// if(ArtifactRarity == 0)
XmlSockets.ConfigureRandom(this, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0);
m_AosElementDamages = new AosElementAttributes( this );
}
示例8: ElvenGlasses
public ElvenGlasses() : base( 0x2FB8 )
{
Weight = 2;
m_AosWeaponAttributes = new AosWeaponAttributes( this );
}
示例9: BaseWeapon
public BaseWeapon(int itemID)
: base(itemID)
{
Layer = (Layer)ItemData.Quality;
m_Quality = WeaponQuality.Regular;
m_StrReq = -1;
m_DexReq = -1;
m_IntReq = -1;
m_MinDamage = -1;
m_MaxDamage = -1;
m_HitSound = -1;
m_MissSound = -1;
m_Speed = -1;
m_MaxRange = -1;
m_Skill = (SkillName)(-1);
m_Type = (WeaponType)(-1);
m_Animation = (WeaponAnimation)(-1);
m_Hits = m_MaxHits = Utility.RandomMinMax(InitMinHits, InitMaxHits);
m_Resource = CraftResource.Iron;
m_AosAttributes = new AosAttributes(this);
m_AosWeaponAttributes = new AosWeaponAttributes(this);
m_AosSkillBonuses = new AosSkillBonuses(this);
m_AosElementDamages = new AosElementAttributes(this);
#region SA
m_SAAbsorptionAttributes = new SAAbsorptionAttributes( this );
#endregion
#region Mondain's Legacy Sets
m_SetAttributes = new AosAttributes(this);
m_SetSkillBonuses = new AosSkillBonuses(this);
#endregion
ItemValue = GearScore.GetItemValue( this );
}
示例10: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
SaveFlag flags = (SaveFlag)reader.ReadInt();
if (GetSaveFlag(flags, SaveFlag.WeaponAttributes))
this.m_AosWeaponAttributes = new AosWeaponAttributes(this, reader);
else
this.m_AosWeaponAttributes = new AosWeaponAttributes(this);
}
示例11: Deserialize
//.........这里部分代码省略.........
m_Speed = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxRange ) )
m_MaxRange = reader.ReadInt();
else
m_MaxRange = -1;
if ( GetSaveFlag( flags, SaveFlag.Skill ) )
m_Skill = (SkillName)reader.ReadInt();
else
m_Skill = (SkillName)(-1);
if ( GetSaveFlag( flags, SaveFlag.Type ) )
m_Type = (WeaponType)reader.ReadInt();
else
m_Type = (WeaponType)(-1);
if ( GetSaveFlag( flags, SaveFlag.Animation ) )
m_Animation = (WeaponAnimation)reader.ReadInt();
else
m_Animation = (WeaponAnimation)(-1);
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
m_Resource = (CraftResource)reader.ReadInt();
else
m_Resource = CraftResource.Iron;
if ( GetSaveFlag( flags, SaveFlag.xAttributes ) )
m_AosAttributes = new AosAttributes( this, reader );
else
m_AosAttributes = new AosAttributes( this );
if ( GetSaveFlag( flags, SaveFlag.xWeaponAttributes ) )
m_AosWeaponAttributes = new AosWeaponAttributes( this, reader );
else
m_AosWeaponAttributes = new AosWeaponAttributes( this );
if ( UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile )
{
m_SkillMod = new DefaultSkillMod( AccuracySkill, true, (int)m_AccuracyLevel * 5 );
((Mobile)Parent).AddSkillMod( m_SkillMod );
}
if ( version < 7 && m_AosWeaponAttributes.MageWeapon != 0 )
m_AosWeaponAttributes.MageWeapon = 30 - m_AosWeaponAttributes.MageWeapon;
if ( Core.AOS && m_AosWeaponAttributes.MageWeapon != 0 && m_AosWeaponAttributes.MageWeapon != 30 && Parent is Mobile )
{
m_MageMod = new DefaultSkillMod( SkillName.Magery, true, -30 + m_AosWeaponAttributes.MageWeapon );
((Mobile)Parent).AddSkillMod( m_MageMod );
}
if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
m_PlayerConstructed = true;
if( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
else
m_AosSkillBonuses = new AosSkillBonuses( this );
if( GetSaveFlag( flags, SaveFlag.Slayer2 ) )
m_Slayer2 = (SlayerName)reader.ReadInt();
if( GetSaveFlag( flags, SaveFlag.ElementalDamages ) )
m_AosElementDamages = new AosElementAttributes( this, reader );
else
示例12: BaseWeapon
public BaseWeapon( int itemID )
: base(itemID)
{
Layer = (Layer)ItemData.Quality;
m_Quality = WeaponQuality.Regular;
m_StrReq = -1;
m_DexReq = -1;
m_IntReq = -1;
m_MinDamage = -1;
m_MaxDamage = -1;
m_HitSound = -1;
m_MissSound = -1;
m_Speed = -1;
m_MaxRange = -1;
m_Skill = (SkillName)(-1);
m_Type = (WeaponType)(-1);
m_Animation = (WeaponAnimation)(-1);
m_Hits = m_MaxHits = Utility.RandomMinMax( InitMinHits, InitMaxHits );
m_Components = new List<Item>();
m_AosAttributes = new AosAttributes( this );
m_AosWeaponAttributes = new AosWeaponAttributes( this );
m_AosSkillBonuses = new AosSkillBonuses( this );
m_AosElementDamages = new AosElementAttributes( this );
if( this is BaseRanged || this is AzhuranBoomerang ||
this is DruidStaff || this is ProphetDiviningRod || this is ClericCrook ||
this is QuarterStaff || this is GnarledStaff || this is SpikedClub || this is Club ||
this is BlackStaff )
this.Resource = CraftResource.Oak;
else
{
this.Resource = CraftResource.Copper;
this.Hue = 2413;
}
if( this is IBoneArmour )
this.Hue = 0;
}
示例13: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 12:
{
#region Runic Reforging
m_ReforgedPrefix = (ReforgedPrefix)reader.ReadInt();
m_ReforgedSuffix = (ReforgedSuffix)reader.ReadInt();
m_ItemPower = (ItemPower)reader.ReadInt();
m_BlockRepair = reader.ReadBool();
#endregion
#region Stygian Abyss
m_DImodded = reader.ReadBool();
m_SearingWeapon = reader.ReadBool();
goto case 11;
}
case 11:
{
m_TimesImbued = reader.ReadInt();
#endregion
goto case 10;
}
case 10:
{
m_BlessedBy = reader.ReadMobile();
m_EngravedText = reader.ReadString();
m_Slayer3 = (TalismanSlayerName)reader.ReadInt();
SetFlag flags = (SetFlag)reader.ReadEncodedInt();
if (GetSaveFlag(flags, SetFlag.Attributes))
{
m_SetAttributes = new AosAttributes(this, reader);
}
else
{
m_SetAttributes = new AosAttributes(this);
}
if (GetSaveFlag(flags, SetFlag.WeaponAttributes))
{
m_SetSelfRepair = (new AosWeaponAttributes(this, reader)).SelfRepair;
}
if (GetSaveFlag(flags, SetFlag.SkillBonuses))
{
m_SetSkillBonuses = new AosSkillBonuses(this, reader);
}
else
{
m_SetSkillBonuses = new AosSkillBonuses(this);
}
if (GetSaveFlag(flags, SetFlag.Hue))
{
m_SetHue = reader.ReadInt();
}
if (GetSaveFlag(flags, SetFlag.LastEquipped))
{
m_LastEquipped = reader.ReadBool();
}
if (GetSaveFlag(flags, SetFlag.SetEquipped))
{
m_SetEquipped = reader.ReadBool();
}
if (GetSaveFlag(flags, SetFlag.SetSelfRepair))
{
m_SetSelfRepair = reader.ReadEncodedInt();
}
goto case 5;
}
case 9:
case 8:
case 7:
case 6:
case 5:
{
SaveFlag flags = (SaveFlag)reader.ReadInt();
if (GetSaveFlag(flags, SaveFlag.DamageLevel))
{
m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();
if (m_DamageLevel > WeaponDamageLevel.Vanq)
{
m_DamageLevel = WeaponDamageLevel.Ruin;
}
}
//.........这里部分代码省略.........
示例14: Deserialize
//.........这里部分代码省略.........
m_Speed = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxRange ) )
m_MaxRange = reader.ReadInt();
else
m_MaxRange = -1;
if ( GetSaveFlag( flags, SaveFlag.Skill ) )
m_Skill = (SkillName)reader.ReadInt();
else
m_Skill = (SkillName)(-1);
if ( GetSaveFlag( flags, SaveFlag.Type ) )
m_Type = (WeaponType)reader.ReadInt();
else
m_Type = (WeaponType)(-1);
if ( GetSaveFlag( flags, SaveFlag.Animation ) )
m_Animation = (WeaponAnimation)reader.ReadInt();
else
m_Animation = (WeaponAnimation)(-1);
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
m_Resource = (CraftResource)reader.ReadInt();
else
m_Resource = CraftResource.Iron;
if ( GetSaveFlag( flags, SaveFlag.xAttributes ) )
m_AosAttributes = new AosAttributes( this, reader );
else
m_AosAttributes = new AosAttributes( this );
if ( GetSaveFlag( flags, SaveFlag.xWeaponAttributes ) )
m_AosWeaponAttributes = new AosWeaponAttributes( this, reader );
else
m_AosWeaponAttributes = new AosWeaponAttributes( this );
if ( UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile )
{
m_SkillMod = new DefaultSkillMod( AccuracySkill, true, (int)m_AccuracyLevel * 5 );
((Mobile)Parent).AddSkillMod( m_SkillMod );
}
if ( version < 7 && m_AosWeaponAttributes.MageWeapon != 0 )
m_AosWeaponAttributes.MageWeapon = 30 - m_AosWeaponAttributes.MageWeapon;
if ( Core.AOS && m_AosWeaponAttributes.MageWeapon != 0 && m_AosWeaponAttributes.MageWeapon != 30 && Parent is Mobile )
{
m_MageMod = new DefaultSkillMod( SkillName.Magery, true, -30 + m_AosWeaponAttributes.MageWeapon );
((Mobile)Parent).AddSkillMod( m_MageMod );
}
if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
m_PlayerConstructed = true;
if( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
else
m_AosSkillBonuses = new AosSkillBonuses(this);
// mod to randomly add sockets and socketability features to weapons. These settings will yield
// 2% drop rate of socketed/socketable items
// 0.1% chance of 5 sockets
// 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
示例15: BaseWeapon
public BaseWeapon(int itemID)
: base(itemID)
{
Layer = (Layer)ItemData.Quality;
m_Quality = WeaponQuality.Regular;
m_StrReq = -1;
m_DexReq = -1;
m_IntReq = -1;
m_MinDamage = -1;
m_MaxDamage = -1;
m_HitSound = -1;
m_MissSound = -1;
m_Speed = -1;
m_MaxRange = -1;
m_Skill = (SkillName)(-1);
m_Type = (WeaponType)(-1);
m_Animation = (WeaponAnimation)(-1);
m_Hits = m_MaxHits = Utility.RandomMinMax(InitMinHits, InitMaxHits);
m_Resource = CraftResource.Iron;
m_AosAttributes = new AosAttributes(this);
m_AosWeaponAttributes = new AosWeaponAttributes(this);
m_AosSkillBonuses = new AosSkillBonuses(this);
m_AosElementDamages = new AosElementAttributes(this);
#region Stygian Abyss
m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this);
#endregion
#region Mondain's Legacy Sets
m_SetAttributes = new AosAttributes(this);
m_SetSkillBonuses = new AosSkillBonuses(this);
#endregion
m_AosSkillBonuses = new AosSkillBonuses(this);
// Xml Spawner XmlSockets - SOF
// mod to randomly add sockets and socketability features to armor. These settings will yield
// 2% drop rate of socketed/socketable items
// 0.1% chance of 5 sockets
// 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
// 50% chance of 1 socket
// the remainder will be 0 socket (31.4% in this case)
if(XmlSpawner.SocketsEnabled)
XmlSockets.ConfigureRandom(this, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0);
}