本文整理汇总了C#中Server.Mobile.RemoveStatMod方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.RemoveStatMod方法的具体用法?C# Mobile.RemoveStatMod怎么用?C# Mobile.RemoveStatMod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.RemoveStatMod方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetValue
public static void SetValue( Mobile m, AosAttribute att, int value, string title )
{
if ( !EnhancementList.ContainsKey( m ) )
AddMobile( m, title );
if ( att == AosAttribute.BonusStr )
{
m.RemoveStatMod( "MagicalEnhancementStr" );
m.AddStatMod( new StatMod( StatType.Str, "MagicalEnhancementStr", value, TimeSpan.Zero ) );
}
else if ( att == AosAttribute.BonusDex )
{
m.RemoveStatMod( "MagicalEnhancementDex" );
m.AddStatMod( new StatMod( StatType.Dex, "MagicalEnhancementDex", value, TimeSpan.Zero ) );
}
else if ( att == AosAttribute.BonusInt )
{
m.RemoveStatMod( "MagicalEnhancementInt" );
m.AddStatMod( new StatMod( StatType.Int, "MagicalEnhancementInt", value, TimeSpan.Zero ) );
}
if ( title != EnhancementList[m].Title )
EnhancementList[m].Attributes[att] = value;
else
EnhancementList[m].Attributes[att] += value;
}
示例2: Use
public override bool Use( Mobile from ) {
if ( from.BeginAction( typeof( ClarityPotion ) ) ) {
int amount = Utility.Dice( 3, 3, 3 );
int time = Utility.RandomMinMax( 5, 30 );
from.PlaySound( 0x2D6 );
if ( from.Body.IsHuman ) {
from.Animate( 34, 5, 1, true, false, 0 );
}
from.FixedParticles( 0x375A, 10, 15, 5011, EffectLayer.Head );
from.PlaySound( 0x1EB );
StatMod mod = from.GetStatMod( "Concussion" );
if ( mod != null ) {
from.RemoveStatMod( "Concussion" );
from.Mana -= mod.Offset;
}
from.PlaySound( 0x1EE );
from.AddStatMod( new StatMod( StatType.Int, "clarity-potion", amount, TimeSpan.FromMinutes( time ) ) );
Timer.DelayCall( TimeSpan.FromMinutes( time ), delegate() {
from.EndAction( typeof( ClarityPotion ) );
} );
return true;
}
return false;
}
示例3: Eat
public override bool Eat( Mobile from )
{
if ( base.Eat( from ) )
{
from.PlaySound( 0xF6 );
from.PlaySound( 0x1F7 );
from.FixedParticles( 0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head );
IEntity mfrom = new Entity( Serial.Zero, new Point3D( from.X, from.Y, from.Z - 10 ), from.Map );
IEntity mto = new Entity( Serial.Zero, new Point3D( from.X, from.Y, from.Z + 50 ), from.Map );
Effects.SendMovingParticles( mfrom, mto, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );
StatMod mod;
mod = from.GetStatMod( "[Magic] Str Offset" );
if ( mod != null && mod.Offset < 0 )
from.RemoveStatMod( "[Magic] Str Offset" );
mod = from.GetStatMod( "[Magic] Dex Offset" );
if ( mod != null && mod.Offset < 0 )
from.RemoveStatMod( "[Magic] Dex Offset" );
mod = from.GetStatMod( "[Magic] Int Offset" );
if ( mod != null && mod.Offset < 0 )
from.RemoveStatMod( "[Magic] Int Offset" );
from.Paralyzed = false;
from.Sleep = false; // SA Mysticism Edit
EvilOmenSpell.TryEndEffect( from );
StrangleSpell.RemoveCurse( from );
CorpseSkinSpell.RemoveCurse( from );
CurseSpell.RemoveEffect( from );
BuffInfo.RemoveBuff( from, BuffIcon.Clumsy );
BuffInfo.RemoveBuff( from, BuffIcon.FeebleMind );
BuffInfo.RemoveBuff( from, BuffIcon.Weaken );
BuffInfo.RemoveBuff( from, BuffIcon.MassCurse );
return true;
}
return false;
}
示例4: RemoveEffect
public static void RemoveEffect(Mobile m)
{
if (m_Table.ContainsKey(m))
{
object[] mods = (object[])m_Table[m];
if (mods != null)
{
m.RemoveStatMod(((StatMod)mods[0]).Name);
m.RemoveStatMod(((StatMod)mods[1]).Name);
m.RemoveSkillMod((SkillMod)mods[2]);
m.RemoveSkillMod((SkillMod)mods[3]);
m.RemoveSkillMod((SkillMod)mods[4]);
m.RemoveSkillMod((SkillMod)mods[5]);
m.RemoveSkillMod((SkillMod)mods[6]);
}
m_Table.Remove(m);
m.EndAction(typeof(RogueIntimidationSpell));
}
}
示例5: RemoveEffect
public static void RemoveEffect(Mobile m)
{
if (m_Table.ContainsKey(m))
{
object[] mods = m_Table[m];
if (mods != null)
{
m.RemoveStatMod(((StatMod)mods[0]).Name);
m.RemoveSkillMod((SkillMod)mods[1]);
m.RemoveSkillMod((SkillMod)mods[2]);
}
m_Table.Remove(m);
m.BodyMod = 0;
m.EndAction(typeof(RogueSlyFoxSpell));
}
}
示例6: 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_SkillMods;
for ( int i = 0; i < mods.Count; ++i )
mob.RemoveSkillMod( mods[i] );
context.m_Timer.Stop();
return true;
}
mob.RemoveStatMod( "Murder Penalty Str" );
mob.RemoveStatMod( "Murder Penalty Dex" );
mob.RemoveStatMod( "Murder Penalty Int" );
return false;
}
示例7: DrugBonus
public static void DrugBonus(Mobile from, string type, int degree, int duration)
{
if (from == null || from.Deleted)
return;
if (type == null)
return;
if (!(from is PlayerMobile))
return;
if (degree < 1)
degree = 1;
if (duration < 10)
duration = 10;
from.RemoveStatMod("Severe Withdrawal");
if (type == "Tobacco")
{
from.RemoveStatMod("Tobacco Withdrawal");
from.RemoveStatMod("Tobacco");
degree = (int)(degree * (1 - (0.05 * ( degree / 10 ))));
if(degree < 0)
degree = 0;
XmlDex drugBonus = new XmlDex(degree, duration);
drugBonus.Name = "Tobacco";
XmlAttach.AttachTo(from, new XmlDex(degree, duration));
}
else if (type == "Swampweed")
{
from.RemoveStatMod("Swampweed Withdrawal");
from.RemoveStatMod("Swampweed");
degree = (int)(degree * (1 - (0.05 * (degree / 10))));
if (degree < 0)
degree = 0;
XmlDex drugBonus = new XmlDex(degree, duration);
drugBonus.Name = "Swampweed";
XmlAttach.AttachTo(from, new XmlInt(degree, duration));
}
else if (type == "Qat")
{
from.RemoveStatMod("Qat Withdrawal");
from.RemoveStatMod("Qat");
degree = (int)(degree * (1 - (0.05 * (degree / 10))));
if (degree < 0)
degree = 0;
XmlDex drugBonus = new XmlDex(degree, duration);
drugBonus.Name = "Qat";
XmlAttach.AttachTo(from, new XmlStr(degree, duration));
}
else if (type == "Banestone")
{
from.RemoveStatMod("Banestone Withdrawal");
from.RemoveStatMod("Banestone");
degree = (int)(degree * (1 - (0.05 * (degree / 10))));
if (degree < 0)
degree = 0;
XmlDex drugBonus = new XmlDex(degree, duration);
drugBonus.Name = "Banestone";
XmlAttach.AttachTo(from, new XmlMana(degree, duration));
}
else if (type == "Opium")
{
from.RemoveStatMod("Opium Withdrawal");
from.RemoveStatMod("Opium");
degree = (int)(degree * (1 - (0.05 * (degree / 10))));
if (degree < 0)
degree = 0;
XmlDex drugBonus = new XmlDex(degree, duration);
drugBonus.Name = "Opium";
XmlAttach.AttachTo(from, new XmlHits(degree, duration));
}
}
示例8: Debuff
public static void Debuff( Mobile mob )
{
mob.RemoveStatMod( "[Magic] Str Offset" );
mob.RemoveStatMod( "[Magic] Dex Offset" );
mob.RemoveStatMod( "[Magic] Int Offset" );
mob.RemoveStatMod( "Concussion" );
mob.RemoveStatMod( "blood-rose" );
mob.RemoveStatMod( "clarity-potion" );
OrangePetals.RemoveContext( mob );
mob.Paralyzed = false;
mob.Hidden = false;
if ( !Core.AOS )
{
mob.MagicDamageAbsorb = 0;
mob.MeleeDamageAbsorb = 0;
Spells.Second.ProtectionSpell.Registry.Remove( mob );
Spells.Fourth.ArchProtectionSpell.RemoveEntry( mob );
mob.EndAction( typeof( DefensiveSpell ) );
}
TransformationSpellHelper.RemoveContext( mob, true );
AnimalForm.RemoveContext( mob, true );
if( DisguiseTimers.IsDisguised( mob ) )
DisguiseTimers.StopTimer( mob );
if( !mob.CanBeginAction( typeof( PolymorphSpell ) ) )
{
mob.BodyMod = 0;
mob.HueMod = -1;
mob.EndAction( typeof( PolymorphSpell ) );
}
BaseArmor.ValidateMobile( mob );
BaseClothing.ValidateMobile( mob );
mob.Hits = mob.HitsMax;
mob.Stam = mob.StamMax;
mob.Mana = mob.ManaMax;
mob.Poison = null;
}
示例9: Remove
public override void Remove( Mobile m )
{
base.Remove( m );
m.RemoveStatMod( "[FontOfFortune] Stat Offset" );
}
示例10: 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.RemoveSkillMod( (SkillMod)mods[2] );
m.RemoveSkillMod( (SkillMod)mods[3] );
}
m_Table.Remove( m );
m.EndAction( typeof( RangerHuntersAimSpell ) );
m.BodyMod = 0;
}
示例11: OnDeactivate
protected override bool OnDeactivate(Mobile m, Tuple<EquipmentSetPart, Item>[] equipped)
{
if (m == null || m.Deleted || equipped == null)
{
return false;
}
if (EquipmentSets.CMOptions.ModuleDebug)
{
EquipmentSets.CMOptions.ToConsole(
"OnDeactivate: '{0}', '{1}', '{2}', '{3}', '{4}'",
m,
UID,
_Stat,
_Offset,
_Duration.ToSimpleString());
}
m.RemoveStatMod(UID);
return true;
}
示例12: OnTargetRemoved
protected override void OnTargetRemoved( Mobile m )
{
BuffInfo.RemoveBuff( m, this.BuffIcon );
foreach ( AttributeMod mod in m_Mods )
{
m.RemoveAttributeMod( mod );
}
foreach ( StatMod mod in m_StatMods )
{
m.RemoveStatMod( mod.Name );
}
}
示例13: WipeMods
public static void WipeMods(Mobile m)
{
PlayerMobile pm = m as PlayerMobile;
m.DisruptiveAction();
foreach (StatType Stat in Enum.GetValues(typeof(StatType)))
{
string name = String.Format("[Magic] {0} Offset", Stat);
if (m.GetStatMod(name) != null)
m.RemoveStatMod(name);
}
if (TransformationSpellHelper.UnderTransformation(m))
TransformationSpellHelper.RemoveContext(m, true);
m.HueMod = -1;
m.NameMod = null;
PolymorphSpell.StopTimer(m);
IncognitoSpell.StopTimer(m);
DisguiseGump.StopTimer(m);
foreach (Type T in DispelActions)
m.EndAction(T);
m.BodyMod = 0;
m.HueMod = -1;
if (pm != null)
{
if (pm.BuffTable != null)
{
List<BuffInfo> list = new List<BuffInfo>();
foreach (BuffInfo buff in pm.BuffTable.Values)
{
if (!buff.RetainThroughDeath)
{
list.Add(buff);
}
}
for (int i = 0; i < list.Count; i++)
{
pm.RemoveBuff(list[i]);
}
}
pm.SavagePaintExpiration = TimeSpan.Zero;
pm.SetHairMods(-1, -1);
pm.ResendBuffs();
}
m.VirtualArmorMod = 0;
BaseArmor.ValidateMobile(m);
BaseClothing.ValidateMobile(m);
}
示例14: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
VampGloves gloves = from.FindItemOnLayer( Layer.Gloves ) as VampGloves;
VampHelm helm = from.FindItemOnLayer( Layer.Helm ) as VampHelm;
VampLegs legs = from.FindItemOnLayer( Layer.Pants ) as VampLegs;
VampArms arms = from.FindItemOnLayer( Layer.Arms ) as VampArms;
VampGorget gorget = from.FindItemOnLayer( Layer.Neck ) as VampGorget;
VampEarrings earrings = from.FindItemOnLayer( Layer.Earrings ) as VampEarrings;
VampRing ring = from.FindItemOnLayer( Layer.Ring ) as VampRing;
VampBracelet bracelet = from.FindItemOnLayer( Layer.Bracelet ) as VampBracelet;
if ( Parent != from )
{
from.SendMessage( "The Shroud of Dracula must be equiped to be used." );
}
else if ( from.Mounted == true )
{
from.SendMessage( "You cannot be mounted while trying to transform!" );
}
else if ( gloves == null || helm == null || legs == null || arms == null || gorget == null || earrings == null || ring == null || bracelet == null )
{
from.SendMessage( "You must have all the pieces of the Vampire equiped to transform!" );
}
else if ( this.Transformed == false )
{
LootType = LootType.Blessed;
from.SendMessage( "You pull the hood over your head." );
from.PlaySound( 0x220 );
//from.Title = "the True Vampire";
from.BodyMod = 146;
from.NameHue = 39;
from.HueMod = 1;
from.DisplayGuildTitle = false;
this.Transformed = true;
ItemID = 9860;
from.RemoveItem(this);
from.EquipItem(this);
m_StatMod0 = new StatMod( StatType.Str, "MOD0", 25, TimeSpan.Zero );
m_StatMod1 = new StatMod( StatType.Int, "MOD1", 25, TimeSpan.Zero );
m_StatMod2 = new StatMod( StatType.Dex, "MOD2", 25, TimeSpan.Zero );
from.AddStatMod( m_StatMod0 );
from.AddStatMod( m_StatMod1 );
from.AddStatMod( m_StatMod2 );
}
else
{
from.SendMessage( "You lower the hood." );
from.PlaySound( 0x220 );
//from.Title = null;
from.BodyMod = 0x0;
from.NameHue = -1;
from.HueMod = -1;
from.DisplayGuildTitle = true;
this.Transformed = false;
ItemID = 0x1F03;
from.RemoveItem(this);
from.EquipItem(this);
from.RemoveStatMod( "MOD0" );
from.RemoveStatMod( "MOD1" );
from.RemoveStatMod( "MOD2" );
}
}
示例15: RemoveBuff
public override void RemoveBuff( Mobile m )
{
m.RemoveStatMod( "[BalmOrLotion] Int Offset" );
}