diff --git a/src/engine/db/handlers/dbMobBaseHandler.java b/src/engine/db/handlers/dbMobBaseHandler.java index 33f98990..9914c782 100644 --- a/src/engine/db/handlers/dbMobBaseHandler.java +++ b/src/engine/db/handlers/dbMobBaseHandler.java @@ -174,37 +174,6 @@ public class dbMobBaseHandler extends dbHandlerBase { } - public ArrayList LOAD_RUNES_FOR_MOBBASE(int mobBaseUUID) { - - ArrayList runes = new ArrayList<>(); - prepareCallable("SELECT * FROM `static_npc_mobbase_runes` WHERE `mobbaseUUID` = ?"); - setInt(1, mobBaseUUID); - try { - ResultSet rs = executeQuery(); - while (rs.next()) { - int runeID = rs.getInt("runeID"); - RuneBase rune = RuneBase.getRuneBase(runeID); - runes.add(rune); - } - - } catch (SQLException e) { - Logger.error(e.getErrorCode() + ' ' + e.getMessage(), e); - } finally { - closeCallable(); - } - return runes; - - } - - public boolean ADD_MOBBASE_EFFECT(int mobBaseUUID, int token, int rank, int reqLvl) { - prepareCallable("INSERT INTO `static_npc_mobbase_effects` (`mobbaseUUID`, `token`, `rank`, `reqLvl`) VALUES (?, ?, ?, ?);"); - setInt(1, mobBaseUUID); - setInt(2, token); - setInt(3, rank); - setInt(4, reqLvl); - return (executeUpdate() > 0); - } - public boolean ADD_MOBBASE_POWER(int mobBaseUUID, int token, int rank) { prepareCallable("INSERT INTO `static_npc_mobbase_powers` (`mobbaseUUID`, `token`, `rank`) VALUES (?, ?, ?);"); setInt(1, mobBaseUUID); @@ -213,13 +182,6 @@ public class dbMobBaseHandler extends dbHandlerBase { return (executeUpdate() > 0); } - public boolean UPDATE_SKILLS(int ID, int skillsID) { - prepareCallable("UPDATE `static_npc_mobbase` SET `baseSkills`=? WHERE `ID`=?;"); - setInt(1, skillsID); - setInt(2, ID); - return (executeUpdate() > 0); - } - public boolean ADD_MOBBASE_RUNE(int mobBaseUUID, int runeID) { prepareCallable("INSERT INTO `static_npc_mobbase_runes` (`mobbaseUUID`, `runeID`) VALUES (?, ?);"); setInt(1, mobBaseUUID); diff --git a/src/engine/devcmd/cmds/AddMobRuneCmd.java b/src/engine/devcmd/cmds/AddMobRuneCmd.java deleted file mode 100644 index 54a4ceef..00000000 --- a/src/engine/devcmd/cmds/AddMobRuneCmd.java +++ /dev/null @@ -1,98 +0,0 @@ -// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . -// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· -// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ -// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ -// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ -// Magicbane Emulator Project © 2013 - 2022 -// www.magicbane.com - - - - - -// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . -// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· -// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ -// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ -// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ -// Magicbane Emulator Project © 2013 - 2022 -// www.magicbane.com - - -package engine.devcmd.cmds; - -import engine.Enum.GameObjectType; -import engine.devcmd.AbstractDevCmd; -import engine.gameManager.DbManager; -import engine.objects.AbstractGameObject; -import engine.objects.Mob; -import engine.objects.PlayerCharacter; -import engine.objects.RuneBase; - -/** - * - * @author Eighty - * - */ -public class AddMobRuneCmd extends AbstractDevCmd { - - public AddMobRuneCmd() { - super("addmobrune"); - } - - @Override - protected void _doCmd(PlayerCharacter pcSender, String[] args, - AbstractGameObject target) { - - - if(args.length != 1){ - this.sendUsage(pcSender); - return; - } - - if (target.getObjectType() != GameObjectType.Mob){ - this.throwbackError(pcSender, "Target is not a valid Mob."); - return; - } - Mob mobTarget = (Mob)target; - - - int runeID = 0; - try{ - runeID = Integer.valueOf(args[0]); - }catch(Exception e){ - this.throwbackInfo(pcSender, "Failed to Parse an Integer."); - return; - } - - RuneBase rune = RuneBase.getRuneBase(runeID); - if (rune == null){ - this.throwbackError(pcSender, "Invalid Rune ID"); - return; - } - - - if (!DbManager.MobBaseQueries.ADD_MOBBASE_RUNE(mobTarget.getMobBaseID(), runeID)){ - this.throwbackError(pcSender, "Failed to update Database"); - return; - } - - mobTarget.getMobBase().updateRunes(); - - this.throwbackInfo(pcSender, "Successfuly added rune " + rune.getName() + " to Mobbase with UID " + mobTarget.getMobBaseID()); - - - - } - - @Override - protected String _getUsageString() { - return "' /visualeffect visualeffectID"; - } - - @Override - protected String _getHelpString() { - return "Temporarily add visual effects to Character"; - } - -} diff --git a/src/engine/gameManager/DevCmdManager.java b/src/engine/gameManager/DevCmdManager.java index 5f090405..66521d62 100644 --- a/src/engine/gameManager/DevCmdManager.java +++ b/src/engine/gameManager/DevCmdManager.java @@ -126,7 +126,6 @@ public enum DevCmdManager { DevCmdManager.registerDevCmd(new RealmInfoCmd()); DevCmdManager.registerDevCmd(new RebootCmd()); DevCmdManager.registerDevCmd(new AddMobPowerCmd()); - DevCmdManager.registerDevCmd(new AddMobRuneCmd()); DevCmdManager.registerDevCmd(new SetMineTypeCmd()); DevCmdManager.registerDevCmd(new SetMineExpansion()); DevCmdManager.registerDevCmd(new SetForceRenameCityCmd()); diff --git a/src/engine/objects/MobBase.java b/src/engine/objects/MobBase.java index 514721b9..32ecdef4 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -129,7 +129,6 @@ public class MobBase extends AbstractGameObject { if (Enum.MobFlagType.RAT.elementOf(this.flags)) this.mask += MBServerStatics.MASK_RAT; - this.runes = DbManager.MobBaseQueries.LOAD_RUNES_FOR_MOBBASE(this.loadID); this.raceEffectsList = DbManager.MobBaseQueries.LOAD_STATIC_EFFECTS(this.loadID); this.mobBaseStats = DbManager.MobBaseQueries.LOAD_STATS(this.loadID); DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_LOOT(this.loadID); @@ -175,10 +174,6 @@ public class MobBase extends AbstractGameObject { this.raceEffectsList = DbManager.MobBaseQueries.LOAD_STATIC_EFFECTS(this.getObjectUUID()); } - public void updateRunes() { - this.runes = DbManager.MobBaseQueries.LOAD_RUNES_FOR_MOBBASE(this.getObjectUUID()); - } - public void updatePowers() { this.staticPowers = DbManager.MobBaseQueries.LOAD_STATIC_POWERS(this.getObjectUUID()); }