extend skill unlock packet to include ability type and improve logout handling logic

This commit is contained in:
2026-05-21 16:32:11 +02:00
parent 30310b6eb9
commit bf4452f6ac
7 changed files with 32 additions and 15 deletions
@@ -44,7 +44,7 @@ public class ServerboundUnlockNodePacket {
PacketHandler.syncSkillsTo(player);
PacketHandler.CHANNEL.send(
PacketDistributor.PLAYER.with(() -> player),
new ClientboundNodeUnlockedPacket(node.getId(), data.getSkillPoints())
new ClientboundNodeUnlockedPacket(node.getId(), data.getSkillPoints(), false)
);
} else {
SkillEngine.LOGGER.info("[SKILLENGINE] Rejecting unlock for {}", node.getId());
@@ -57,7 +57,7 @@ public class ServerboundUnlockNodePacket {
PacketHandler.syncSkillsTo(player);
PacketHandler.CHANNEL.send(
PacketDistributor.PLAYER.with(() -> player),
new ClientboundNodeUnlockedPacket(ability.getId(), data.getSkillPoints())
new ClientboundNodeUnlockedPacket(ability.getId(), data.getSkillPoints(), true)
);
} else {
SkillEngine.LOGGER.info("[SKILLENGINE] Rejecting ability unlock for {}", ability.getId());