From e0b5f914d85dacd1b6e40a9211f13e64e45d4bff Mon Sep 17 00:00:00 2001 From: Jules Date: Thu, 6 Nov 2025 11:12:57 +0100 Subject: [PATCH] Sync attribute and skill reallocation pts --- .../api/player/profess/SavedClassInformation.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/SavedClassInformation.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/SavedClassInformation.java index 7e0f68f9..bd940af3 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/SavedClassInformation.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/SavedClassInformation.java @@ -316,7 +316,11 @@ public class SavedClassInformation implements ClassDataContainer { // Patch player data /////////////////////////////////////////////// - final int targetLevel, targetSkillPoints, targetAttributePoints; + final int targetLevel, + targetSkillPoints, + targetAttributePoints, + targetSkillReallocationPoints, + targetAttributeReallocationPoints; final double targetExp; // Fetch info from last class @@ -325,6 +329,8 @@ public class SavedClassInformation implements ClassDataContainer { targetExp = lastClassPlayed.experience; targetSkillPoints = lastClassPlayed.skillPoints + lastClassPlayed.countSpentSkillPoints() - this.countSpentSkillPoints(); targetAttributePoints = lastClassPlayed.attributePoints + lastClassPlayed.countSpentAttributePoints() - this.countSpentAttributePoints(); + targetSkillReallocationPoints = lastClassPlayed.skillReallocationPoints; + targetAttributeReallocationPoints = lastClassPlayed.attributeReallocationPoints; } // Fetch info from saved class info @@ -333,6 +339,8 @@ public class SavedClassInformation implements ClassDataContainer { targetExp = experience; targetSkillPoints = this.skillPoints; targetAttributePoints = this.attributePoints; + targetSkillReallocationPoints = this.skillReallocationPoints; + targetAttributeReallocationPoints = this.attributeReallocationPoints; } /////////////////////////////////////////////// @@ -343,9 +351,9 @@ public class SavedClassInformation implements ClassDataContainer { player.setExperience(targetExp); player.setSkillPoints(targetSkillPoints); player.setAttributePoints(targetAttributePoints); - player.setAttributeReallocationPoints(attributeReallocationPoints); + player.setSkillReallocationPoints(targetSkillReallocationPoints); + player.setAttributeReallocationPoints(targetAttributeReallocationPoints); player.setSkillTreeReallocationPoints(skillTreeReallocationPoints); - player.setSkillReallocationPoints(skillReallocationPoints); player.setUnlockedItems(unlockedItems); player.setClass(profess); for (int slot : boundSkills.keySet()) {