Hunt for more fidality insanity.
This commit is contained in:
@@ -219,99 +219,4 @@ public class dbMobHandler extends dbHandlerBase {
|
||||
return getResult();
|
||||
}
|
||||
|
||||
|
||||
public static boolean COPY_ZONE_MOBILES(PlayerCharacter pc, Zone sourceZone, Zone targetZone) {
|
||||
|
||||
ArrayList<Mob> 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<Integer> 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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,6 @@ public class WorldServer {
|
||||
|
||||
// Member variable declaration
|
||||
|
||||
public static HashMap<Integer,HashMap<Integer,ArrayList<Integer>>> 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();
|
||||
|
||||
Reference in New Issue
Block a user