/// <summary> /// Like the above, but sends messages to multiple players /// </summary> static public void Player_RouteChat(IChatTarget target, Player from, CS_Chat chat) { //Formulate the chat notification! SC_Chat schat = new SC_Chat(); schat.chatType = chat.chatType; schat.from = from._alias; schat.message = chat.message; schat.bong = chat.bong; //Go! foreach (Player player in target.getChatTargets()) { if (player == from) { continue; } if (from != null) { if (player._accountIgnore.ContainsKey(from._alias)) { continue; } if (player._accountIgnore.ContainsValue(from._ipAddress)) { continue; } } player._client.sendReliable(schat); } }
/// <summary> /// Sends arena messages to players /// </summary> static public void Social_ArenaChat(IChatTarget a, string message, int bong) { //Prepare the chat packet SC_Chat chat = new SC_Chat(); chat.bong = (byte)bong; chat.chatType = Chat_Type.Arena; chat.message = message; chat.from = ""; //Send it to all arena participants foreach (Player player in a.getChatTargets()) { player._client.sendReliable(chat); } }
static public void Player_RouteChatRaw(IChatTarget target, String from, string message, byte bong, Chat_Type chatType) { SC_Chat schat = new SC_Chat(); schat.chatType = chatType; schat.from = from; schat.message = message; schat.bong = bong; //Go! foreach (Player player in target.getChatTargets()) { player._client.sendReliable(schat); } }
/// <summary> /// Like the above, but sends messages to multiple players /// </summary> static public void Player_RouteChat(IChatTarget target, Player from, CS_Chat chat) { //Formulate the chat notification! SC_Chat schat = new SC_Chat(); schat.chatType = chat.chatType; schat.from = from._alias; schat.message = chat.message; schat.bong = chat.bong; //Go! foreach (Player player in target.getChatTargets()) { if (player != from) { player._client.sendReliable(schat); } } }