skills cleared when changing class

This commit is contained in:
Indyuce 2021-08-25 21:36:51 +02:00
parent 8378babd83
commit bd859399d1

View File

@ -751,11 +751,12 @@ public class PlayerData extends OfflinePlayerData {
public void setClass(PlayerClass profess) {
this.profess = profess;
// for (Iterator<SkillInfo> iterator = boundSkills.iterator();
// iterator.hasNext();)
// if (!getProfess().hasSkill(iterator.next().getSkill()))
// iterator.remove();
// Clear old skills
for (Iterator<SkillInfo> iterator = boundSkills.iterator(); iterator.hasNext(); )
if (!getProfess().hasSkill(iterator.next().getSkill()))
iterator.remove();
// Update stats
getStats().updateStats();
}