예제 #1
0
        /// <summary>
        /// Client has selected a square.
        /// </summary>
        /// <param name="packet"></param>
        void OnSquareSelect(PacketReader packet)
        {
            if (!IsAuthenticated)
            {
                return;
            }

            Square square = Server.Database.GetSquare(packet.ReadUTF16());

            if (square != null)
            {
                Send(PacketGenerator.SquareConnect(0, square.IP, square.Port, Key));
            }
            else
            {
                Send(PacketGenerator.SquareConnect(4, "", 0, ""));
            }
        }