Log the loaded mobbase count, split into rune and server-made rows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-23 13:31:49 -04:00
1 parent c74cb127dc
commit c811ba9f4e
1 file changed
+10
@@ -15,6 +15,7 @@ import engine.mbEnums.GameObjectType;
import engine.objects.MobBase;
import engine.objects.MobBaseEffects;
import engine.objects.MobBaseStats;
import engine.parsers.objects.RuneTemplate;
import org.pmw.tinylog.Logger;
import java.sql.Connection;
@@ -59,6 +60,7 @@ public class dbMobBaseHandler extends dbHandlerBase {
public ArrayList<MobBase> GET_ALL_MOBBASES() {
ArrayList<MobBase> mobbaseList = new ArrayList<>();
int runeCount = 0;
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase`;")) {
@@ -69,6 +71,14 @@ public class dbMobBaseHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
}
for (MobBase mobBase : mobbaseList)
if (mobBase.getObjectUUID() == mobBase.getLoadID() && RuneTemplate._runes.containsKey(mobBase.getLoadID()))
runeCount++;
Logger.info("Loaded " + mobbaseList.size() + " mobbases: " + runeCount + " from runes, "
+ (mobbaseList.size() - runeCount) + " server-made from the DB");
return mobbaseList;
}