Load mob effects from the race rune's item_user_power_action

MobBase now takes its effects from MobBaseEffects.getEffectsForRune (the
2.10b builder) and adds the DB rows the rune doesn't have on top.

Parity (scripts/p34.py, 2375 mobbases): 1028 identical, 1344 empty on
both sides, 3 with server-only DB rows that stay in the DB:
- 12021 Grobones, 12022 Wight: 50 NECROPETSTATS rows each
- 13236 Wild Boar: PEACE rank 40, reqLvl 1
No value changes. Effect order does not matter: applyMobbaseEffects keeps
the highest eligible rank per effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-23 14:54:19 -04:00
1 parent 063ebb9717
commit 4bf3cf9a27
2 files changed
+25 -2

No files matched your search

+6 -2
View File
@@ -122,8 +122,12 @@ public class MobBase extends AbstractGameObject {
this.mask += MBServerStatics.MASK_RAT;
this.mobBaseStats = (rune != null) ? new MobBaseStats(rune) : MobBaseStats.GetGenericStats();
//load effects for mobbase
this.effectsList = DbManager.MobBaseQueries.GET_RUNEBASE_EFFECTS(this.loadID);
this.effectsList = new ArrayList<>(MobBaseEffects.getEffectsForRune(this.loadID));
// Server-made rows with no rune entry: NECROPETSTATS on 12021/12022, Wild Boar 13236 PEACE
for (MobBaseEffects serverEffect : DbManager.MobBaseQueries.GET_RUNEBASE_EFFECTS(this.loadID))
if (!this.effectsList.contains(serverEffect))
this.effectsList.add(serverEffect);
}
+19
View File
@@ -19,6 +19,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
@@ -115,5 +116,23 @@ public class MobBaseEffects {
return reqLvl;
}
@Override
public boolean equals(Object other) {
if (this == other)
return true;
if (!(other instanceof MobBaseEffects))
return false;
MobBaseEffects effect = (MobBaseEffects) other;
return this.token == effect.token && this.rank == effect.rank && this.reqLvl == effect.reqLvl;
}
@Override
public int hashCode() {
return Objects.hash(this.token, this.rank, this.reqLvl);
}
}