Reworked CharacterSkill enum.

This commit is contained in:
2024-02-23 11:58:56 -05:00
parent 62e13ade01
commit 4e2578f3e0
2 changed files with 96 additions and 110 deletions
+3 -8
View File
@@ -10,7 +10,6 @@
package engine.objects;
import engine.Enum;
import engine.Enum.CharacterSkills;
import engine.Enum.ModType;
import engine.Enum.SourceType;
import engine.gameManager.DbManager;
@@ -195,8 +194,6 @@ public class CharacterSkill extends AbstractGameObject {
private SkillsBase skillsBase;
private AtomicInteger numTrains = new AtomicInteger();
private CharacterSkills skillType;
//Skill% before trains and before any effects or item bonuses
private float baseAmountBeforeMods;
@@ -224,7 +221,6 @@ public class CharacterSkill extends AbstractGameObject {
this.ownerUID = pc.getObjectUUID();
calculateBaseAmount();
calculateModifiedAmount(false);
this.skillType = CharacterSkills.GetCharacterSkillByToken(this.skillsBase.getToken());
}
/**
@@ -239,7 +235,7 @@ public class CharacterSkill extends AbstractGameObject {
this.trained = true;
calculateBaseAmount();
calculateModifiedAmount(false);
this.skillType = CharacterSkills.GetCharacterSkillByToken(this.skillsBase.getToken());
}
@@ -255,7 +251,7 @@ public class CharacterSkill extends AbstractGameObject {
this.ownerUID = pc.getObjectUUID();
calculateBaseAmount();
calculateModifiedAmount(false);
this.skillType = CharacterSkills.GetCharacterSkillByToken(this.skillsBase.getToken());
}
public CharacterSkill(SkillsBase sb, Mob mob, int trains) {
@@ -267,7 +263,7 @@ public class CharacterSkill extends AbstractGameObject {
boolean isGuard = mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN) || mob.agentType.equals(Enum.AIAgentType.GUARDMINION);
calculateMobBaseAmount(isGuard);
calculateModifiedAmount(isGuard);
this.skillType = CharacterSkills.GetCharacterSkillByToken(this.skillsBase.getToken());
}
public CharacterSkill(ResultSet rs) throws SQLException {
@@ -279,7 +275,6 @@ public class CharacterSkill extends AbstractGameObject {
// this.owner = DbManager.PlayerCharacterQueries.GET_PLAYER_CHARACTER(rs.getInt("CharacterID"));
calculateBaseAmount();
calculateModifiedAmount(false);
this.skillType = CharacterSkills.GetCharacterSkillByToken(this.skillsBase.getToken());
}
public static AbstractCharacter GetOwner(CharacterSkill cs) {