Load MobBaseStats from the race rune's rune_attr_adj

Parity (scripts/p32.py, static_npc_mobbase_stats by loadID vs rune_attr_adj):
2301 of 2375 mobbases identical. 74 have no stats row and went from all-zero
stats to the rune values: CSR 2020/2021, summoner pets 12024-12035 and
13266-13301, clay constructs 12200-12202/12375/12382, Guard 13170 (not spawned
or contracted), necro undead 13339-13348, and 13961, 14167, 14168, 14260-14262,
14285, 14292. On dev 47 obj_mob spawns use these (13343, 14167, 14168, 14285,
14292). Effect: higher rune skill values for these mobs via CharacterSkill.
LOAD_STATS stays until the table is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-23 14:32:59 -04:00
1 parent ccc9d9f0ed
commit 06a421de0f
2 files changed
+14 -1

No files matched your search

+1 -1
View File
@@ -117,7 +117,7 @@ public class MobBase extends AbstractGameObject {
if (this.flags.contains(mbEnums.MobFlagType.RAT))
this.mask += MBServerStatics.MASK_RAT;
this.mobBaseStats = DbManager.MobBaseQueries.LOAD_STATS(this.loadID);
this.mobBaseStats = (rune != null) ? new MobBaseStats(rune) : MobBaseStats.GetGenericStats();
DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_SPEEDS(this);
//load effects for mobbase
this.effectsList = DbManager.MobBaseQueries.GET_RUNEBASE_EFFECTS(this.loadID);
+13
View File
@@ -9,6 +9,9 @@
package engine.objects;
import engine.mbEnums;
import engine.parsers.objects.RuneTemplate;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -38,6 +41,16 @@ public class MobBaseStats {
this.mobbaseSkillAmount = rs.getInt("skillAmount");
}
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);
this.mobbaseSkill = 0;
this.mobbaseSkillAmount = 0;
}
/**
* Generic Constructor
*/