Skip to content

Commit e9cbda2

Browse files
committed
workflow fix and NsTeST channel ids
1 parent 3ba54e9 commit e9cbda2

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup .NET
2020
uses: actions/setup-dotnet@v3
2121
with:
22-
dotnet-version: 7.0.x
22+
dotnet-version: 8.0.x
2323
- name: Restore dependencies
2424
run: dotnet restore
2525
- name: Build

src/Noskito.Login/Packet/Server/Authentication/NsTeST.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,21 @@ public class NsTeSTCreator : SPacketCreator<NsTeST>
2424
{
2525
protected override string CreatePacket(NsTeST source)
2626
{
27-
//later make this properly :D
27+
string lastGroup = string.Empty;
28+
int worldGroupCount = 0;
29+
2830
var packet = $"NsTeST {source.RegionId} {source.Account} -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 -99 0 {source.EncryptionKey} ";
29-
foreach (var server in source.Servers)
30-
packet += $"{server.Host}:{server.Port}:{server.Color}:{server.Id}.{server.Count}.{server.Name} ";
31+
foreach (var server in source.Servers )
32+
{
33+
if (lastGroup != server.Name)
34+
{
35+
worldGroupCount++;
36+
}
3137

38+
packet += $"{server.Host}:{server.Port}:{server.Color}:{server.Id}.{worldGroupCount}.{server.Name} ";
39+
//{server.Count} instead of {worldGroupCount} need look why it shows channel 0
40+
}
41+
//yea i know it looks bad but :D
3242
packet += "-1:-1:-1:10000.10000.1";
3343

3444
return packet;

0 commit comments

Comments
 (0)