Skip to content

Commit 41cf996

Browse files
erwan-jolyclaude
andauthored
fix: AscrPacket leading-blank field (20.0.2) (#460)
vanosilla UiPacketExtension emits `ascr <CurrentKill> ...` with a literal double space after the header. Adds a LeadingBlank field (non-nullable, defaults to empty string) at index 0 and shifts all other indices by +1. Same fix pattern as NsTeSTPacket (20.0.1) and SqstPacket. No in-tree consumer uses AscrPacket, so this ships as a patch. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 375f70f commit 41cf996

2 files changed

Lines changed: 40 additions & 37 deletions

File tree

src/NosCore.Packets/NosCore.Packets.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<RepositoryUrl>https://github.com/NosCoreIO/NosCore.Packets.git</RepositoryUrl>
1313
<PackageIconUrl></PackageIconUrl>
1414
<PackageTags>nostale, noscore, chickenapi, nostale private server source, nostale emulator</PackageTags>
15-
<Version>20.0.1</Version>
15+
<Version>20.0.2</Version>
1616
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1717
<Description>NosCore's Packets (Nostale packets) defined over classes</Description>
1818
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
1-
using NosCore.Packets.Attributes;
2-
using NosCore.Packets.Enumerations;
3-
4-
namespace NosCore.Packets.ServerPackets.UI
5-
{
6-
[PacketHeader("ascr", Scope.InGame)]
7-
public class AscrPacket : PacketBase
8-
{
9-
[PacketIndex(0)]
10-
public int CurrentKill { get; set; }
11-
12-
[PacketIndex(1)]
13-
public int CurrentDie { get; set; }
14-
15-
[PacketIndex(2)]
16-
public int CurrentTc { get; set; }
17-
18-
[PacketIndex(3)]
19-
public int ArenaKill { get; set; }
20-
21-
[PacketIndex(4)]
22-
public int ArenaDie { get; set; }
23-
24-
[PacketIndex(5)]
25-
public int ArenaTc { get; set; }
26-
27-
[PacketIndex(6)]
28-
public int KillGroup { get; set; }
29-
30-
[PacketIndex(7)]
31-
public int DieGroup { get; set; }
32-
33-
[PacketIndex(8)]
34-
public AscrPacketType Type { get; set; }
35-
}
36-
}
1+
using NosCore.Packets.Attributes;
2+
using NosCore.Packets.Enumerations;
3+
4+
namespace NosCore.Packets.ServerPackets.UI
5+
{
6+
[PacketHeader("ascr", Scope.InGame)]
7+
public class AscrPacket : PacketBase
8+
{
9+
[PacketIndex(0)]
10+
public string LeadingBlank { get; set; } = string.Empty;
11+
12+
[PacketIndex(1)]
13+
public int CurrentKill { get; set; }
14+
15+
[PacketIndex(2)]
16+
public int CurrentDie { get; set; }
17+
18+
[PacketIndex(3)]
19+
public int CurrentTc { get; set; }
20+
21+
[PacketIndex(4)]
22+
public int ArenaKill { get; set; }
23+
24+
[PacketIndex(5)]
25+
public int ArenaDie { get; set; }
26+
27+
[PacketIndex(6)]
28+
public int ArenaTc { get; set; }
29+
30+
[PacketIndex(7)]
31+
public int KillGroup { get; set; }
32+
33+
[PacketIndex(8)]
34+
public int DieGroup { get; set; }
35+
36+
[PacketIndex(9)]
37+
public AscrPacketType Type { get; set; }
38+
}
39+
}

0 commit comments

Comments
 (0)