本文整理汇总了C#中Mobile.RemoveResistanceMod方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.RemoveResistanceMod方法的具体用法?C# Mobile.RemoveResistanceMod怎么用?C# Mobile.RemoveResistanceMod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile.RemoveResistanceMod方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveWard
public static void RemoveWard( Mobile targ )
{
ResistanceMod[] mods = (ResistanceMod[]) m_Table[targ];
if ( mods != null )
{
m_Table.Remove( targ );
for ( int i = 0; i < mods.Length; ++i )
targ.RemoveResistanceMod( mods[i] );
BuffInfo.RemoveBuff( targ, BuffIcon.ReactiveArmor );
}
}
示例2: RemoveEffects
public static void RemoveEffects( Mobile m )
{
ArrayList mods = (ArrayList) m_Table[m];
for ( int i = 0; i < mods.Count; ++i )
m.RemoveResistanceMod( (ResistanceMod) mods[i] );
m.BodyMod = 0;
m.HueMod = -1;
m_Table.Remove( m );
BuffInfo.RemoveBuff( m, BuffIcon.StoneForm );
}
示例3: RemoveEffects
public static void RemoveEffects( Mobile m )
{
if ( m_Table.ContainsKey( m ) )
{
ArrayList mods = (ArrayList) m_Table[m];
for ( int i = 0; i < mods.Count; ++i )
m.RemoveResistanceMod( (ResistanceMod) mods[i] );
m.BodyMod = 0;
m.HueMod = -1;
m_Table.Remove( m );
}
}
示例4: 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);
}
}
示例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 (-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);
}
}
示例6: EndArmor
public static void EndArmor(Mobile m)
{
if (m_Table.Contains(m))
{
ResistanceMod[] mods = (ResistanceMod[])m_Table[m];
if (mods != null)
{
for (int i = 0; i < mods.Length; ++i)
m.RemoveResistanceMod(mods[i]);
}
m_Table.Remove(m);
BuffInfo.RemoveBuff(m, BuffIcon.ReactiveArmor);
}
}
示例7: 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 );
}
}
示例8: RemoveEffect
public static void RemoveEffect(Mobile m)
{
if (!m_Table.ContainsKey(m))
return;
List<ResistanceMod> mods = m_Table[m];
for (int i = 0; i < m_Table[m].Count; i++)
{
m.RemoveResistanceMod(mods[i]);
}
m_Table.Remove(m);
m.EndAction(typeof(StoneFormSpell));
m.PlaySound(0x201);
m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
m.BodyMod = 0;
}
示例9: RemoveEffect
public override void RemoveEffect(Mobile m)
{
ResistanceMod[] mods = (ResistanceMod[])m_Table[m];
if (mods != null)
{
m_Table.Remove(m);
m_Table[m] = mods;
for (int i = 0; i < mods.Length; ++i)
m.RemoveResistanceMod(mods[i]);
m.PlaySound(0x65B);
m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
m.Delta(MobileDelta.WeaponDamage);
m.EndAction(typeof(StoneFormSpell));
}
}
示例10: 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] );
}
}
示例11: RemoveEffect
public static void RemoveEffect(Mobile m)
{
if (!m_Table.ContainsKey(m))
return;
var mods = m_Table[m];
for (var i = 0; i < m_Table[m].Count; i++)
{
m.RemoveResistanceMod(mods[i]);
}
Enhancement.SetValue(m, AosAttribute.CastSpeed, 2, "Stone Form");
Enhancement.SetValue(m, AosAttribute.WeaponSpeed, 10, "Stone Form");
m_Table.Remove(m);
m.EndAction(typeof (StoneFormSpell));
m.PlaySound(0x201);
m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
m.BodyMod = 0;
}
示例12: RemoveContext
public static void RemoveContext(Mobile m, TransformContext context, bool resetGraphics)
{
if (m_Table.ContainsKey(m))
{
m_Table.Remove(m);
List<ResistanceMod> mods = context.Mods;
for (int i = 0; i < mods.Count; ++i)
m.RemoveResistanceMod(mods[i]);
if (resetGraphics)
{
m.HueMod = -1;
m.BodyMod = 0;
}
context.Timer.Stop();
context.Spell.RemoveEffect(m);
}
}
示例13: RemoveMods
private static void RemoveMods( Mobile m, List<object> mods )
{
for ( int i = 0; i < mods.Count; i++ )
{
object mod = mods[i];
if ( mod is AttributeMod )
m.RemoveAttributeMod( (AttributeMod) mod );
else if ( mod is ResistanceMod )
m.RemoveResistanceMod( (ResistanceMod) mod );
}
}
示例14: RemoveMods
private static void RemoveMods( Mobile m, List<object> mods )
{
for ( int i = 0; i < mods.Count; i++ )
{
object mod = mods[i];
m.RemoveResistanceMod( (ResistanceMod) mod );
}
}