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

16
src/engine/objects/MobBaseStats.java

@ -12,8 +12,6 @@ package engine.objects; @@ -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 { @@ -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 { @@ -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 { @@ -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;
@ -76,14 +68,6 @@ public class MobBaseStats { @@ -76,14 +68,6 @@ public class MobBaseStats {
return baseDex;
}
public long getSkillSet() {
return skillSet;
}
public int getSkillValue() {
return skillValue;
}
public static MobBaseStats GetGenericStats(){
if (mbs != null)
return mbs;

Loading…
Cancel
Save