本文整理汇总了C#中SlayerName类的典型用法代码示例。如果您正苦于以下问题:C# SlayerName类的具体用法?C# SlayerName怎么用?C# SlayerName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SlayerName类属于命名空间,在下文中一共展示了SlayerName类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
// version 0
m_Slayer = (SlayerName)reader.ReadInt();
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:8,代码来源:XmlSlayer.cs
示例2: GetEntryByName
public static SlayerEntry GetEntryByName( SlayerName name )
{
int v = (int)name;
if ( v >= 0 && v < m_TotalEntries.Length )
return m_TotalEntries[v];
return null;
}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:9,代码来源:SlayerGroup.cs
示例3: XmlSlayer
public XmlSlayer(string slayer)
{
try
{
m_Slayer = (SlayerName)Enum.Parse(typeof(SlayerName), slayer, true);
}
catch
{
m_Slayer = SlayerName.None;
}
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:11,代码来源:XmlSlayer.cs
示例4: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 0:
{
m_Slayer = (SlayerName)reader.ReadInt();
break;
}
}
}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:15,代码来源:SlayerRune.cs
示例5: SlayerEntry
public SlayerEntry(SlayerName name, params Type[] types)
{
Name = name;
Types = types;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:5,代码来源:SlayerEntry.cs
示例6: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 3:
{
m_ReplenishesCharges = reader.ReadBool();
if( m_ReplenishesCharges )
m_LastReplenished = reader.ReadDateTime();
goto case 2;
}
case 2:
{
m_Crafter = reader.ReadMobile();
m_Quality = (InstrumentQuality)reader.ReadEncodedInt();
m_Slayer = (SlayerName)reader.ReadEncodedInt();
m_Slayer2 = (SlayerName)reader.ReadEncodedInt();
UsesRemaining = reader.ReadEncodedInt();
m_WellSound = reader.ReadEncodedInt();
m_BadlySound = reader.ReadEncodedInt();
break;
}
case 1:
{
m_Crafter = reader.ReadMobile();
m_Quality = (InstrumentQuality)reader.ReadEncodedInt();
m_Slayer = (SlayerName)reader.ReadEncodedInt();
UsesRemaining = reader.ReadEncodedInt();
m_WellSound = reader.ReadEncodedInt();
m_BadlySound = reader.ReadEncodedInt();
break;
}
case 0:
{
m_WellSound = reader.ReadInt();
m_BadlySound = reader.ReadInt();
UsesRemaining = Utility.RandomMinMax( InitMinUses, InitMaxUses );
break;
}
}
CheckReplenishUses();
}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:58,代码来源:BaseInstrument.cs
示例7: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch( version )
{
case 11:
case 10:
case 9:
case 8:
{
if( version <= 9 )
{
reader.ReadMobile();
reader.ReadString();
reader.ReadMobile();
}
goto case 7;
}
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;
}
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) )
m_Poison = Poison.Deserialize(reader);
if( GetSaveFlag(flags, SaveFlag.PoisonCharges) )
m_PoisonCharges = reader.ReadInt();
if( GetSaveFlag(flags, SaveFlag.Crafter) )
m_Crafter = reader.ReadMobile();
if( GetSaveFlag(flags, SaveFlag.Identified) )
{
if( version <= 10 )
m_Identified = true;
else
m_Identified = reader.ReadBool();
}
if( GetSaveFlag(flags, SaveFlag.StrReq) )
m_StrReq = reader.ReadInt();
else
m_StrReq = -1;
if( GetSaveFlag(flags, SaveFlag.DexReq) )
m_DexReq = reader.ReadInt();
else
m_DexReq = -1;
if( GetSaveFlag(flags, SaveFlag.IntReq) )
m_IntReq = reader.ReadInt();
else
m_IntReq = -1;
if( GetSaveFlag(flags, SaveFlag.MinDamage) )
m_MinDamage = reader.ReadInt();
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:hubroot,代码行数:101,代码来源:BaseWeapon.cs
示例8: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
SaveFlag flags = (SaveFlag)reader.ReadInt();
switch ( version )
{
case 8:
{
// turnned off AOS attributes
goto case 7;
}
case 7:
{
goto case 6;
}
case 6:
{
goto case 5;
}
case 5:
{
if ( GetSaveFlag( flags, SaveFlag.DamageLevel ) )
m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.AccuracyLevel ) )
m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.DurabilityLevel ) )
m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();
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 ) )
m_Poison = Poison.Deserialize( reader );
if ( GetSaveFlag( flags, SaveFlag.PoisonCharges ) )
m_PoisonCharges = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
m_Crafter = reader.ReadMobile();
if ( GetSaveFlag( flags, SaveFlag.Identified ) )
m_Identified = ( version >= 6 || reader.ReadBool() );
if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
m_StrReq = reader.ReadInt();
else
m_StrReq = -1;
if ( GetSaveFlag( flags, SaveFlag.DexReq ) )
m_DexReq = reader.ReadInt();
else
m_DexReq = -1;
if ( GetSaveFlag( flags, SaveFlag.IntReq ) )
m_IntReq = reader.ReadInt();
else
m_IntReq = -1;
if ( GetSaveFlag( flags, SaveFlag.MinDamage ) )
m_MinDamage = reader.ReadInt();
else
m_MinDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxDamage ) )
m_MaxDamage = reader.ReadInt();
else
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 ) )
//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:BaseWeapon.cs
示例9: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
_Quality = (InstrumentQuality)reader.ReadInt();
_UsesRemaining = reader.ReadInt();
_Slayer = (SlayerName)reader.ReadInt();
_Slayer2 = (SlayerName)reader.ReadInt();
_Crafter = reader.ReadMobile();
}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:12,代码来源:ItemListEntries.cs
示例10: CheckSlays
private static bool CheckSlays( SlayerName slayer, Mobile target )
{
if ( slayer == SlayerName.None )
return false;
SlayerEntry entry = SlayerGroup.GetEntryByName( slayer );
return entry != null && entry.Slays( target );
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:9,代码来源:BaseInstrument.cs
示例11: HasSlayer
private static bool HasSlayer(Item item, string name, SlayerName attr)
{
var pi = item.GetType().GetProperty(name, TypeOfSlayerName);
if (pi == null)
{
return false;
}
return ((SlayerName)pi.GetValue(item, null) == attr);
}
开发者ID:Vita-Nex,项目名称:Core,代码行数:11,代码来源:AttributesExt.cs
示例12: GetSlayerWeight
private static double GetSlayerWeight(SlayerName attr)
{
if (attr == SlayerName.None)
{
return 0;
}
return IsSuper(attr) ? 1.3 : 1.1;
}
开发者ID:Vita-Nex,项目名称:Core,代码行数:9,代码来源:AttributesExt.cs
示例13: GetModForAttribute
public static int GetModForAttribute(SlayerName attr)
{
foreach (KeyValuePair<int, ImbuingDefinition> kvp in m_Table)
{
int mod = kvp.Key;
ImbuingDefinition def = kvp.Value;
if (def.Attribute is SlayerName && (SlayerName)def.Attribute == attr)
return mod;
}
return -1;
}
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:13,代码来源:Imbuing.cs
示例14: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 27:
case 26: m_BetaNerf = reader.ReadBool(); goto case 25;
case 25: m_Components = reader.ReadStrongItemList(); goto case 24;
case 24: m_NewCrafting = reader.ReadBool(); m_QualityDefense = reader.ReadInt(); goto case 23;
case 23: m_HasHalo = reader.ReadBool(); goto case 22;
case 22:
case 21:
case 20:
{
m_QualityDamage = reader.ReadInt();
m_QualitySpeed = reader.ReadInt();
m_QualityAccuracy = reader.ReadInt();
goto case 19;
}
case 19:
case 18:
case 17:
case 16:
case 15:
case 14:
case 13:
case 12:
case 11:
case 10:
{
m_CraftersOriginalName = reader.ReadString();
goto case 9;
}
case 9:
{
m_Engraved1 = reader.ReadString();
m_Engraved2 = reader.ReadString();
m_Engraved3 = reader.ReadString();
goto case 5;
}
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;
}
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 ) )
m_Poison = Poison.Deserialize( reader );
if ( GetSaveFlag( flags, SaveFlag.PoisonCharges ) )
m_PoisonCharges = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
m_Crafter = reader.ReadMobile();
if ( GetSaveFlag( flags, SaveFlag.Identified ) )
m_Identified = ( version >= 6 || reader.ReadBool() );
//.........这里部分代码省略.........
开发者ID:justdanofficial,项目名称:khaeros,代码行数:101,代码来源:BaseWeapon.cs
示例15: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 5:
{
m_Exceptional = reader.ReadBool();
m_Crafter = reader.ReadMobile();
goto case 4;
}
case 4:
{
m_Slayer = (SlayerName) reader.ReadEncodedInt();
m_Slayer2 = (SlayerName) reader.ReadEncodedInt();
m_UsesRemaining = reader.ReadEncodedInt();
m_WellSound = reader.ReadEncodedInt();
m_BadlySound = reader.ReadEncodedInt();
break;
}
}
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:29,代码来源:BaseInstrument.cs
示例16: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 4:
{
m_MaxHitPoints = reader.ReadEncodedInt();
m_HitPoints = reader.ReadEncodedInt();
goto case 3;
}
case 3:
{
m_Slayer = (SlayerName) reader.ReadInt();
m_Slayer2 = (SlayerName) reader.ReadInt();
goto case 2;
}
case 2:
{
m_Ownable = (bool) reader.ReadBool();
m_Owner = (Mobile) reader.ReadMobile();
m_CraftBonusRegular = (CraftList) reader.ReadInt();
m_CraftBonusRegularValue = reader.ReadInt();
m_CraftBonusExcep = (CraftList) reader.ReadInt();
m_CraftBonusExcepValue = reader.ReadInt();
m_ProtectionEntry = (NPC_Name) reader.ReadInt();
m_ProtectionValue = reader.ReadInt();
m_KillersEntry = (NPC_Name) reader.ReadInt();
m_KillersValue = reader.ReadInt();
m_TalisSlayer = (TalisSlayerName) reader.ReadInt();
m_TalismanType = (TalismanType) reader.ReadInt();
m_Charges = reader.ReadInt();
goto case 1;
}
case 1:
{
m_MagicalAttributes = new MagicalAttributes( this, reader );
m_AosResistances = new ElementAttributes( this, reader );
m_SkillBonuses = new SkillBonuses( this, reader );
if ( Parent is Mobile )
{
//-------- Charged Time Left -----------
m_isequiped = true;
InvalidateProperties();
//------ FIN Charged Time Left ---------
m_SkillBonuses.AddTo( (Mobile) Parent );
}
int strBonus = m_MagicalAttributes.BonusStr;
int dexBonus = m_MagicalAttributes.BonusDex;
int intBonus = m_MagicalAttributes.BonusInt;
if ( Parent is Mobile && ( strBonus != 0 || dexBonus != 0 || intBonus != 0 ) )
{
Mobile m = (Mobile) Parent;
string modName = Serial.ToString();
if ( strBonus != 0 )
m.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );
if ( dexBonus != 0 )
m.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero ) );
if ( intBonus != 0 )
m.AddStatMod( new StatMod( StatType.Int, modName + "Int", intBonus, TimeSpan.Zero ) );
}
if ( Parent is Mobile )
( (Mobile) Parent ).CheckStatTimers();
break;
}
case 0:
{
if ( Parent is Mobile )
{
//-------- Charged Time Left -----------
m_isequiped = true;
InvalidateProperties();
//------ FIN Charged Time Left ---------
m_SkillBonuses.AddTo( (Mobile) Parent );
}
m_MagicalAttributes = new MagicalAttributes( this );
m_AosResistances = new ElementAttributes( this );
m_SkillBonuses = new SkillBonuses( this );
break;
}
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:BaseTalisman.cs
示例17: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
if ( !( this is TomeOfEnlightenment || this is TomeOfLostKnowledge || this is FactionTomeOfLostKnowledge ) )
LootType = LootType.Blessed;
int version = reader.ReadInt();
switch ( version )
{
case 7:
{
m_Exceptional = reader.ReadBool();
m_Crafter = reader.ReadMobile();
goto case 6;
}
case 6:
case 5:
{
m_Slayer2 = (SlayerName) reader.ReadEncodedInt();
goto case 4;
}
case 4:
{
m_EngraveString = reader.ReadString();
goto case 3;
}
case 3:
case 2:
{
m_Slayer = (SlayerName) reader.ReadEncodedInt();
goto case 1;
}
case 1:
{
m_MagicalAttributes = new MagicalAttributes( this, reader );
m_SkillBonuses = new SkillBonuses( this, reader );
if ( this is ScrappersCompendium )
{
Attributes.SpellDamage = 25;
Attributes.LowerManaCost = 10;
}
else if ( this is ClaininsSpellbook )
{
Attributes.LowerRegCost = 15;
Attributes.RegenMana = 3;
}
else if ( this is TomeOfEnlightenment )
{
Attributes.BonusInt = 5;
Attributes.SpellDamage = 10;
Attributes.CastSpeed = 1;
}
else if ( this is TomeOfLostKnowledge )
{
SkillBonuses.SetValues( 0, SkillName.Magery, 15.0 );
Attributes.BonusInt = 8;
Attributes.SpellDamage = 15;
Attributes.LowerManaCost = 15;
}
else if ( this is FactionTomeOfLostKnowledge )
{
SkillBonuses.SetValues( 0, SkillName.Magery, 15.0 );
Attributes.BonusInt = 8;
Attributes.SpellDamage = 15;
Attributes.LowerManaCost = 15;
Attributes.RegenMana = 3;
}
else if ( this is ConjurersGrimoire )
{
SkillBonuses.SetValues( 0, SkillName.Magery, 15.0 );
Attributes.BonusInt = 8;
Attributes.SpellDamage = 15;
Attributes.LowerManaCost = 10;
}
else if ( this is FallenMysticsSpellbook )
{
Attributes.SpellDamage = 10;
}
else
{
FixAttributes();
}
goto case 0;
}
case 0:
{
m_Content = reader.ReadULong();
m_Count = reader.ReadInt();
break;
}
}
if ( m_MagicalAttributes == null )
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:Spellbook.cs
示例18: OnCraft
public bool OnCraft( bool exceptional, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
{
int magery = from.Skills.Magery.BaseFixedPoint;
if ( magery >= 800 )
{
int[] propertyCounts;
int minIntensity;
int maxIntensity;
if ( magery >= 1000 )
{
propertyCounts = m_GrandPropertyCounts;
minIntensity = 55;
maxIntensity = 75;
}
else if ( magery >= 900 )
{
propertyCounts = m_MasterPropertyCounts;
minIntensity = 25;
maxIntensity = 45;
}
else
{
propertyCounts = m_AdeptPropertyCounts;
minIntensity = 0;
maxIntensity = 15;
}
int propertyCount = propertyCounts[Utility.Random( propertyCounts.Length )];
BaseRunicTool.ApplyAttributesTo( this, true, 0, propertyCount, minIntensity, maxIntensity );
SlayerName slayer = SlayerName.None;
if ( 0.05 > Utility.RandomDouble() )
slayer = BaseRunicTool.GetRandomSlayer();
m_Slayer = slayer;
if ( this is ScrappersCompendium )
{
this.Attributes.SpellDamage = 25;
if ( this.Attributes.CastRecovery > 3 )
this.Attributes.CastRecovery = 3;
this.Attributes.CastSpeed = 1;
if ( this.Attributes.LowerManaCost < 10 )
this.Attributes.LowerManaCost = 10;
}
}
if ( makersMark )
Crafter = from;
Exceptional = exceptional;
return exceptional;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:61,代码来源:Spellbook.cs
示例19: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
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;
}
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 ) )
m_Poison = Poison.Deserialize( reader );
if ( GetSaveFlag( flags, SaveFlag.PoisonCharges ) )
m_PoisonCharges = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
m_Crafter = reader.ReadMobile();
if ( GetSaveFlag( flags, SaveFlag.Identified ) )
m_Identified = ( version >= 6 || reader.ReadBool() );
if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
m_StrReq = reader.ReadInt();
else
m_StrReq = -1;
if ( GetSaveFlag( flags, SaveFlag.DexReq ) )
m_DexReq = reader.ReadInt();
else
m_DexReq = -1;
if ( GetSaveFlag( flags, SaveFlag.IntReq ) )
m_IntReq = reader.ReadInt();
else
m_IntReq = -1;
if ( GetSaveFlag( flags, SaveFlag.MinDamage ) )
m_MinDamage = reader.ReadInt();
else
m_MinDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxDamage ) )
m_MaxDamage = reader.ReadInt();
else
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;
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:101,代码来源:BaseWeapon.cs
示例20: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
{
m_Crafter = reader.ReadMobile();
m_Quality = (InstrumentQuality)reader.ReadEncodedInt();
m_Slayer = (SlayerName)reader.ReadEncodedInt();
m_Slayer2 = (SlayerName)reader.ReadEncodedInt();
m_UsesRemaining = reader.ReadEncodedInt();
m_WellSound = reader.ReadEncodedInt();
m_BadlySound = reader.ReadEncodedInt();
break;
}
case 1:
{
m_Crafter = reader.ReadMobile();
m_Quality = (InstrumentQuality)reader.ReadEncodedInt();
m_Slayer = (SlayerName)reader.ReadEncodedInt();
m_UsesRemaining = reader.ReadEncodedInt();
m_WellSound = reader.ReadEncodedInt();
m_BadlySound = reader.ReadEncodedInt();
break;
}
case 0:
{
m_WellSound = reader.ReadInt();
m_BadlySound = reader.ReadInt();
m_UsesRemaining = Utility.RandomMinMax( InitMinUses, InitMaxUses );
break;
}
}
}
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:47,代码来源:BaseInstrument.cs
注:本文中的SlayerName类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论