本文整理汇总了C#中WeaponAnimation类的典型用法代码示例。如果您正苦于以下问题:C# WeaponAnimation类的具体用法?C# WeaponAnimation怎么用?C# WeaponAnimation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WeaponAnimation类属于命名空间,在下文中一共展示了WeaponAnimation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GastroFork
public GastroFork()
{
Name = "Gastro Fork";
Hue = 2075;
Attributes.WeaponDamage = 30;
Attributes.WeaponSpeed = 25;
WeaponAttributes.SelfRepair = 1;
m_GastroAnimation = WeaponAnimation.Slash1H;
// WeaponAttributes.HitLeechMana = 40;
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:10,代码来源:GastroFork.cs
示例2: CheckHit
public override bool CheckHit( Mobile attacker, Mobile defender )
{
switch( m_GastroAnimation )
{
case WeaponAnimation.Slash1H: m_GastroAnimation = WeaponAnimation.Pierce1H; break;
case WeaponAnimation.Pierce1H: m_GastroAnimation = WeaponAnimation.Bash1H; break;
case WeaponAnimation.Bash1H: m_GastroAnimation = WeaponAnimation.Slash1H; break;
}
if ( base.CheckHit( attacker, defender ) )
return true;
else if ( m_GastroAnimation == WeaponAnimation.Pierce1H )
return true;
else
return false;
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:16,代码来源:GastroFork.cs
示例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);
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 );
}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:38,代码来源:BaseWeapon.cs
示例4: Deserialize
//.........这里部分代码省略.........
m_MaxDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.HitSound ) )
m_HitSound = reader.ReadInt();
else
m_HitSound = -1;
if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
if ( GetSaveFlag( flags, SaveFlag.Speed ) )
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;
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 );
}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:67,代码来源:BaseWeapon.cs
示例5: AlignRight
private void AlignRight(WeaponAnimation anim, int width, int height)
{
if (LeftHand &&
(weaponState == WeaponStates.Idle || weaponState == WeaponStates.StrikeDown || weaponState == WeaponStates.StrikeUp))
{
// Flip alignment
AlignLeft(anim, width, height);
return;
}
weaponPosition = new Rect(
Screen.width * (1f - anim.Offset) - width * weaponScaleX,
Screen.height - height * weaponScaleY,
width * weaponScaleX,
height * weaponScaleY);
}
开发者ID:my0pic,项目名称:daggerfall-unity,代码行数:16,代码来源:FPSWeapon.cs
示例6: Deserialize
//.........这里部分代码省略.........
m_HitSound = -1;
if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
if ( GetSaveFlag( flags, SaveFlag.Speed ) )
{
if ( version < 9 )
m_Speed = reader.ReadInt();
else
m_Speed = reader.ReadFloat();
}
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;
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 ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
m_PlayerConstructed = true;
if( GetSaveFlag( flags, SaveFlag.Slayer2 ) )
m_Slayer2 = (SlayerName)reader.ReadInt();
if( GetSaveFlag( flags, SaveFlag.EngravedText ) )
m_EngravedText = reader.ReadString();
break;
}
case 4:
{
m_Slayer = (SlayerName)reader.ReadInt();
goto case 3;
}
case 3:
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:67,代码来源:BaseWeapon.cs
示例7: Weapon
public Weapon(String name, WeaponAnimation animation)
{
m_name = name;
m_animation = animation;
}
开发者ID:ArchbishopDave,项目名称:TestProject,代码行数:5,代码来源:Weapon.cs
示例8: AlignLeft
private void AlignLeft(WeaponAnimation anim, int width, int height)
{
weaponPosition = new Rect(
Screen.width * anim.Offset,
Screen.height - height * weaponScaleY,
width * weaponScaleX,
height * weaponScaleY);
}
开发者ID:my0pic,项目名称:daggerfall-unity,代码行数:8,代码来源:FPSWeapon.cs
示例9: Deserialize
//.........这里部分代码省略.........
m_HitSound = -1;
if( GetSaveFlag(flags, SaveFlag.MissSound) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
if( GetSaveFlag(flags, SaveFlag.Speed) )
{
if( version < 9 )
m_Speed = reader.ReadInt();
else
m_Speed = reader.ReadFloat();
}
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;
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);
}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:67,代码来源:BaseWeapon.cs
示例10: 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);
}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:67,代码来源:BaseWeapon.cs
示例11: 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_DamageMin = -1;
m_DamageMax = -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_DiceDamage = new[] {-1, -1, -1};
m_Hits = m_MaxHits = Utility.RandomMinMax(InitMinHits, InitMaxHits);
m_Resource = CraftResource.Iron;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:25,代码来源:BaseWeapon.cs
示例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_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 );
}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:39,代码来源:BaseWeapon.cs
示例13: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 11:
{
OriginalItemID = reader.ReadInt();
OriginalHue = reader.ReadInt();
OriginalAnimation = (WeaponAnimation)reader.ReadInt();
goto case 10;
}
case 10:
{
var flags2 = (SaveFlag2) reader.ReadInt();
if (GetSaveFlag(flags2, SaveFlag2.Aesthetic)) // Alan Mod
{
m_Aesthetic = true;
}
m_DiceDamage = new[] {-1, -1, -1};
if (GetSaveFlag(flags2, SaveFlag2.DiceDamage))
{
m_DiceDamage[0] = reader.ReadEncodedInt();
m_DiceDamage[1] = reader.ReadEncodedInt();
m_DiceDamage[2] = reader.ReadEncodedInt();
}
goto case 9;
}
case 9:
case 8:
case 7:
case 6:
case 5:
{
var flags = (SaveFlag) reader.ReadInt();
if (GetSaveFlag(flags, SaveFlag.DamageLevel))
{
m_DamageLevel = (WeaponDamageLevel) reader.ReadInt();
if (m_DamageLevel > WeaponDamageLevel.Vanq)
{
m_DamageLevel = WeaponDamageLevel.Ruin;
}
}
if (GetSaveFlag(flags, SaveFlag.AccuracyLevel))
{
m_AccuracyLevel = (WeaponAccuracyLevel) reader.ReadInt();
if (m_AccuracyLevel > WeaponAccuracyLevel.Supremely)
{
m_AccuracyLevel = WeaponAccuracyLevel.Accurate;
}
}
if (GetSaveFlag(flags, SaveFlag.DurabilityLevel))
{
m_DurabilityLevel = (WeaponDurabilityLevel) reader.ReadInt();
if (m_DurabilityLevel > WeaponDurabilityLevel.Indestructible)
{
m_DurabilityLevel = WeaponDurabilityLevel.Durable;
}
}
if (GetSaveFlag(flags, SaveFlag.Quality))
{
m_Quality = (WeaponQuality) reader.ReadInt();
}
else
{
m_Quality = WeaponQuality.Regular;
}
if (GetSaveFlag(flags, SaveFlag.Hits))
{
m_Hits = reader.ReadInt();
}
if (GetSaveFlag(flags, SaveFlag.MaxHits))
{
m_MaxHits = reader.ReadInt();
}
if (GetSaveFlag(flags, SaveFlag.Slayer))
{
m_Slayer = (SlayerName) reader.ReadInt();
}
if (GetSaveFlag(flags, SaveFlag.Poison))
{
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:BaseWeapon.cs
示例14: Deserialize
//.........这里部分代码省略.........
m_MaxDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.HitSound ) )
m_HitSound = reader.ReadInt();
else
m_HitSound = -1;
if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
if ( GetSaveFlag( flags, SaveFlag.Speed ) )
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;
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 );
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:67,代码来源:BaseWeapon.cs
示例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_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;
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:43,代码来源:BaseWeapon.cs
示例16: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.GetVersion();
TransmuteID = reader.ReadInt();
TransmuteHue = reader.ReadInt();
TransmuteAnimation = (WeaponAnimation) reader.ReadInt();
TransmuteName = reader.ReadString();
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:11,代码来源:TransmuteTalisman.cs
示例17: addNewWeaponTemplate
public static void addNewWeaponTemplate(String name, Color color, WeaponAnimation tex, Dictionary<String, int> stats)
{
if (s_weaponTemplates == null)
s_weaponTemplates = new Dictionary<string, Weapon>();
Weapon w = new Weapon(name, tex);
w.m_color = color;
w.m_stats = stats;
w.m_swingData = new List<Dictionary<String,float>>();
s_weaponTemplates.Add(name, w);
}
开发者ID:ArchbishopDave,项目名称:TestProject,代码行数:10,代码来源:Weapon.cs
示例18: Deserialize
//.........这里部分代码省略.........
m_MaxDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.HitSound ) )
m_HitSound = reader.ReadInt();
else
m_HitSound = -1;
if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
if ( GetSaveFlag( flags, SaveFlag.Speed ) )
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 )
开发者ID:zerodowned,项目名称:angelisland,代码行数:67,代码来源:BaseWeapon.cs
示例19: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_GastroAnimation = WeaponAnimation.Slash1H;
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:6,代码来源:GastroFork.cs
示例20: 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);
}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:27,代码来源:BaseWeapon.cs
注:本文中的WeaponAnimation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论