Esempio n. 1
0
        public static void ChatClientPrivate(ChatClientPrivateMessage message, WorldClient client)
        {
            if (message.receiver == client.Character.Name)
            {
                client.Character.OnChatError(ChatErrorEnum.CHAT_ERROR_INTERIOR_MONOLOGUE);
                return;
            }

            WorldClient target = WorldServer.Instance.GetOnlineClient(message.receiver);

            if (target != null)
            {
                target.Send(ChatChannels.GetChatServerMessage(ChatActivableChannelsEnum.PSEUDO_CHANNEL_PRIVATE, message.content, client));
                client.Send(ChatChannels.GetChatServerCopyMessage(ChatActivableChannelsEnum.PSEUDO_CHANNEL_PRIVATE, message.content, client, target));
            }
            else
            {
                client.Character.OnChatError(ChatErrorEnum.CHAT_ERROR_RECEIVER_NOT_FOUND);
            }
        }
Esempio n. 2
0
 public static void HandleChatClientMultiWithObject(ChatClientMultiWithObjectMessage message, WorldClient client)
 {
     client.Character.SendMap(ChatChannels.GetChatServerWithObjectMessage(ChatActivableChannelsEnum.CHANNEL_GLOBAL, message.objects, message.content, client));
 }