Skip to content

Commit f00f630

Browse files
authored
Fix StickyChat (Caraxi#812)
1 parent 183b007 commit f00f630

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tweaks/Chat/StickyChat.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,58 +38,68 @@ private void OnExecuteCommand(ShellCommandModule* commandModule, Utf8String* com
3838
case not null when inputString.StartsWith("/party "):
3939
case not null when inputString.StartsWith("/p "):
4040
RaptureShellModule.Instance()->ChatType = 2;
41+
RaptureShellModule.Instance()->CurrentChannel.SetString("/party");
4142
break;
4243

4344
case not null when inputString.StartsWith("/say "):
4445
case not null when inputString.StartsWith("/s "):
4546
RaptureShellModule.Instance()->ChatType = 1;
47+
RaptureShellModule.Instance()->CurrentChannel.SetString("/say");
4648
break;
4749

4850
case not null when inputString.StartsWith("/alliance "):
4951
case not null when inputString.StartsWith("/a "):
5052
RaptureShellModule.Instance()->ChatType = 3;
53+
RaptureShellModule.Instance()->CurrentChannel.SetString("/alliance");
5154
break;
5255

5356
case not null when inputString.StartsWith("/freecompany "):
5457
case not null when inputString.StartsWith("/fc "):
5558
RaptureShellModule.Instance()->ChatType = 6;
59+
RaptureShellModule.Instance()->CurrentChannel.SetString("/freecompany");
5660
break;
5761

5862
case not null when inputString.StartsWith("/novice "):
5963
case not null when inputString.StartsWith("/beginner "):
6064
case not null when inputString.StartsWith("/n "):
6165
RaptureShellModule.Instance()->ChatType = 8;
66+
RaptureShellModule.Instance()->CurrentChannel.SetString("/novice");
6267
break;
6368

6469
case not null when inputString.StartsWith("/yell "):
6570
case not null when inputString.StartsWith("/y "):
6671
RaptureShellModule.Instance()->ChatType = 4;
72+
RaptureShellModule.Instance()->CurrentChannel.SetString("/yell");
6773
break;
6874

6975
case not null when CrossWorldLinkshellLong().IsMatch(inputString) && inputString.Length > 12: {
7076
if (int.TryParse(inputString[12..13], out var result)) {
7177
RaptureShellModule.Instance()->ChatType = result + 8;
78+
RaptureShellModule.Instance()->CurrentChannel.SetString($"/cwl{result}");
7279
}
7380
break;
7481
}
7582

7683
case not null when CrossWorldLinkshellShort().IsMatch(inputString) && inputString.Length > 4: {
7784
if (int.TryParse(inputString[4..5], out var result)) {
7885
RaptureShellModule.Instance()->ChatType = result + 8;
86+
RaptureShellModule.Instance()->CurrentChannel.SetString($"/cwl{result}");
7987
}
8088
break;
8189
}
8290

8391
case not null when LinkshellLong().IsMatch(inputString) && inputString.Length > 10: {
8492
if (int.TryParse(inputString[10..11], out var result)) {
8593
RaptureShellModule.Instance()->ChatType = result + 18;
94+
RaptureShellModule.Instance()->CurrentChannel.SetString($"/linkshell{result}");
8695
}
8796
break;
8897
}
8998

9099
case not null when LinkshellShort().IsMatch(inputString) && inputString.Length > 2: {
91100
if (int.TryParse(inputString[2..3], out var result)) {
92101
RaptureShellModule.Instance()->ChatType = result + 18;
102+
RaptureShellModule.Instance()->CurrentChannel.SetString($"/linkshell{result}");
93103
}
94104
break;
95105
}

0 commit comments

Comments
 (0)