Ejemplo n.º 1
0
        public void Move(Direction direction, MovementType movement, int x, int y)
        {
            if (Player.X != x)
            {
                var msg = new SpPlayerXY(Player.Index, Player.X, Player.Y, Player.Direction);
                msg.Send(Player.Connection);

                return;
            }

            if (Player.Y != y)
            {
                var msg = new SpPlayerXY(Player.Index, Player.X, Player.Y, Player.Direction);
                msg.Send(Player.Connection);

                return;
            }

            if (Player.ChatNpcId > 0)
            {
                var chat = new NpcConversation()
                {
                    Player = Player
                };

                chat.Close();
            }

            Move(direction, movement);
        }
Ejemplo n.º 2
0
        public void SendTarget()
        {
            var target = new SpTarget(Player.Target, TargetType.None);

            target.Send(Player.Connection);

            if (Player.ChatNpcId > 0)
            {
                var chat = new NpcConversation()
                {
                    Player = Player
                };

                chat.Close();
            }
        }