Compare commits

..

1 Commits

4 changed files with 6 additions and 21 deletions
+1 -5
View File
@@ -243,12 +243,8 @@ public class dbNPCHandler extends dbHandlerBase {
public boolean UPDATE_EQUIPSET(NPC npc, int equipSetID) {
// Column name must match what NPC/Mob loaders read ("equipmentSet").
// Using the wrong column here causes the update to fail silently and
// dev command to report "Unable to find Equipset" despite a valid ID.
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_npc` SET `equipmentSet`=? WHERE `UID`=?")) {
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_npc` SET `equipsetID`=? WHERE `UID`=?")) {
preparedStatement.setInt(1, equipSetID);
preparedStatement.setLong(2, npc.getObjectUUID());
+1 -11
View File
@@ -541,18 +541,8 @@ public class Mob extends AbstractIntelligenceAgent {
mobWithoutID.parentZone = parent;
mobWithoutID.parentZoneID = parent.getObjectUUID();
// Ensure spawn coordinates are persisted for DB insert
// statLat/statAlt/statLon represent local (zone-relative) spawn
// coordinates used by the DB handler when creating the mob row.
if (spawn != null && parent != null) {
// Convert world coordinates to zone-local spawn coordinates
Vector3fImmutable localSpawn = spawn.subtract(parent.getLoc());
mobWithoutID.statLat = localSpawn.x;
mobWithoutID.statAlt = localSpawn.y;
mobWithoutID.statLon = localSpawn.z;
}
// NPC in a Building derives position from slot
if (mobWithoutID.building != null)
mobWithoutID.bindLoc = Vector3fImmutable.ZERO;
+1 -2
View File
@@ -470,8 +470,7 @@ public class NPC extends AbstractCharacter {
newNPC.bindLoc = Vector3fImmutable.ZERO;
newNPC.parentZoneUUID = parent.getObjectUUID();
// guild may be null when spawning via ./npc; default to 0
newNPC.guildUUID = (guild != null) ? guild.getObjectUUID() : 0;
newNPC.guildUUID = guild.getObjectUUID();
if (building == null)
newNPC.buildingUUID = 0;
+1 -1
View File
@@ -379,7 +379,7 @@ public class MBServerStatics {
// Mine related
public static final int MINE_EARLY_WINDOW = 16; // 4pm
public static final int MINE_LATE_WINDOW = 0; // Midnight
public static boolean DEBUG_PROTOCOL = false;
public static boolean DEBUG_PROTOCOL = true;
public static int SPATIAL_HASH_BUCKETSX = 16384;
public static int SPATIAL_HASH_BUCKETSY = 12288;
public static float MAX_PLAYER_X_LOC = 129999;