Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PartyChatCommand.cs
Go to the documentation of this file.
3
5
6[ChatCommand("Party")]
8{
9 private static readonly Color ERROR_COLOR = new Color(255, 240, 20);
10
11 public void ProcessIncomingMessage(string text, byte clientId)
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 {
30 }
31 }
32 }
33 }
34
36 {
37 }
38
39 private void SendNoTeamError(byte clientId)
40 {
41 ChatHelper.SendChatMessageToClient(Lang.mp[10].ToNetworkText(), ERROR_COLOR, clientId);
42 }
43}
static void SendChatMessageToClient(NetworkText text, Color color, int playerId)
Definition ChatHelper.cs:28
static void SendChatMessageToClientAs(byte messageAuthor, NetworkText text, Color color, int playerId)
Definition ChatHelper.cs:33
void ProcessOutgoingMessage(ChatMessage message)
void ProcessIncomingMessage(string text, byte clientId)
static LocalizedText[] mp
Definition Lang.cs:34
static NetworkText FromLiteral(string text)
static Microsoft.Xna.Framework.Color[] teamColor
Definition Main.cs:1276
static Player[] player
Definition Main.cs:1803