當前位置: 首頁>>代碼示例>>C#>>正文


C# PlayerMobile.Send方法代碼示例

本文整理匯總了C#中Server.Mobiles.PlayerMobile.Send方法的典型用法代碼示例。如果您正苦於以下問題:C# PlayerMobile.Send方法的具體用法?C# PlayerMobile.Send怎麽用?C# PlayerMobile.Send使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobiles.PlayerMobile的用法示例。


在下文中一共展示了PlayerMobile.Send方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Process

            private static void Process( PlayerMobile pm, Direction dir, int seq )
            {
                if ( (pm.NetState.Sequence == 0 && seq != 0) || !pm.Move( dir ) )
                {
                    pm.Send( new MovementRej( seq, pm ) );
                    pm.NetState.Sequence = 0;

                    pm.ClearFastwalkStack();
                }
                else
                {
                    ++seq;

                    if ( seq == 256 )
                        seq = 1;

                    pm.NetState.Sequence = seq;
                }
            }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:19,代碼來源:PlayerMobile.cs

示例2: SendUpdateMsg

        private static void SendUpdateMsg( PlayerMobile m )
        {
            if ( !File.Exists( "update.txt" ) )
                return;

            DateTime time = File.GetLastWriteTimeUtc( "update.txt" );
            int ticks = (int)time.Ticks;
            if ( m.LastUpdate == ticks )
                return;

            if ( time != m_FileTime || m_Packet == null )
            {
                m_FileTime = time;
                Packet.Release( ref m_Packet );
                m_Packet = new ScrollMessage( 0x02, ticks, ReadFile( "update.txt" ) );
                m_Packet.SetStatic();
            }

            m.Send( m_Packet );
            m.LastUpdate = ticks;
        }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:21,代碼來源:UpdatesGump.cs

示例3: Enqueue

            public static void Enqueue( PlayerMobile pm, Direction dir, byte seq )
            {
                if ( pm.CanMoveNow && ( pm.m_MoveReqs == null || pm.m_MoveReqs.Count <= 0 ) )
                {
                    Process( pm, dir, seq );
                }
                else
                {
                    if ( pm.m_MoveReqs == null )
                        pm.m_MoveReqs = new Queue();

                    if ( pm.m_MoveReqs.Count < 25 )
                    {
                        if ( pm.m_MoveReqs.Count <= 0 )
                            m_List.Add( pm );
                        pm.m_MoveReqs.Enqueue( Entry.Instanciate( dir, seq ) );
                    }
                    else
                    {
                        pm.m_MoveReqs.Clear();
                        pm.Send( new MovementRej( seq, pm ) );
                    }
                }
            }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:24,代碼來源:PlayerMobile.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.Send方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。