/// <summary> /// Create a private message. /// </summary> /// <param name="text"></param> /// <param name="recipient"></param> public static ChatMessage CreatePrivateMessage(string text, string recipient) { ChatMessage cm = new ChatMessage(text); cm.Recipient = recipient; cm.Channel = ChatChannel.None; cm.Type = SpeechType.Private; return cm; }
/// <summary> /// Create a channel message. /// </summary> /// <param name="text"></param> /// <param name="channel"></param> public static ChatMessage CreateChannelMessage(string text, ChatChannel channel) { ChatMessage cm = new ChatMessage(text); cm.Recipient = ""; cm.Channel = channel; cm.Type = SpeechType.ChannelYellow; return cm; }
/// <summary> /// Create a yell or whisper message. /// </summary> /// <param name="text"></param> /// <param name="type"></param> public static ChatMessage CreateNormalMessage(string text, SpeechType type) { ChatMessage cm = new ChatMessage(text); cm.Recipient = ""; cm.Channel = ChatChannel.None; cm.Type = type; return cm; }
/// <summary> /// Send a message (generic). /// </summary> /// <param name="message"></param> public bool Say(ChatMessage message) { return Packets.Outgoing.PlayerSpeechPacket.Send(client, message.Type, message.Recipient, message.Text, message.Channel); }