本文整理汇总了C#中Mobile.RemoveSkillMod方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.RemoveSkillMod方法的具体用法?C# Mobile.RemoveSkillMod怎么用?C# Mobile.RemoveSkillMod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile.RemoveSkillMod方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveEffect
public static void RemoveEffect( Mobile m )
{
object[] mods = (object[])m_Table[m];
if ( mods != null )
{
m.RemoveStatMod( ((StatMod)mods[0]).Name );
m.RemoveStatMod( ((StatMod)mods[1]).Name );
m.RemoveStatMod( ((StatMod)mods[2]).Name );
m.RemoveSkillMod( (SkillMod)mods[3] );
m.RemoveSkillMod( (SkillMod)mods[4] );
m.RemoveSkillMod( (SkillMod)mods[5] );
}
m_Table.Remove( m );
m.EndAction( typeof( ClericAngelicFaithSpell ) );
m.BodyMod = 0;
}
示例2: EndProtection
public static void EndProtection(Mobile m)
{
if (m_Table.Contains(m))
{
object[] mods = (object[])m_Table[m];
m_Table.Remove(m);
Registry.Remove(m);
m.RemoveResistanceMod((ResistanceMod)mods[0]);
m.RemoveSkillMod((SkillMod)mods[1]);
BuffInfo.RemoveBuff(m, BuffIcon.Protection);
}
}
示例3: Toggle
public static void Toggle(Mobile caster, Mobile target)
{
/* Players under the protection spell effect can no longer have their spells "disrupted" when hit.
* Players under the protection spell have decreased physical resistance stat value (-15 + (Inscription/20),
* a decreased "resisting spells" skill value by -35 + (Inscription/20),
* and a slower casting speed modifier (technically, a negative "faster cast speed") of 2 points.
* The protection spell has an indefinite duration, becoming active when cast, and deactivated when re-cast.
* Reactive Armor, Protection, and Magic Reflection will stay on—even after logging out,
* even after dying—until you “turn them off” by casting them again.
*/
object[] mods = (object[])m_Table[target];
if (mods == null)
{
target.PlaySound(0x1E9);
target.FixedParticles(0x375A, 9, 20, 5016, EffectLayer.Waist);
mods = new object[2]
{
new ResistanceMod(ResistanceType.Physical, -15 + Math.Min((int)(caster.Skills[SkillName.Inscribe].Value / 20), 15)),
new DefaultSkillMod(SkillName.MagicResist, true, -35 + Math.Min((int)(caster.Skills[SkillName.Inscribe].Value / 20), 35))
};
m_Table[target] = mods;
Registry[target] = 100.0;
target.AddResistanceMod((ResistanceMod)mods[0]);
target.AddSkillMod((SkillMod)mods[1]);
int physloss = -15 + (int)(caster.Skills[SkillName.Inscribe].Value / 20);
int resistloss = -35 + (int)(caster.Skills[SkillName.Inscribe].Value / 20);
string args = String.Format("{0}\t{1}", physloss, resistloss);
BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Protection, 1075814, 1075815, args.ToString()));
}
else
{
target.PlaySound(0x1ED);
target.FixedParticles(0x375A, 9, 20, 5016, EffectLayer.Waist);
m_Table.Remove(target);
Registry.Remove(target);
target.RemoveResistanceMod((ResistanceMod)mods[0]);
target.RemoveSkillMod((SkillMod)mods[1]);
BuffInfo.RemoveBuff(target, BuffIcon.Protection);
}
}
示例4: RemoveWard
public static void RemoveWard( Mobile target )
{
object[] mods = (object[]) m_Table[target];
if ( mods != null )
{
m_Table.Remove( target );
Registry.Remove( target );
target.RemoveResistanceMod( (ResistanceMod) mods[0] );
target.RemoveSkillMod( (SkillMod) mods[1] );
BuffInfo.RemoveBuff( target, BuffIcon.Protection );
BuffInfo.RemoveBuff( target, BuffIcon.ArchProtection );
}
}
示例5: Toggle
public static void Toggle( Mobile caster, Mobile target )
{
/* Players under the protection spell effect can no longer have their spells "disrupted" when hit.
* Players under the protection spell have decreased physical resistance stat value,
* a decreased "resisting spells" skill value by -35,
* and a slower casting speed modifier (technically, a negative "faster cast speed") of 2 points.
* The protection spell has an indefinite duration, becoming active when cast, and deactivated when re-cast.
* Reactive Armor, Protection, and Magic Reflection will stay on�even after logging out,
* even after dying�until you �turn them off� by casting them again.
*/
object[] mods = (object[])m_Table[target];
if ( mods == null )
{
target.PlaySound( 0x1E9 );
target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );
mods = new object[2]
{
new ResistanceMod( ResistanceType.Physical, -15 + (int)(caster.Skills[SkillName.Inscribe].Value / 20) ),
new DefaultSkillMod( SkillName.MagicResist, true, -35 + (int)(caster.Skills[SkillName.Inscribe].Value / 20) )
};
m_Table[target] = mods;
Registry[target] = 100.0;
target.AddResistanceMod( (ResistanceMod)mods[0] );
target.AddSkillMod( (SkillMod)mods[1] );
}
else
{
target.PlaySound( 0x1ED );
target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );
m_Table.Remove( target );
Registry.Remove( target );
target.RemoveResistanceMod( (ResistanceMod)mods[0] );
target.RemoveSkillMod( (SkillMod)mods[1] );
}
}
示例6: ClearSkillLoss
public static bool ClearSkillLoss(Mobile mob)
{
try
{
SkillLossContext context;
if (m_SkillLoss.TryGetValue(mob, out context) && context != null)
{
m_SkillLoss.Remove(mob);
List<SkillMod> mods = context.m_SkillMods;
foreach (SkillMod t in mods)
{
mob.RemoveSkillMod(t);
}
context.m_Timer.Stop();
mob.RemoveStatMod("Murder Penalty Str");
mob.RemoveStatMod("Murder Penalty Dex");
mob.RemoveStatMod("Murder Penalty Int");
return true;
}
}
catch
{ }
return false;
}
示例7: RemoveContext
public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
{
m_Table.Remove(m);
if (context.SpeedBoost)
m.Send(SpeedControl.Disable);
SkillMod mod = context.Mod;
if (mod != null)
m.RemoveSkillMod(mod);
mod = context.StealingMod;
if (mod != null)
m.RemoveSkillMod(mod);
if (resetGraphics)
{
m.HueMod = -1;
m.BodyMod = 0;
m.NameMod = null; // vinds retour au nom d'origine lorsque reprise de la forme humaine
}
m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
context.Timer.Stop();
}
示例8: RemoveContext
public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
{
m_Table.Remove(m);
if (context.SpeedBoost)
m.Send(SpeedControl.Disable);
SkillMod mod = context.Mod;
if (mod != null)
m.RemoveSkillMod(mod);
mod = context.StealingMod;
if (mod != null)
m.RemoveSkillMod(mod);
if (resetGraphics)
{
m.HueMod = -1;
m.BodyMod = 0;
}
m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
context.Timer.Stop();
}
示例9: ClearSkillLoss
public static bool ClearSkillLoss(Mobile mob)
{
SkillLossContext context;
if (!m_SkillLoss.TryGetValue(mob, out context))
return false;
m_SkillLoss.Remove(mob);
List<SkillMod> mods = context.m_Mods;
for (int i = 0; i < mods.Count; ++i)
mob.RemoveSkillMod(mods[i]);
context.m_Timer.Stop();
return true;
}
示例10: RemoveBonus
public static void RemoveBonus( Mobile m )
{
BaseArmor armor;
if ( ( armor = m.FindItemOnLayer( Layer.Neck ) as BaseArmor ) is PlateOfHonorGorget )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Helm ) as BaseArmor ) is PlateOfHonorHelm )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is PlateOfHonorLegs )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is PlateOfHonorArms )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is PlateOfHonorGloves )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is PlateOfHonorChest )
RemoveBonus( armor );
if ( m_Bonus.ContainsKey( m ) )
{
List<AttributeMod> mods = m_Bonus[m];
RemoveMods( m, mods );
m_Bonus.Remove( m );
}
SkillMod skillmod = m_Table[m] as SkillMod;
if ( skillmod != null )
{
m.RemoveSkillMod( skillmod );
m_Table.Remove( m );
}
}
示例11: RemoveBonus
public static void RemoveBonus( Mobile m )
{
BaseArmor armor;
if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is DeathsEssenceGloves )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is DeathsEssenceLeggings )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is DeathsEssenceSleeves )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Helm ) as BaseArmor ) is DeathsEssenceHelm )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is DeathsEssenceTunic )
RemoveBonus( armor );
if ( m_Bonus.ContainsKey( m ) )
{
List<AttributeMod> mods = m_Bonus[m];
RemoveMods( m, mods );
m_Bonus.Remove( m );
}
SkillMod skillmod = m_Table[m] as SkillMod;
if ( skillmod != null )
{
m.RemoveSkillMod( skillmod );
m_Table.Remove( m );
}
}
示例12: RemoveBonus
public static void RemoveBonus( Mobile m )
{
BaseArmor armor;
if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is AssassinGloves )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is AssassinLeggings )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is AssassinSleeves )
RemoveBonus( armor );
if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is AssassinTunic )
RemoveBonus( armor );
m.RemoveStatMod( "AssassinSetDex" );
SkillMod skillmod = m_Table[m] as SkillMod;
if ( skillmod != null )
{
m.RemoveSkillMod( skillmod );
m_Table.Remove( m );
}
}
示例13: ClearSkillLoss
public static bool ClearSkillLoss(Mobile mob)
{
SkillLossContext context;
m_SkillLoss.TryGetValue(mob, out context);
if (context != null)
{
m_SkillLoss.Remove(mob);
List<SkillMod> mods = context.m_Mods;
foreach (SkillMod sm in mods)
{
mob.RemoveSkillMod(sm);
}
context.m_Timer.Stop();
return true;
}
return false;
}