From 60a9f14aa31d9598f0edb2db8b1b01d86caf165a Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 29 Mar 2023 18:52:36 -0400 Subject: [PATCH] Mobbases don't need skills. --- src/engine/objects/Mob.java | 27 --------------------------- src/engine/objects/MobBaseStats.java | 16 ---------------- 2 files changed, 43 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 0bc25e34..8f1fb8e1 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -918,32 +918,6 @@ public class Mob extends AbstractIntelligenceAgent { Mob.mobMapByDBID.put(this.dbID, this); } - private void initializeSkills() { - - if (this.mobBase.getMobBaseStats() == null) - return; - - long skillVector = this.mobBase.getMobBaseStats().getSkillSet(); - int skillValue = this.mobBase.getMobBaseStats().getSkillValue(); - - if (this.mobBase.getObjectUUID() >= 17233) { - for (CharacterSkills cs : CharacterSkills.values()) { - SkillsBase sb = DbManager.SkillsBaseQueries.GET_BASE_BY_TOKEN(cs.getToken()); - CharacterSkill css = new CharacterSkill(sb, this, 50); - this.skills.put(sb.getName(), css); - } - } else { - for (CharacterSkills cs : CharacterSkills.values()) { - if ((skillVector & cs.getFlag()) != 0) { - SkillsBase sb = DbManager.SkillsBaseQueries.GET_BASE_BY_TOKEN(cs.getToken()); - CharacterSkill css = new CharacterSkill(sb, this, skillValue); - this.skills.put(sb.getName(), css); - } - } - } - } - - /* * Getters */ @@ -2106,7 +2080,6 @@ public class Mob extends AbstractIntelligenceAgent { try { NPCManager.applyRuneSetEffects(this); - initializeSkills(); recalculateStats(); this.setHealth(this.healthMax); diff --git a/src/engine/objects/MobBaseStats.java b/src/engine/objects/MobBaseStats.java index 60a4681a..95ba2f7c 100644 --- a/src/engine/objects/MobBaseStats.java +++ b/src/engine/objects/MobBaseStats.java @@ -12,8 +12,6 @@ package engine.objects; import java.sql.ResultSet; import java.sql.SQLException; - - public class MobBaseStats { private final int baseStr; @@ -21,8 +19,6 @@ public class MobBaseStats { private final int baseCon; private final int baseSpi; private final int baseDex; - private final long skillSet; - private final int skillValue; public static MobBaseStats mbs = null; @@ -35,8 +31,6 @@ public class MobBaseStats { this.baseCon = rs.getInt("Constitution"); this.baseSpi = rs.getInt("Spirit"); this.baseDex = rs.getInt("Dexterity"); - this.skillSet = rs.getLong("baseSkills"); - this.skillValue = rs.getInt("skillAmount"); } /** @@ -49,8 +43,6 @@ public class MobBaseStats { this.baseCon = 0; this.baseSpi = 0; this.baseDex = 0; - this.skillSet = 0; - this.skillValue = 0; } public int getBaseStr() { return baseStr; @@ -75,14 +67,6 @@ public class MobBaseStats { public int getBaseDex() { return baseDex; } - - public long getSkillSet() { - return skillSet; - } - - public int getSkillValue() { - return skillValue; - } public static MobBaseStats GetGenericStats(){ if (mbs != null)