From 8a8136b8e8b5d838e245d021e10105c4d1927991 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 17 May 2023 15:18:47 -0400 Subject: [PATCH] Unused methods. --- src/engine/db/handlers/dbCityHandler.java | 7 ----- src/engine/db/handlers/dbNPCHandler.java | 35 ----------------------- 2 files changed, 42 deletions(-) diff --git a/src/engine/db/handlers/dbCityHandler.java b/src/engine/db/handlers/dbCityHandler.java index 13101ffe..0eb319bc 100644 --- a/src/engine/db/handlers/dbCityHandler.java +++ b/src/engine/db/handlers/dbCityHandler.java @@ -186,11 +186,4 @@ public class dbCityHandler extends dbHandlerBase { return (executeUpdate() > 0); } - public boolean DELETE_CITY(final City city) { - - prepareCallable("DELETE FROM `object` WHERE `UID` = ? AND `type` = 'city'"); - setInt(1, city.getObjectUUID()); - return (executeUpdate() != 0); - } - } diff --git a/src/engine/db/handlers/dbNPCHandler.java b/src/engine/db/handlers/dbNPCHandler.java index bd3b539e..49b4b082 100644 --- a/src/engine/db/handlers/dbNPCHandler.java +++ b/src/engine/db/handlers/dbNPCHandler.java @@ -75,18 +75,6 @@ public class dbNPCHandler extends dbHandlerBase { return getLargeObjectList(); } - public ArrayList GET_ALL_NPCS() { - prepareCallable("SELECT `obj_npc`.*, `object`.`parent` FROM `object` INNER JOIN `obj_npc` ON `obj_npc`.`UID` = `object`.`UID`;"); - - return getObjectList(); - } - - public ArrayList GET_NPCS_BY_BUILDING(final int buildingID) { - prepareCallable("SELECT `obj_npc`.*, `object`.`parent` FROM `obj_npc` INNER JOIN `object` ON `obj_npc`.`UID` = `object`.`UID` WHERE `npc_buildingID` = ? LIMIT 3"); - setInt(1, buildingID); - return getObjectList(); - } - public NPC GET_NPC(final int objectUUID) { prepareCallable("SELECT `obj_npc`.*, `object`.`parent` FROM `object` INNER JOIN `obj_npc` ON `obj_npc`.`UID` = `object`.`UID` WHERE `object`.`UID` = ?;"); setLong(1, (long) objectUUID); @@ -142,8 +130,6 @@ public class dbNPCHandler extends dbHandlerBase { public boolean updateUpgradeTime(NPC npc, DateTime upgradeDateTime) { - - try { prepareCallable("UPDATE obj_npc SET upgradeDate=? " @@ -163,27 +149,6 @@ public class dbNPCHandler extends dbHandlerBase { return true; } - public boolean UPDATE_BUY_PROFIT(NPC npc,float percent) { - prepareCallable("UPDATE `obj_npc` SET `npc_buyPercent`=? WHERE `UID`=?"); - setFloat(1, percent); - setLong(2, npc.getObjectUUID()); - return (executeUpdate() > 0); - } - - public boolean UPDATE_SELL_PROFIT(NPC npc,float percent) { - prepareCallable("UPDATE `obj_npc` SET `npc_sellPercent`=? WHERE `UID`=?"); - setFloat(1, percent); - setLong(2, npc.getObjectUUID()); - return (executeUpdate() > 0); - } - - public boolean UPDATE_SLOT(NPC npc,int slot) { - prepareCallable("UPDATE `obj_npc` SET `npc_slot`=? WHERE `UID`=?"); - setFloat(1, slot); - setLong(2, npc.getObjectUUID()); - return (executeUpdate() > 0); - } - public boolean UPDATE_MOBBASE(NPC npc, int mobBaseID) { prepareCallable("UPDATE `obj_npc` SET `npc_raceID`=? WHERE `UID`=?"); setLong(1, mobBaseID);