Browse Source

Mobbases don't need skills.

master
MagicBot 2 years ago
parent
commit
60a9f14aa3
  1. 27
      src/engine/objects/Mob.java
  2. 16
      src/engine/objects/MobBaseStats.java

27
src/engine/objects/Mob.java

@ -918,32 +918,6 @@ public class Mob extends AbstractIntelligenceAgent {
Mob.mobMapByDBID.put(this.dbID, this); 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 * Getters
*/ */
@ -2106,7 +2080,6 @@ public class Mob extends AbstractIntelligenceAgent {
try { try {
NPCManager.applyRuneSetEffects(this); NPCManager.applyRuneSetEffects(this);
initializeSkills();
recalculateStats(); recalculateStats();
this.setHealth(this.healthMax); this.setHealth(this.healthMax);

16
src/engine/objects/MobBaseStats.java

@ -12,8 +12,6 @@ package engine.objects;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
public class MobBaseStats { public class MobBaseStats {
private final int baseStr; private final int baseStr;
@ -21,8 +19,6 @@ public class MobBaseStats {
private final int baseCon; private final int baseCon;
private final int baseSpi; private final int baseSpi;
private final int baseDex; private final int baseDex;
private final long skillSet;
private final int skillValue;
public static MobBaseStats mbs = null; public static MobBaseStats mbs = null;
@ -35,8 +31,6 @@ public class MobBaseStats {
this.baseCon = rs.getInt("Constitution"); this.baseCon = rs.getInt("Constitution");
this.baseSpi = rs.getInt("Spirit"); this.baseSpi = rs.getInt("Spirit");
this.baseDex = rs.getInt("Dexterity"); 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.baseCon = 0;
this.baseSpi = 0; this.baseSpi = 0;
this.baseDex = 0; this.baseDex = 0;
this.skillSet = 0;
this.skillValue = 0;
} }
public int getBaseStr() { public int getBaseStr() {
return baseStr; return baseStr;
@ -76,14 +68,6 @@ public class MobBaseStats {
return baseDex; return baseDex;
} }
public long getSkillSet() {
return skillSet;
}
public int getSkillValue() {
return skillValue;
}
public static MobBaseStats GetGenericStats(){ public static MobBaseStats GetGenericStats(){
if (mbs != null) if (mbs != null)
return mbs; return mbs;

Loading…
Cancel
Save