本文整理汇总了C#中Server.Mobiles.PlayerMobile.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.MoveToWorld方法的具体用法?C# PlayerMobile.MoveToWorld怎么用?C# PlayerMobile.MoveToWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.MoveToWorld方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: JailPlayer
public static void JailPlayer( PlayerMobile criminal, JailCell cell, TimeSpan length, string reason, PlayerMobile jailer )
{
Point3D jailedFromPoint = criminal.Location;
Map jailedFromMap = criminal.Map;
if ( Settings.AutoSquelch && !criminal.Squelched )
{
criminal.Squelched = true;
criminal.SendMessage( "You have been squelched." );
}
if ( criminal.Mounted )
{
if ( criminal.Mount is BaseMount )
{
BaseMount pet = (BaseMount)criminal.Mount;
pet.Rider = null;
StablePet( criminal, pet );
}
}
foreach ( Mobile mobile in World.Mobiles.Values )
{
if ( mobile is BaseCreature )
{
BaseCreature creature = (BaseCreature)mobile;
if ( creature.Controlled && creature.ControlMaster == criminal )
{
StablePet( criminal, creature );
}
}
}
criminal.MoveToWorld( GetCellLocation( cell ), Settings.SendToMap );
JailedPlayers.Add( new JailedPlayer( criminal, jailedFromPoint, jailedFromMap, length, jailer.Name, reason ) );
criminal.SendGump( new JailInfoGump( jailer.Name, length, reason ) );
criminal.SendMessage( String.Format( "You have been jailed by {0} for {1} day{2}, {3} hour{4}, and {5} minute{6}.",
criminal == jailer ? "yourself" : jailer.Name,
length.Days, length.Days == 1 ? "" : "s",
length.Hours, length.Hours == 1 ? "" : "s",
length.Minutes, length.Minutes == 1 ? "" : "s" ) );
criminal.SendMessage( String.Format( "Reason: {0}", reason ) );
WriteLine( String.Format( "{0} has been jailed for {1} day{2}, {3} hour{4}, and {5} minute{6} for {7} by {8}.",
criminal.Name,
length.Days, length.Days == 1 ? "" : "s",
length.Hours, length.Hours == 1 ? "" : "s",
length.Minutes, length.Minutes == 1 ? "" : "s",
reason,
jailer.Name ) );
}
示例2: FreeThem
public static void FreeThem( PlayerMobile player )
{
if ( null == player )
return;
// Take away any JailRock
// No need to recurse containers since all their items were removed when jailed
RemoveRockFromList( new ArrayList( player.Items ) );
RemoveRockFromList( new ArrayList( player.Backpack.Items ) );
// Restore their access level
JailHammer hammer = player.FindItemOnLayer( Layer.OneHanded ) as JailHammer;
if ( null != hammer )
{
player.AccessLevel = hammer.PlayerAccessLevel;
hammer.Delete();
}
if ( player.Kills >= 5 )
player.MoveToWorld( JailConfig.FreeMurdererLocation, JailConfig.FreeMurdererMap );
else
player.MoveToWorld( JailConfig.FreeLocation, JailConfig.FreeMap );
player.SendMessage( "You have been released from Jail!" );
}
示例3: AddParticipant
public void AddParticipant (PlayerMobile participant)
{
if (participant != null && !m_Participants.Contains(participant))
{
m_Participants.Add(participant);
int startloc = Utility.RandomMinMax(0, m_StartLocations.Count-1);
participant.MoveToWorld((Point3D)m_StartLocations[startloc], this.Map);
participant.SendMessage("You joined the Bomber Man Game.");
if (m_AutoStart && FreePlayerSlots == 0)
this.StartGame(null);
}
}
示例4: DoStep
public static void DoStep( PlayerMobile pm )
{
switch ( pm.KRStartingQuestStep )
{
case 0:
{
pm.MoveToWorld( new Point3D( 3503, 2574, 14 ), Map.Trammel );
break;
}
case 1:
{
pm.MoveToWorld( new Point3D( 3648, 2678, -2 ), Map.Trammel );
/*
* Introduction
*
* Greetings, Traveler! Welcome to
* the world of Ultima Online.
*
* I am Gwen. I am here to help
* you learn the basic skills
* needed to thrive in your travels
* to come.
*
* Left click on the Next button
* to continue.
*/
pm.SendGump( new KRStartingQuestGump( 1078606, 1077642, true ) );
pm.PlaySound( 0x505 );
break;
}
case 2:
{
/*
* Movement
*
* Movement is controlled with the mouse.
*
* Do you see the glowing light?
*
* Right click and hold over it
* to walk in that direction.
*/
pm.SendGump( new KRStartingQuestGump( 1078235, 1077643, false ) );
pm.PlaySound( 0x505 );
pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2674, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078266 ) ); // Walk Toward Here
break;
}
case 3:
{
pm.Send( new RemoveWaypoint( Serial.MinusOne ) );
pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2666, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078267 ) ); // Run Toward Here
/*
* Movement
*
* Very good!
*
* Right click and hold, further
* away, to run to the glowing light.
*/
pm.SendGump( new KRStartingQuestGump( 1078235, 1077644, false ) );
pm.PlaySound( 0x505 );
break;
}
case 4:
{
pm.Send( new RemoveWaypoint( Serial.MinusOne ) );
pm.Send( new DisplayWaypoint( Serial.MinusOne, new Point3D( 3648, 2655, 0 ), Map.Trammel, WaypointType.QuestDestination, true, 1078268 ) ); // Pathfind Toward Here
/*
* Movement
*
* Very good!
*
* Good!
*
* Do you see the glowing light?
*
* Right click and hold over it to
* run in that direction.
*/
pm.SendGump( new KRStartingQuestGump( 1078235, 1077645, false ) );
pm.PlaySound( 0x505 );
break;
}
case 5:
{
//.........这里部分代码省略.........