diff --git a/src/engine/db/handlers/dbMobBaseHandler.java b/src/engine/db/handlers/dbMobBaseHandler.java index 001bf0a6..d772f262 100644 --- a/src/engine/db/handlers/dbMobBaseHandler.java +++ b/src/engine/db/handlers/dbMobBaseHandler.java @@ -144,14 +144,6 @@ public class dbMobBaseHandler extends dbHandlerBase { } - 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); - setInt(2, token); - setInt(3, rank); - return (executeUpdate() > 0); - } - public boolean RENAME_MOBBASE(int ID, String newName) { prepareCallable("UPDATE `static_npc_mobbase` SET `name`=? WHERE `ID`=?;"); setString(1, newName); diff --git a/src/engine/devcmd/cmds/AddMobPowerCmd.java b/src/engine/devcmd/cmds/AddMobPowerCmd.java deleted file mode 100644 index 2b553b42..00000000 --- a/src/engine/devcmd/cmds/AddMobPowerCmd.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.gameManager.PowersManager; -import engine.objects.AbstractGameObject; -import engine.objects.Mob; -import engine.objects.PlayerCharacter; -import engine.powers.PowersBase; - -/** - * - * @author Eighty - * - */ -public class AddMobPowerCmd extends AbstractDevCmd { - - public AddMobPowerCmd() { - super("addmobpower"); - } - - @Override - protected void _doCmd(PlayerCharacter pcSender, String[] args, - AbstractGameObject target) { - - - if(args.length != 2){ - this.sendUsage(pcSender); - return; - } - - if (target.getObjectType() != GameObjectType.Mob){ - this.throwbackError(pcSender, "Target is not a valid Mob."); - return; - } - Mob mobTarget = (Mob)target; - - - int rank = 0; - String idString = args[0]; - - try{ - rank = Integer.valueOf(args[1]); - }catch(Exception e){ - this.throwbackInfo(pcSender, "Failed to Parse an Integer."); - return; - } - - PowersBase pb = PowersManager.getPowerByIDString(idString); - if (pb == null){ - this.throwbackError(pcSender, "not a valid Effect. IDString is Case Sensitive."); - return; - } - - if (!DbManager.MobBaseQueries.ADD_MOBBASE_POWER(mobTarget.getMobBaseID(), pb.getToken(), rank)){ - this.throwbackError(pcSender, "Failed to update Database"); - } - - mobTarget.getMobBase().updatePowers(); - - this.throwbackInfo(pcSender, "Successfuly added Power " + pb.getIDString() + " to Mobbase with UID " + mobTarget.getMobBaseID()); - - - } - - @Override - protected String _getUsageString() { - return "' /addmobpower poweridstring rank"; - } - - @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 bea6aa66..698d92dd 100644 --- a/src/engine/gameManager/DevCmdManager.java +++ b/src/engine/gameManager/DevCmdManager.java @@ -126,7 +126,6 @@ public enum DevCmdManager { DevCmdManager.registerDevCmd(new ShowOffsetCmd()); DevCmdManager.registerDevCmd(new RealmInfoCmd()); DevCmdManager.registerDevCmd(new RebootCmd()); - DevCmdManager.registerDevCmd(new AddMobPowerCmd()); 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 3587815c..0f32a1d5 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -44,7 +44,6 @@ public class MobBase extends AbstractGameObject { private float attackRange; private boolean isNecroPet = false; private MobBaseStats mobBaseStats; - private HashMap staticPowers; private float walk = 0; private float run = 0; @@ -70,8 +69,6 @@ public class MobBase extends AbstractGameObject { this.goldMod = rs.getInt("goldMod"); this.spawnTime = rs.getInt("spawnTime"); - LevelDefault levelDefault = LevelDefault.getLevelDefault(this.level); - this.healthMax = rs.getInt("health"); this.damageMin = rs.getFloat("minDmg"); this.damageMax = rs.getFloat("maxDmg"); @@ -92,9 +89,8 @@ public class MobBase extends AbstractGameObject { this.hitBoxRadius = 5f; this.mask = 0; - if (this.getObjectUUID() == 12021 || this.getObjectUUID() == 12022) { + if (this.getObjectUUID() == 12021 || this.getObjectUUID() == 12022) this.isNecroPet = true; - } if (Enum.MobFlagType.HUMANOID.elementOf(this.flags)) this.mask += MBServerStatics.MASK_HUMANOID; @@ -146,10 +142,6 @@ public class MobBase extends AbstractGameObject { return equip; } - public void updatePowers() { - this.staticPowers = DbManager.MobBaseQueries.LOAD_STATIC_POWERS(this.getObjectUUID()); - } - public void updateSpeeds(float walk, float walkCombat,float run, float runCombat){ this.walk = walk; this.walkCombat = walkCombat;