ALFAIRCBot.ALFAIRCBot.SendMessageToPlayer C# (CSharp) Метод

SendMessageToPlayer() приватный Метод

Send a message to a player as a freeform notice text message.
private SendMessageToPlayer ( int DestinationPlayerId, int DestinationServerId, string Message ) : void
DestinationPlayerId int Supplies the recipient player id. /// The player should be online for the message to be delivered. ///
DestinationServerId int Supplies the server id to deliver /// the message to. This should be the server id that the player is /// logged on to.
Message string Supplies the message to deliver. The message /// length must not be greater than ACR_SERVER_IPC_MAX_EVENT_LENGTH. ///
Результат void
        private void SendMessageToPlayer(int DestinationPlayerId, int DestinationServerId, string Message)
        {
            int PageFrom = GetPageFromPlayerId();

            if (PageFrom == 0)
            {
                Console.WriteLine("No page from player name configured.");
                return;
            }

            ExecuteQueryNoReader(String.Format(
                "INSERT INTO server_ipc_events (`ID`, `SourcePlayerID`, `SourceServerID`, `DestinationPlayerID`, `DestinationServerID`, `EventType`, `EventText`) VALUES (0, {0}, 0, {1}, {2}, {3}, '{4}')",
                PageFrom,
                DestinationPlayerId,
                DestinationServerId,
                ACR_SERVER_IPC_EVENT_PAGE,
                MySqlHelper.EscapeString(Message)));
        }