public static void BroadcastChatMessageAs( byte messageAuthor, NetworkText text, Color color, int excludedPlayer = -1) { if (excludedPlayer == Main.myPlayer) { return; } ChatHelper.DisplayMessage(text, color, messageAuthor); }
public static void SendChatMessageToClientAs( byte messageAuthor, NetworkText text, Color color, int playerId) { if (playerId != Main.myPlayer) { return; } ChatHelper.DisplayMessage(text, color, messageAuthor); }
public static void SendChatMessageToClientAs( byte messageAuthor, NetworkText text, Color color, int playerId) { NetPacket packet = NetTextModule.SerializeServerMessage(text, color, messageAuthor); NetManager.Instance.SendToClient(packet, playerId); if (playerId != Main.myPlayer) { return; } ChatHelper.DisplayMessage(text, color, messageAuthor); }
public static void DisplayMessage(NetworkText text, Color color, byte messageAuthor) { string str = text.ToString(); if (messageAuthor < byte.MaxValue) { Main.player[(int)messageAuthor].chatOverhead.NewMessage(str, Main.PlayerOverheadChatMessageDisplayTime); Main.player[(int)messageAuthor].chatOverhead.color = color; str = NameTagHandler.GenerateTag(Main.player[(int)messageAuthor].name) + " " + str; } if (ChatHelper.ShouldCacheMessage()) { ChatHelper.CacheMessage(str, color); } else { Main.NewTextMultiline(str, false, color, -1); } }
public static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer = -1) { ChatHelper.BroadcastChatMessageAs(byte.MaxValue, text, color, excludedPlayer); }
public static void SendChatMessageToClient(NetworkText text, Color color, int playerId) { ChatHelper.SendChatMessageToClientAs(byte.MaxValue, text, color, playerId); }
public static void DisplayMessageOnClient(NetworkText text, Color color, int playerId) { ChatHelper.DisplayMessage(text, color, byte.MaxValue); }