Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProcessIncomingMessage()

void Terraria.Chat.Commands.PartyChatCommand.ProcessIncomingMessage ( string text,
byte clientId )
inline

Implements Terraria.Chat.Commands.IChatCommand.

Definition at line 11 of file PartyChatCommand.cs.

12 {
13 int team = Main.player[clientId].team;
14 Color color = Main.teamColor[team];
15 if (team == 0)
16 {
17 SendNoTeamError(clientId);
18 }
19 else
20 {
21 if (text == "")
22 {
23 return;
24 }
25 for (int i = 0; i < 255; i++)
26 {
27 if (Main.player[i].team == team)
28 {
29 ChatHelper.SendChatMessageToClientAs(clientId, NetworkText.FromLiteral(text), color, i);
30 }
31 }
32 }
33 }
static NetworkText FromLiteral(string text)

References Terraria.Localization.NetworkText.FromLiteral(), Terraria.Main.player, Terraria.Chat.ChatHelper.SendChatMessageToClientAs(), Terraria.Chat.Commands.PartyChatCommand.SendNoTeamError(), and Terraria.Main.teamColor.