本文整理汇总了C#中Server.Mobile.Delta方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.Delta方法的具体用法?C# Mobile.Delta怎么用?C# Mobile.Delta使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.Delta方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnHit
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage( 1063353 ); // You perform a masterful defense!
attacker.FixedParticles( 0x375A, 1, 17, 0x7F2, 0x3E8, 0x3, EffectLayer.Waist );
int modifier = (int)(30.0 * ((Math.Max( attacker.Skills[SkillName.Bushido].Value, attacker.Skills[SkillName.Ninjitsu].Value ) - 50.0) / 70.0));
DefenseMasteryInfo info = m_Table[attacker] as DefenseMasteryInfo;
if( info != null )
EndDefense( (object)info );
ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, 50 + modifier );
attacker.AddResistanceMod( mod );
info = new DefenseMasteryInfo( attacker, 80 - modifier, mod );
info.m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), new TimerStateCallback( EndDefense ), info );
m_Table[attacker] = info;
attacker.Delta( MobileDelta.WeaponDamage );
}
示例2: AddContext
public static void AddContext( Mobile m, TransformContext context )
{
m_Table[m] = context;
if ( context.Type == typeof( HorrificBeastSpell ) )
m.Delta( MobileDelta.WeaponDamage );
}
示例3: OnEnter
public override void OnEnter(Mobile m)
{
if (!Controller.InUse)
return;
m.Delta(MobileDelta.Noto);
m.InvalidateProperties();
}
示例4: Cure
public static void Cure( Mobile who )
{
if ( who == null )
return;
PoisonAttachment attachment = XmlAttach.FindAttachment( who, typeof( PoisonAttachment ) ) as PoisonAttachment;
if ( attachment != null )
{
attachment.Delete();
who.SendMessage( 83, "You have been cured of poison." );
who.Delta( MobileDelta.Flags ); // update bar
}
}
示例5: RemoveBuff
public static void RemoveBuff(Mobile from, FishPieEffect type)
{
if(!m_EffectsList.ContainsKey(from))
return;
if (m_EffectsList[from] != null && m_EffectsList[from].Contains(type))
m_EffectsList[from].Remove(type);
if (m_EffectsList[from] == null || m_EffectsList[from].Count == 0)
m_EffectsList.Remove(from);
BuffInfo.RemoveBuff(from, BuffIcon.FishPie);
from.Delta(MobileDelta.WeaponDamage);
}
示例6: OnEnter
public override void OnEnter(Mobile m)
{
if (!Controller.InUse)
return;
m.SendMessage("Your mana is being regenerated faster!");
if (m is PlayerMobile)
{
HealManaTimer timer = new HealManaTimer( m );
PlayerTimers.Add(timer);
timer.Start();
}
m.Delta(MobileDelta.Noto);
m.InvalidateProperties();
}
示例7: OnEnter
public override void OnEnter(Mobile m)
{
if (!Controller.InUse)
return;
if (m is EnergyVortex)
{
EnergyVortex ev = (EnergyVortex) m;
Controller.EVsAndBSsAdd(ev);
}
else if( m is BladeSpirits )
{
BladeSpirits bs = (BladeSpirits) m;
Controller.EVsAndBSsAdd(bs);
}
m.Delta(MobileDelta.Noto);
m.InvalidateProperties();
}
示例8: OnEnter
public virtual void OnEnter(PvPRegion region, Mobile m)
{
if (region == null || m == null || m.Deleted)
{
return;
}
var pm = m as PlayerMobile;
if (pm != null)
{
if (region.IsPartOf(BattleRegion))
{
pm.SendMessage("You have entered {0}", Name);
}
else if (region.IsPartOf(SpectateRegion))
{
pm.SendMessage("You have entered {0} spectator area.", Name);
if (!IsSpectator(pm))
{
AddSpectator(pm, false);
}
}
}
m.Delta(MobileDelta.Noto);
}
示例9: AddMember
public void AddMember( Mobile mob )
{
Members.Add( new PlayerState( mob, this, Members ) );
Item item = mob.FindItemOnLayer( Layer.OuterTorso ) as Item;
if( item != null )
{
if ( item.Movable == false )
{
mob.AddToBackpack( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
mob.SendAsciiMessage( "You have been granted a robe which signifies your faction." );
}
if ( item.Movable == true )
{
mob.AddToBackpack( item );
mob.EquipItem( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
mob.SendAsciiMessage( "You have been granted a robe which signifies your faction." );
}
}
else
{
mob.EquipItem( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
mob.SendAsciiMessage( "You have been granted a robe which signifies your faction." );
}
mob.InvalidateProperties();
mob.Delta( MobileDelta.Noto );
}
示例10: DoEffects
public static void DoEffects(Mobile from)
{
if (Table == null)
Table = new Dictionary<Mobile, Timer>();
if (!Table.ContainsKey(from))
{
Table[from] = Timer.DelayCall(TimeSpan.FromSeconds(5), () =>
{
EndEffects(from);
});
from.Send(SpeedControl.WalkSpeed);
from.SendLocalizedMessage(1150886); // Splashes from the creature encrust your weapon and equipment, slowing your movement.
from.Delta(MobileDelta.WeaponDamage);
}
}
示例11: SwitchTeams
public void SwitchTeams( Mobile from, CTFTeam team )
{
CTFTeam old = GetTeam( from );
if ( old == team )
return;
else if ( old != null )
old.RemoveMember( from );
team.AddMember( from );
from.Delta( MobileDelta.Noto );
from.Blessed = true;
Item robe = from.FindItemOnLayer( Layer.OuterTorso );
if ( robe is CTFRobe )
{
robe.Name = "Game Robe";
robe.Hue = 0;
}
else
{
if ( robe != null )
{
if ( robe.Movable )
from.AddToBackpack( robe );
else
robe.Delete();
}
robe = new CTFRobe( team );
from.EquipItem( robe );
}
}
示例12: LeaveGame
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public void LeaveGame( Mobile m )
{
m.MoveToWorld( new Point3D( 1563, 1739, 15 ), Map.Felucca );
CTFTeam t = GetTeam( m );
if ( t != null )
t.RemoveMember( m );
m.SolidHueOverride = -1;
Item robe = m.FindItemOnLayer( Layer.OuterTorso );
if ( robe is CTFRobe )
robe.Delete();
if ( m.Backpack != null )
{
Item[] robes = m.Backpack.FindItemsByType( typeof( CTFRobe ) );
for(int i=0;i<robes.Length;i++)
robes[i].Delete();
}
m.Delta( MobileDelta.Noto );
}
示例13: RemoveStatBonuses
public static void RemoveStatBonuses( Mobile from, Item item )
{
string modName = item.Serial.ToString();
from.RemoveStatMod( modName + "SetStr" );
from.RemoveStatMod( modName + "SetDex" );
from.RemoveStatMod( modName + "SetInt" );
from.Delta( MobileDelta.Armor );
from.CheckStatTimers();
}
示例14: LeaveGame
/// <summary>
/// Will remove the player from the game.
/// </summary>
/// <param name="m"></param>
public static void LeaveGame(Mobile m)
{
if (!CTFGame.Running)
return;
CTFPlayerGameData pgd = GameData.GetPlayerData(m);
if (pgd != null)
{
pgd.InGame = false;
RemoveItems(m);
SunnySystem.DisArmPlayer(m);
m.Criminal = false;
m.InvalidateProperties();
m.Warmode = false;
m.Aggressed.Clear();
m.Aggressors.Clear();
EventSystem.RemoveToRandomLoc(m);
SunnySystem.ReDress(m);
m.Delta(MobileDelta.Noto);
m.InvalidateProperties();
}
else if (PlayerJoinList.Contains(m)) {
try {
PlayerJoinList.Remove(m);
EventSystem.RemoveToRandomLoc(m);
SunnySystem.ReDress(m);
} catch {}
} else
EventSystem.RemoveToRandomLoc(m);
}
示例15: IsHarmfulCriminal
public override bool IsHarmfulCriminal(Mobile target)
{
if (SkillHandlers.Stealing.ClassicMode && target is PlayerMobile && ((PlayerMobile)target).m_PermaFlags.Count > 0)
{
int noto = Notoriety.Compute(this, target);
if (noto == Notoriety.Innocent)
target.Delta(MobileDelta.Noto);
return false;
}
if (target is BaseCreature && ((BaseCreature)target).InitialInnocent && !((BaseCreature)target).Controlled)
return false;
return base.IsHarmfulCriminal(target);
}