diff --git a/src/engine/db/handlers/dbMobHandler.java b/src/engine/db/handlers/dbMobHandler.java index 2f748592..815558c5 100644 --- a/src/engine/db/handlers/dbMobHandler.java +++ b/src/engine/db/handlers/dbMobHandler.java @@ -51,30 +51,8 @@ public class dbMobHandler extends dbHandlerBase { return null; } - public Mob ADD_SIEGE_MOB(Mob toAdd, boolean isMob) - { - prepareCallable("CALL `mob_SIEGECREATE`(?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"); - setLong(1, toAdd.getParentZoneID()); - setInt(2, toAdd.getMobBaseID()); - setInt(3, toAdd.getGuildUUID()); - setFloat(4, toAdd.getSpawnX()); - setFloat(5, toAdd.getSpawnY()); - setFloat(6, toAdd.getSpawnZ()); - setInt(7,0); - setFloat(8, toAdd.getSpawnRadius()); - setInt(9, toAdd.getTrueSpawnTime()); - setInt(10, toAdd.getBuildingID()); - - int objectUUID = (int) getUUID(); - if (objectUUID > 0) - return GET_MOB(objectUUID); - return null; - } - public boolean updateUpgradeTime(Mob mob, DateTime upgradeDateTime) { - - try { prepareCallable("UPDATE obj_mob SET upgradeDate=? " diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index b023f7b9..7b98b34f 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -466,11 +466,12 @@ public enum BuildingManager { rank = item.getChargesRemaining() * 10; else rank = 10; - Mob mob = null; - NPC npc = null; + Mob mob; + NPC npc; + if (NPC.ISWallArcher(contractID.getContractID())) { - mob = Mob.createMob( contractID.getMobbaseID(), NpcLoc, contractOwner.getGuild(), true, zone, building, contractID.getContractID(), pirateName, rank); + mob = Mob.createMob( contractID.getMobbaseID(), NpcLoc, contractOwner.getGuild(), true, zone, building, contractID.getContractID(), pirateName, rank * 10); if (mob == null) return false; diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index a3686de8..031332fc 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -512,7 +512,7 @@ public class Mob extends AbstractIntelligenceAgent { writer.putInt(mob.currentID); } - public static Mob createMob(int loadID, Vector3fImmutable spawn, Guild guild, boolean isMob, Zone parent, Building building, int contractID, String pirateName, int rank) { + public static Mob createMob(int loadID, Vector3fImmutable spawn, Guild guild, boolean isMob, Zone parent, Building building, int contractID, String pirateName, int level) { Mob mobWithoutID = new Mob(pirateName, "", (short) 0, (short) 0, (short) 0, (short) 0, (short) 0, (short) 1, 0, false, false, false, spawn, spawn, Vector3fImmutable.ZERO, (short) 1, (short) 1, (short) 1, guild, (byte) 0, loadID, isMob, parent, building, contractID); @@ -522,7 +522,7 @@ public class Mob extends AbstractIntelligenceAgent { if (mobWithoutID.mobBase == null) return null; - mobWithoutID.level = (short) (rank * 10); + mobWithoutID.level = (short) level; Mob mob;