public AdminChatMessageEvent(Player player, ChatDestination chatDestination, NetworkAction action, string msg) { this.Player = player; this.Message = msg; this.ChatDestination = chatDestination; this.NetworkAction = action; }
public ReceivedChatMessage(string msg, Player player, ChatDestination chatDestination, ServerInfo serverInfo) { this.Player = player; this.Message = msg; this.ChatDestination = chatDestination; this.ServerInfo = serverInfo; }
public AdminChatMessage(NetworkAction networkAction, ChatDestination chatDestination, uint destination, string message) { this.NetworkAction = networkAction; this.ChatDestination = chatDestination; this.Message = message; this.Destination = destination; }
private void TcpClient_MessageReceived(object sender, ITcpMessage e) { switch (e.MessageType) { case TcpMessageType.PACKET_SERVER_CHAT: { var m = e as PacketServerChatMessage; if (m.ClientId == this.tcpClient.MyClientId) { break; } ChatDestination destination = (ChatDestination)((int)m.NetworkAction - (int)NetworkAction.NETWORK_ACTION_CHAT); if (new ChatDestination[] { ChatDestination.DESTTYPE_BROADCAST, ChatDestination.DESTTYPE_CLIENT, ChatDestination.DESTTYPE_TEAM }.Contains(destination)) { this.ReceivedChatMessage?.Invoke(this, new ReceivedChatMessage(m.Message, tcpClient.Players[m.ClientId], destination, this.ServerInfo)); } break; } } }
public PacketClientChatMessage(ChatDestination chatDestination, uint destination, string message) { this.ChatDestination = chatDestination; this.Message = message; this.Destination = destination; }