当前位置: 首页>>代码示例>>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;未经允许,请勿转载。