当前位置: 首页>>代码示例>>C#>>正文


C# PlayerMobile.MoveToWorld方法代码示例

本文整理汇总了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 ) );
        }
开发者ID:greeduomacro,项目名称:uodarktimes-1,代码行数:55,代码来源:Core.cs

示例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!" );
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:25,代码来源:JailCommand.cs

示例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);

			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:14,代码来源:BomberManGame.cs

示例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:
                    {
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:StartingQuest.cs


注:本文中的Server.Mobiles.PlayerMobile.MoveToWorld方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。