From 4e1455be7f5612f829db594803860abc919342b7 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 31 Mar 2023 10:01:59 -0400 Subject: [PATCH] Hunt for more fidality insanity. --- src/engine/db/handlers/dbMobHandler.java | 95 ------------------------ src/engine/server/world/WorldServer.java | 4 - 2 files changed, 99 deletions(-) diff --git a/src/engine/db/handlers/dbMobHandler.java b/src/engine/db/handlers/dbMobHandler.java index e98705c5..579a2552 100644 --- a/src/engine/db/handlers/dbMobHandler.java +++ b/src/engine/db/handlers/dbMobHandler.java @@ -219,99 +219,4 @@ public class dbMobHandler extends dbHandlerBase { return getResult(); } - - public static boolean COPY_ZONE_MOBILES(PlayerCharacter pc, Zone sourceZone, Zone targetZone) { - - ArrayList sourceMobList; - Vector3fImmutable worldDelta; - Mob newMobile; - - // Sanity check. Can't copy a non existent zone - - if ((sourceZone == null) || (targetZone == null)) - return false; - - // Generate collections for all buildings in each zone - - - for (Mob mobile : sourceZone.zoneMobSet) { - - // Calculate world coordinate offset between zones - - worldDelta = new Vector3fImmutable(targetZone.getAbsX(), targetZone.getAbsY(), targetZone.getAbsZ()); - worldDelta = worldDelta.subtract(new Vector3fImmutable(sourceZone.getAbsX(), sourceZone.getAbsY(), sourceZone.getAbsZ())); - - newMobile = Mob.createMob(mobile.getLoadID(), - mobile.getLoc().add(worldDelta), null, true, targetZone, mobile.building, 0); - - if (newMobile != null) { - newMobile.updateDatabase(); - } - - } - - return true; - } - - - public void LOAD_RUNES_FOR_FIDELITY_MOBS() { - - - - - - prepareCallable("SELECT static_zone_npc.npcID,static_zone_npc.loadNum, static_zone_npc.classID, static_zone_npc.professionID, static_zone_npc.extraRune, static_zone_npc.extraRune2 FROM static_zone_npc ; "); - - try { - ResultSet rs = executeQuery(); - - while (rs.next()) { - - - int loadNum = rs.getInt("loadNum"); - int fidelityID = rs.getInt("npcID"); - int classID = rs.getInt("classID"); - int professionID = rs.getInt("professionID"); - int extraRune = rs.getInt("extraRune"); - int extraRune2 = rs.getInt("extraRune2"); - - if (WorldServer.ZoneFidelityMobRunes.get(loadNum) == null) - WorldServer.ZoneFidelityMobRunes.put(loadNum, new HashMap<>()); - ArrayList runeList; - if (WorldServer.ZoneFidelityMobRunes.get(loadNum).get(fidelityID) == null){ - runeList = new ArrayList<>(4); - }else - runeList = WorldServer.ZoneFidelityMobRunes.get(loadNum).get(fidelityID); - - - - if (classID != 0) - runeList.add(classID); - if (professionID != 0) - runeList.add(professionID); - if(extraRune != 0) - runeList.add(extraRune); - - if (extraRune2 != 0) - runeList.add(extraRune2); - - WorldServer.ZoneFidelityMobRunes.get(loadNum).put(fidelityID, runeList); - - - } - - rs.close(); - - - - } catch (SQLException e) { - Logger.error( e.toString()); - } finally { - closeCallable(); - - } - - } - - } diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index bef15898..f8d5146c 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -74,7 +74,6 @@ public class WorldServer { // Member variable declaration - public static HashMap>> ZoneFidelityMobRunes = new HashMap<>(); public WorldServer() { super(); } @@ -296,9 +295,6 @@ public class WorldServer { Logger.info("Loading Gold Loot for Mobbases"); MobbaseGoldEntry.LoadMobbaseGold(); - Logger.info("Loading fidelity mob runes."); - DbManager.MobQueries.LOAD_RUNES_FOR_FIDELITY_MOBS(); - //load lootTable Logger.info("Loading Loot Tables"); LootTable.populateLootTables();