static_npc_mobbase_stats.baseSkills never matches a static_skill_skillsbase token on dev (2007496699 on 2208 rows is no known skill hash and is absent from the client), so applyMobbaseSkill never added a skill and only cost a skillsbase query per mob spawn. No value changes. Nothing reads the baseSkills/skillAmount columns now; the table goes in 3.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
87 lines
2.6 KiB
Java
87 lines
2.6 KiB
Java
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
// Magicbane Emulator Project © 2013 - 2026
|
|
// https://www.magicbane.com
|
|
|
|
|
|
package engine.objects;
|
|
|
|
import engine.mbEnums;
|
|
import engine.parsers.objects.RuneTemplate;
|
|
|
|
import java.sql.ResultSet;
|
|
import java.sql.SQLException;
|
|
|
|
public class MobBaseStats {
|
|
|
|
public static MobBaseStats mbs = null;
|
|
private final int baseStr;
|
|
private final int baseInt;
|
|
private final int baseCon;
|
|
private final int baseSpi;
|
|
private final int baseDex;
|
|
|
|
|
|
/**
|
|
* ResultSet Constructor
|
|
*/
|
|
public MobBaseStats(ResultSet rs) throws SQLException {
|
|
this.baseStr = rs.getInt("Strength");
|
|
this.baseInt = rs.getInt("Intelligence");
|
|
this.baseCon = rs.getInt("Constitution");
|
|
this.baseSpi = rs.getInt("Spirit");
|
|
this.baseDex = rs.getInt("Dexterity");
|
|
}
|
|
|
|
public MobBaseStats(RuneTemplate rune) {
|
|
this.baseStr = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Strength, 0);
|
|
this.baseInt = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Intelligence, 0);
|
|
this.baseCon = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Constitution, 0);
|
|
this.baseSpi = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Spirit, 0);
|
|
this.baseDex = rune.rune_attr_adj.getOrDefault(mbEnums.AttributeType.Dexterity, 0);
|
|
}
|
|
|
|
/**
|
|
* Generic Constructor
|
|
*/
|
|
|
|
public MobBaseStats() {
|
|
this.baseStr = 0;
|
|
this.baseInt = 0;
|
|
this.baseCon = 0;
|
|
this.baseSpi = 0;
|
|
this.baseDex = 0;
|
|
}
|
|
|
|
public static MobBaseStats GetGenericStats() {
|
|
if (mbs != null)
|
|
return mbs;
|
|
mbs = new MobBaseStats();
|
|
return mbs;
|
|
}
|
|
|
|
public int getBaseStr() {
|
|
return baseStr;
|
|
}
|
|
|
|
public int getBaseInt() {
|
|
return baseInt;
|
|
}
|
|
|
|
public int getBaseCon() {
|
|
return baseCon;
|
|
}
|
|
|
|
public int getBaseSpi() {
|
|
return baseSpi;
|
|
}
|
|
|
|
public int getBaseDex() {
|
|
return baseDex;
|
|
}
|
|
|
|
}
|