本文整理汇总了C#中AosSkillBonuses.AddTo方法的典型用法代码示例。如果您正苦于以下问题:C# AosSkillBonuses.AddTo方法的具体用法?C# AosSkillBonuses.AddTo怎么用?C# AosSkillBonuses.AddTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AosSkillBonuses
的用法示例。
在下文中一共展示了AosSkillBonuses.AddTo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
#region ItemID_Mods
case (3):
{
m_Identified = reader.ReadBool();
goto case 2;
}
#endregion
case 2:
{
m_Resource = (CraftResource)reader.ReadEncodedInt();
m_GemType = (GemType)reader.ReadEncodedInt();
goto case 1;
}
case 1:
{
m_AosAttributes = new AosAttributes( this, reader );
m_AosResistances = new AosElementAttributes( this, reader );
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
if ( Core.AOS && Parent is Mobile )
m_AosSkillBonuses.AddTo( (Mobile)Parent );
int strBonus = m_AosAttributes.BonusStr;
int dexBonus = m_AosAttributes.BonusDex;
int intBonus = m_AosAttributes.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:
{
m_AosAttributes = new AosAttributes( this );
m_AosResistances = new AosElementAttributes( this );
m_AosSkillBonuses = new AosSkillBonuses( this );
break;
}
}
if ( version < 2 )
{
m_Resource = CraftResource.Iron;
m_GemType = GemType.None;
}
}
示例2: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 7:
{
m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this, reader);
goto case 6;
}
case 6:
{
if (version == 6)
m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this);
m_MaxHitPoints = reader.ReadEncodedInt();
m_HitPoints = reader.ReadEncodedInt();
goto case 5;
}
//personal bless deed
case 5:
{
m_BlessedBy = reader.ReadMobile();
goto case 4;
}
#region Mondain's Legacy Sets
case 4:
{
m_LastEquipped = reader.ReadBool();
m_SetEquipped = reader.ReadBool();
m_SetHue = reader.ReadEncodedInt();
m_SetAttributes = new AosAttributes( this, reader );
m_SetSkillBonuses = new AosSkillBonuses( this, reader );
goto case 3;
}
#endregion
#region Mondain's Legacy
case 3:
{
m_Crafter = reader.ReadMobile();
m_Quality = (ArmorQuality) reader.ReadInt();
goto case 2;
}
#endregion
case 2:
{
m_Resource = (CraftResource)reader.ReadEncodedInt();
m_GemType = (GemType)reader.ReadEncodedInt();
goto case 1;
}
case 1:
{
m_AosAttributes = new AosAttributes( this, reader );
m_AosResistances = new AosElementAttributes( this, reader );
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
if ( Core.AOS && Parent is Mobile )
m_AosSkillBonuses.AddTo( (Mobile)Parent );
int strBonus = m_AosAttributes.BonusStr;
int dexBonus = m_AosAttributes.BonusDex;
int intBonus = m_AosAttributes.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:
{
m_AosAttributes = new AosAttributes( this );
m_AosResistances = new AosElementAttributes( this );
m_AosSkillBonuses = new AosSkillBonuses( this );
break;
}
//.........这里部分代码省略.........
示例3: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 6:
{
m_Crafter = reader.ReadMobile();
goto case 5;
}
case 5:
{
m_PlayerConstructed = reader.ReadBool();
goto case 4;
}
case 4:
{
m_Identified = reader.ReadBool();
goto case 3;
}
case 3:
{
m_MaxHitPoints = reader.ReadEncodedInt();
m_HitPoints = reader.ReadEncodedInt();
goto case 2;
}
case 2:
{
m_Resource = (CraftResource)reader.ReadEncodedInt();
m_GemType = (GemType)reader.ReadEncodedInt();
goto case 1;
}
case 1:
{
m_AosAttributes = new AosAttributes(this, reader);
m_AosResistances = new AosElementAttributes(this, reader);
m_AosSkillBonuses = new AosSkillBonuses(this, reader);
if (Core.AOS && Parent is Mobile)
m_AosSkillBonuses.AddTo((Mobile)Parent);
int strBonus = m_AosAttributes.BonusStr;
int dexBonus = m_AosAttributes.BonusDex;
int intBonus = m_AosAttributes.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:
{
m_AosAttributes = new AosAttributes(this);
m_AosResistances = new AosElementAttributes(this);
m_AosSkillBonuses = new AosSkillBonuses(this);
break;
}
}
if (version < 5)
{
m_PlayerConstructed = false; //Assume it wasn't crafted
}
if (version < 4)
{
m_Identified = true; //Assume it was identified
}
if (version < 2)
{
m_Resource = CraftResource.MIron;
m_GemType = GemType.None;
}
}
示例4: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 6: m_OldJewel = reader.ReadBool(); goto case 5;
case 5: m_Seal = reader.ReadString(); goto case 4;
case 4:
case 3:
{
m_Crafter = reader.ReadMobile();
m_CraftersOriginalName = reader.ReadString();
m_Quality = (WeaponQuality)reader.ReadInt();
goto case 2;
}
case 2:
{
m_Resource = (CraftResource)reader.ReadEncodedInt();
m_GemType = (GemType)reader.ReadEncodedInt();
goto case 1;
}
case 1:
{
m_AosAttributes = new AosAttributes( this, reader );
m_AosResistances = new AosElementAttributes( this, reader );
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
if ( Core.AOS && Parent is Mobile )
m_AosSkillBonuses.AddTo( (Mobile)Parent );
int strBonus = m_AosAttributes.BonusStr;
int dexBonus = m_AosAttributes.BonusDex;
int intBonus = m_AosAttributes.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:
{
m_AosAttributes = new AosAttributes( this );
m_AosResistances = new AosElementAttributes( this );
m_AosSkillBonuses = new AosSkillBonuses( this );
break;
}
}
if ( version < 2 )
{
m_Resource = CraftResource.Iron;
m_GemType = GemType.None;
}
if( version < 4 )
Hue = 0;
if (!String.IsNullOrEmpty(m_Seal) && !Seals.Contains(m_Seal))
Seals.Add(m_Seal);
}
示例5: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 2:
m_OriginalHue = reader.ReadInt();
int idx = reader.ReadInt();
m_BaitType = FishInfo.GetTypeFromIndex(idx);
m_HookType = (HookType)reader.ReadInt();
m_HookUses = reader.ReadInt();
m_BaitUses = reader.ReadInt();
m_EnhancedBait = reader.ReadBool();
SaveFlag flags = (SaveFlag)reader.ReadInt();
if (GetSaveFlag(flags, SaveFlag.xAttributes))
m_AosAttributes = new AosAttributes(this, reader);
else
m_AosAttributes = new AosAttributes(this);
if (GetSaveFlag(flags, SaveFlag.SkillBonuses))
m_AosSkillBonuses = new AosSkillBonuses(this, reader);
else
m_AosSkillBonuses = new AosSkillBonuses(this);
break;
case 1:
m_AosAttributes = new AosAttributes(this);
m_AosSkillBonuses = new AosSkillBonuses(this);
break;
}
if (Core.AOS && Parent is Mobile)
m_AosSkillBonuses.AddTo((Mobile)Parent);
int strBonus = m_AosAttributes.BonusStr;
int dexBonus = m_AosAttributes.BonusDex;
int intBonus = m_AosAttributes.BonusInt;
if (this.Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0))
{
Mobile m = (Mobile)this.Parent;
string modName = this.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();
if (m_BaitType != null && m_BaitUses <= 0)
BaitType = null;
if (m_HookType != HookType.None && m_HookUses <= 0)
HookType = HookType.None;
}