Skip to content

Commit b1cc584

Browse files
erwan-jolyclaude
andauthored
Extend SuPacket to match official shape (TargetCurrentHp/TargetMaxHp) (#436)
Every captured su packet from a live official session has 17 values after the header, not 15: su 3 2847 2 1454174 0 12 11 200 0 0 1 100 3 0 0 21447 21450 su 1 14293841 3 2847 240 7 11 257 0 0 1 175 0 4 0 175 175 The two new trailing integers carry the target's absolute HP for player targets (21447/21450 ≈ real hp/maxhp). Monster targets ship display-scaled values (0/175 on normal hits, max/max on the killing blow). Without them the client parser misaligns and the kill-hit collapse animation never plays. Add TargetCurrentHp / TargetMaxHp as indices 15/16. No test refresh needed — none exercise SuPacket serialization. Bump to 16.6.0 on top of the 16.5.0 JobClass addition. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 198a0b2 commit b1cc584

2 files changed

Lines changed: 7 additions & 1 deletion

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>16.5.0</Version>
15+
<Version>16.6.0</Version>
1616
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1717
<Description>NosCore's Packets (Nostale packets) defined over classes</Description>
1818
<PackageLicenseExpression>MIT</PackageLicenseExpression>

src/NosCore.Packets/ServerPackets/Battle/SuPacket.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,11 @@ public class SuPacket : PacketBase
5757

5858
[PacketIndex(14)]
5959
public int SkillTypeMinusOne { get; set; }
60+
61+
[PacketIndex(15)]
62+
public int TargetCurrentHp { get; set; }
63+
64+
[PacketIndex(16)]
65+
public int TargetMaxHp { get; set; }
6066
}
6167
}

0 commit comments

Comments
 (0)