本文整理汇总了C#中Server.Items.Container.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# Container.MoveToWorld方法的具体用法?C# Container.MoveToWorld怎么用?C# Container.MoveToWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.Container
的用法示例。
在下文中一共展示了Container.MoveToWorld方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAfterDeath
//.........这里部分代码省略.........
if ( SkillHandlers.Stealing.ClassicMode )
Criminal = true;
}
if ( this.LastKiller != null )
{
PlayerMobile k = this.LastKiller as PlayerMobile;
Guild k_Guild = null;
Guild m_Guild = null;
if ( k != null && this != null )
{
k_Guild = (Guild) k.Guild;
m_Guild = (Guild) this.Guild;
}
if ( k_Guild != null && m_Guild != null && k_Guild.IsWar( m_Guild ) && k_Guild.GetMaxKills( m_Guild ) != 0 )
k_Guild.AddKills( m_Guild, 1 );
}
if ( this.Kills >= 5 && DateTime.Now >= m_NextJustAward )
{
Mobile m = FindMostRecentDamager( false );
if ( m is BaseCreature )
m = ( (BaseCreature) m ).GetMaster();
if ( m != null && m.IsPlayer && m != this )
{
bool gainedPath = false;
int pointsToGain = 0;
pointsToGain += (int) Math.Sqrt( this.GameTime.TotalSeconds * 4 );
pointsToGain *= 5;
pointsToGain += (int) Math.Pow( this.Skills.Total / 250, 2 );
if ( VirtueHelper.Award( m, VirtueName.Justice, pointsToGain, ref gainedPath ) )
{
if ( gainedPath )
m.SendLocalizedMessage( 1049367 ); // You have gained a path in Justice!
else
m.SendLocalizedMessage( 1049363 ); // You have gained in Justice.
m.FixedParticles( 0x375A, 9, 20, 5027, EffectLayer.Waist );
m.PlaySound( 0x1F7 );
m_NextJustAward = DateTime.Now + TimeSpan.FromMinutes( pointsToGain / 3 );
}
}
}
if ( m_InsuranceCost > 0 )
SendLocalizedMessage( 1060398, m_InsuranceCost.ToString() ); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
if ( m_InsuranceAward != null )
{
PlayerMobile pm = m_InsuranceAward;
if ( pm.m_InsuranceBonus > 0 )
pm.SendLocalizedMessage( 1060397, pm.m_InsuranceBonus.ToString() ); // ~1_AMOUNT~ gold has been deposited into your bank box.
}
Mobile killer = this.FindMostRecentDamager( true );
if ( killer is BaseCreature )
{
BaseCreature bc = (BaseCreature) killer;
Mobile master = bc.GetMaster();
if ( master != null )
killer = master;
}
if ( this.Young && m_KRStartingQuestStep == 0 )
{
Point3D dest = GetYoungDeathDestination();
if ( dest != Point3D.Zero )
{
this.Location = dest;
Timer.DelayCall( TimeSpan.FromSeconds( 2.5 ), new TimerCallback( SendYoungDeathNotice ) );
}
}
Faction.HandleDeath( this, killer );
if ( Region.IsPartOf( typeof( UnderworldDeathRegion ) ) )
{
Point3D dest = new Point3D( 1060, 1066, -42 );
MoveToWorld( dest, Map.TerMur );
c.MoveToWorld( dest, Map.TerMur );
SendLocalizedMessage( 1113566 ); // You will find your remains at the entrance of the maze.
}
Send( new DisplayWaypoint( c, WaypointType.Corpse, 1028198 ) ); // corpse
}