diff --git a/src/engine/db/handlers/dbEffectsResourceCostHandler.java b/src/engine/db/handlers/dbEffectsResourceCostHandler.java index 4501df68..256959bc 100644 --- a/src/engine/db/handlers/dbEffectsResourceCostHandler.java +++ b/src/engine/db/handlers/dbEffectsResourceCostHandler.java @@ -20,7 +20,6 @@ import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.ArrayList; import java.util.HashMap; public class dbEffectsResourceCostHandler extends dbHandlerBase { diff --git a/src/engine/db/handlers/dbMineHandler.java b/src/engine/db/handlers/dbMineHandler.java index 6b07ff10..2439b21b 100644 --- a/src/engine/db/handlers/dbMineHandler.java +++ b/src/engine/db/handlers/dbMineHandler.java @@ -8,8 +8,8 @@ package engine.db.handlers; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Mine; import engine.objects.MineProduction; import org.pmw.tinylog.Logger; diff --git a/src/engine/db/handlers/dbMobBaseHandler.java b/src/engine/db/handlers/dbMobBaseHandler.java index e41454da..755975c8 100644 --- a/src/engine/db/handlers/dbMobBaseHandler.java +++ b/src/engine/db/handlers/dbMobBaseHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; +import engine.gameManager.DbManager; import engine.mbEnums; import engine.mbEnums.GameObjectType; -import engine.gameManager.DbManager; import engine.objects.MobBase; import engine.objects.MobBaseEffects; import engine.objects.MobBaseStats; diff --git a/src/engine/db/handlers/dbNPCHandler.java b/src/engine/db/handlers/dbNPCHandler.java index f9c39dcd..1a8751be 100644 --- a/src/engine/db/handlers/dbNPCHandler.java +++ b/src/engine/db/handlers/dbNPCHandler.java @@ -309,6 +309,7 @@ public class dbNPCHandler extends dbHandlerBase { return false; } } + public boolean UPDATE_RACE(NPC npc, int value) { try (Connection connection = DbManager.getConnection(); @@ -324,6 +325,7 @@ public class dbNPCHandler extends dbHandlerBase { return false; } } + public void LOAD_PIRATE_NAMES() { String pirateName; diff --git a/src/engine/db/handlers/dbPetitionHandler.java b/src/engine/db/handlers/dbPetitionHandler.java index 48d35926..0c4e0a10 100644 --- a/src/engine/db/handlers/dbPetitionHandler.java +++ b/src/engine/db/handlers/dbPetitionHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Petition; import org.pmw.tinylog.Logger; diff --git a/src/engine/db/handlers/dbPlayerCharacterHandler.java b/src/engine/db/handlers/dbPlayerCharacterHandler.java index a3e51d4a..ce3d0592 100644 --- a/src/engine/db/handlers/dbPlayerCharacterHandler.java +++ b/src/engine/db/handlers/dbPlayerCharacterHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.AbstractWorldObject; import engine.objects.Heraldry; import engine.objects.PlayerCharacter; diff --git a/src/engine/db/handlers/dbPowerHandler.java b/src/engine/db/handlers/dbPowerHandler.java index c78fae82..5a007924 100644 --- a/src/engine/db/handlers/dbPowerHandler.java +++ b/src/engine/db/handlers/dbPowerHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; -import engine.mbEnums; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; +import engine.mbEnums; import engine.objects.Mob; import engine.powers.EffectsBase; import org.pmw.tinylog.Logger; diff --git a/src/engine/db/handlers/dbRuneBaseEffectHandler.java b/src/engine/db/handlers/dbRuneBaseEffectHandler.java index 926c5973..b4deb597 100644 --- a/src/engine/db/handlers/dbRuneBaseEffectHandler.java +++ b/src/engine/db/handlers/dbRuneBaseEffectHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; +import engine.gameManager.DbManager; import engine.mbEnums; import engine.mbEnums.GameObjectType; -import engine.gameManager.DbManager; import engine.objects.AbstractGameObject; import engine.objects.RuneBaseEffect; import org.pmw.tinylog.Logger; diff --git a/src/engine/db/handlers/dbRunegateHandler.java b/src/engine/db/handlers/dbRunegateHandler.java index 5fd3bd28..2e1c9488 100644 --- a/src/engine/db/handlers/dbRunegateHandler.java +++ b/src/engine/db/handlers/dbRunegateHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Building; import engine.objects.Portal; import org.pmw.tinylog.Logger; diff --git a/src/engine/db/handlers/dbShrineHandler.java b/src/engine/db/handlers/dbShrineHandler.java index efaa9187..e7421bb3 100644 --- a/src/engine/db/handlers/dbShrineHandler.java +++ b/src/engine/db/handlers/dbShrineHandler.java @@ -9,10 +9,10 @@ package engine.db.handlers; -import engine.mbEnums; -import engine.mbEnums.ProtectionState; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.ProtectionState; import engine.objects.AbstractGameObject; import engine.objects.Building; import engine.objects.Shrine; diff --git a/src/engine/db/handlers/dbSkillBaseHandler.java b/src/engine/db/handlers/dbSkillBaseHandler.java index d48f1cda..4c8ce1e2 100644 --- a/src/engine/db/handlers/dbSkillBaseHandler.java +++ b/src/engine/db/handlers/dbSkillBaseHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; +import engine.gameManager.DbManager; import engine.mbEnums; import engine.mbEnums.GameObjectType; -import engine.gameManager.DbManager; import engine.objects.MaxSkills; import engine.objects.SkillsBase; import org.pmw.tinylog.Logger; diff --git a/src/engine/db/handlers/dbVendorDialogHandler.java b/src/engine/db/handlers/dbVendorDialogHandler.java index 49167024..5afe2fad 100644 --- a/src/engine/db/handlers/dbVendorDialogHandler.java +++ b/src/engine/db/handlers/dbVendorDialogHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.VendorDialog; import org.pmw.tinylog.Logger; diff --git a/src/engine/db/handlers/dbZoneHandler.java b/src/engine/db/handlers/dbZoneHandler.java index f20b3759..ec7315e8 100644 --- a/src/engine/db/handlers/dbZoneHandler.java +++ b/src/engine/db/handlers/dbZoneHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; -import engine.mbEnums; import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; +import engine.mbEnums; import engine.objects.Zone; import engine.objects.ZoneTemplate; import org.pmw.tinylog.Logger; diff --git a/src/engine/devcmd/cmds/GotoCmd.java b/src/engine/devcmd/cmds/GotoCmd.java index bc343594..7c965b7e 100644 --- a/src/engine/devcmd/cmds/GotoCmd.java +++ b/src/engine/devcmd/cmds/GotoCmd.java @@ -9,11 +9,11 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.objects.*; import engine.server.MBServerStatics; diff --git a/src/engine/devcmd/cmds/GotoObj.java b/src/engine/devcmd/cmds/GotoObj.java index 3a4ec10b..e70890d3 100644 --- a/src/engine/devcmd/cmds/GotoObj.java +++ b/src/engine/devcmd/cmds/GotoObj.java @@ -9,10 +9,10 @@ package engine.devcmd.cmds; -import engine.mbEnums; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.objects.*; public class GotoObj extends AbstractDevCmd { diff --git a/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java b/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java index 28b0cef3..58e09ea2 100644 --- a/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java +++ b/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java @@ -9,12 +9,12 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.Building; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/SetGuildCmd.java b/src/engine/devcmd/cmds/SetGuildCmd.java index 3be75ae0..8d603f94 100644 --- a/src/engine/devcmd/cmds/SetGuildCmd.java +++ b/src/engine/devcmd/cmds/SetGuildCmd.java @@ -1,9 +1,9 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.Guild; import engine.objects.NPC; diff --git a/src/engine/devcmd/cmds/SetHealthCmd.java b/src/engine/devcmd/cmds/SetHealthCmd.java index 462c26e8..df4844f6 100644 --- a/src/engine/devcmd/cmds/SetHealthCmd.java +++ b/src/engine/devcmd/cmds/SetHealthCmd.java @@ -9,9 +9,9 @@ package engine.devcmd.cmds; -import engine.mbEnums.DispatchChannel; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DispatchManager; +import engine.mbEnums.DispatchChannel; import engine.net.client.msg.TargetedActionMsg; import engine.objects.AbstractGameObject; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/SetInvulCmd.java b/src/engine/devcmd/cmds/SetInvulCmd.java index a1314d96..6a80900e 100644 --- a/src/engine/devcmd/cmds/SetInvulCmd.java +++ b/src/engine/devcmd/cmds/SetInvulCmd.java @@ -10,9 +10,9 @@ package engine.devcmd.cmds; +import engine.devcmd.AbstractDevCmd; import engine.mbEnums; import engine.mbEnums.ProtectionState; -import engine.devcmd.AbstractDevCmd; import engine.objects.AbstractGameObject; import engine.objects.Building; import engine.objects.City; diff --git a/src/engine/devcmd/cmds/SetManaCmd.java b/src/engine/devcmd/cmds/SetManaCmd.java index 0a339b98..54341885 100644 --- a/src/engine/devcmd/cmds/SetManaCmd.java +++ b/src/engine/devcmd/cmds/SetManaCmd.java @@ -1,8 +1,8 @@ package engine.devcmd.cmds; import engine.devcmd.AbstractDevCmd; -import engine.mbEnums; import engine.gameManager.DispatchManager; +import engine.mbEnums; import engine.net.client.msg.TargetedActionMsg; import engine.objects.AbstractGameObject; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/SetNpcNameCmd.java b/src/engine/devcmd/cmds/SetNpcNameCmd.java index 0db4ac68..de41ec88 100644 --- a/src/engine/devcmd/cmds/SetNpcNameCmd.java +++ b/src/engine/devcmd/cmds/SetNpcNameCmd.java @@ -9,9 +9,9 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.NPC; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/SetOwnerCmd.java b/src/engine/devcmd/cmds/SetOwnerCmd.java index ac413b77..d421e244 100644 --- a/src/engine/devcmd/cmds/SetOwnerCmd.java +++ b/src/engine/devcmd/cmds/SetOwnerCmd.java @@ -1,10 +1,10 @@ package engine.devcmd.cmds; +import engine.devcmd.AbstractDevCmd; +import engine.gameManager.DbManager; import engine.mbEnums; import engine.mbEnums.DbObjectType; import engine.mbEnums.GameObjectType; -import engine.devcmd.AbstractDevCmd; -import engine.gameManager.DbManager; import engine.objects.*; diff --git a/src/engine/devcmd/cmds/SetPromotionClassCmd.java b/src/engine/devcmd/cmds/SetPromotionClassCmd.java index 6001f7c7..41370e3e 100644 --- a/src/engine/devcmd/cmds/SetPromotionClassCmd.java +++ b/src/engine/devcmd/cmds/SetPromotionClassCmd.java @@ -1,10 +1,10 @@ package engine.devcmd.cmds; -import engine.mbEnums.DispatchChannel; import engine.InterestManagement.InterestManager; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; import engine.gameManager.DispatchManager; +import engine.mbEnums.DispatchChannel; import engine.net.client.msg.ApplyRuneMsg; import engine.objects.AbstractGameObject; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/SetRaceCmd.java b/src/engine/devcmd/cmds/SetRaceCmd.java index fd235093..66b8566f 100644 --- a/src/engine/devcmd/cmds/SetRaceCmd.java +++ b/src/engine/devcmd/cmds/SetRaceCmd.java @@ -10,13 +10,12 @@ package engine.devcmd.cmds; import engine.InterestManagement.InterestManager; -import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; -import engine.gameManager.BuildingManager; -import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.mbEnums; -import engine.objects.*; +import engine.objects.AbstractGameObject; +import engine.objects.NPC; +import engine.objects.PlayerCharacter; public class SetRaceCmd extends AbstractDevCmd { @@ -30,13 +29,13 @@ public class SetRaceCmd extends AbstractDevCmd { int newRace = Integer.parseInt(words[0]); - if(target.getObjectType().equals(mbEnums.GameObjectType.NPC) == false){ + if (target.getObjectType().equals(mbEnums.GameObjectType.NPC) == false) { throwbackError(player, "You Must Target An NPC"); } - NPC npc = (NPC)target; + NPC npc = (NPC) target; npc.loadID = newRace; - DbManager.NPCQueries.UPDATE_RACE(npc,newRace); + DbManager.NPCQueries.UPDATE_RACE(npc, newRace); InterestManager.reloadCharacter(npc); } diff --git a/src/engine/devcmd/cmds/SetStaminaCmd.java b/src/engine/devcmd/cmds/SetStaminaCmd.java index e365363e..9c22c908 100644 --- a/src/engine/devcmd/cmds/SetStaminaCmd.java +++ b/src/engine/devcmd/cmds/SetStaminaCmd.java @@ -9,9 +9,9 @@ package engine.devcmd.cmds; -import engine.mbEnums.DispatchChannel; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DispatchManager; +import engine.mbEnums.DispatchChannel; import engine.net.client.msg.TargetedActionMsg; import engine.objects.AbstractGameObject; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/SetSubRaceCmd.java b/src/engine/devcmd/cmds/SetSubRaceCmd.java index d241b95a..3beb705a 100644 --- a/src/engine/devcmd/cmds/SetSubRaceCmd.java +++ b/src/engine/devcmd/cmds/SetSubRaceCmd.java @@ -10,9 +10,9 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DispatchManager; +import engine.mbEnums.GameObjectType; import engine.net.client.msg.ApplyBuildingEffectMsg; import engine.net.client.msg.UpdateCharOrMobMessage; import engine.objects.*; diff --git a/src/engine/devcmd/cmds/ShowOffsetCmd.java b/src/engine/devcmd/cmds/ShowOffsetCmd.java index 7acfab67..b4764d3c 100644 --- a/src/engine/devcmd/cmds/ShowOffsetCmd.java +++ b/src/engine/devcmd/cmds/ShowOffsetCmd.java @@ -1,8 +1,8 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.Building; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/SlotTestCmd.java b/src/engine/devcmd/cmds/SlotTestCmd.java index 273f8b38..8a2f0382 100644 --- a/src/engine/devcmd/cmds/SlotTestCmd.java +++ b/src/engine/devcmd/cmds/SlotTestCmd.java @@ -9,11 +9,11 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.ChatManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.objects.*; import java.util.ArrayList; diff --git a/src/engine/devcmd/cmds/SplatMobCmd.java b/src/engine/devcmd/cmds/SplatMobCmd.java index 7ebecd2b..47eaea85 100644 --- a/src/engine/devcmd/cmds/SplatMobCmd.java +++ b/src/engine/devcmd/cmds/SplatMobCmd.java @@ -1,9 +1,9 @@ package engine.devcmd.cmds; -import engine.mbEnums; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.objects.AbstractGameObject; import engine.objects.Mob; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/UnloadFurnitureCmd.java b/src/engine/devcmd/cmds/UnloadFurnitureCmd.java index cc117837..f9292f89 100644 --- a/src/engine/devcmd/cmds/UnloadFurnitureCmd.java +++ b/src/engine/devcmd/cmds/UnloadFurnitureCmd.java @@ -9,8 +9,8 @@ package engine.devcmd.cmds; -import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; +import engine.mbEnums.GameObjectType; import engine.net.client.msg.LoadStructureMsg; import engine.net.client.msg.MoveToPointMsg; import engine.net.client.msg.UnloadObjectsMsg; diff --git a/src/engine/exception/SerializationException.java b/src/engine/exception/SerializationException.java deleted file mode 100644 index 2381e619..00000000 --- a/src/engine/exception/SerializationException.java +++ /dev/null @@ -1,31 +0,0 @@ -// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . -// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· -// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ -// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ -// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ -// Magicbane Emulator Project © 2013 - 2022 -// www.magicbane.com - - -package engine.exception; - -public class SerializationException extends MBServerException { - private static final long serialVersionUID = 6927044139998382254L; - - public SerializationException() { - super(); - } - - public SerializationException(String arg0, Throwable arg1) { - super(arg0, arg1); - } - - public SerializationException(String arg0) { - super(arg0); - } - - public SerializationException(Throwable arg0) { - super(arg0); - } - -} diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index a9b6e230..91366206 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -113,7 +113,7 @@ public enum CombatManager { public static void processAttack(AbstractCharacter attacker, AbstractWorldObject target, mbEnums.EquipSlotType slot) { - if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { + if (attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { if (!attacker.isCombat()) return; @@ -207,7 +207,6 @@ public enum CombatManager { } - //check if Out of Stamina if (attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { if (attacker.getStamina() < (weapon.template.item_wt / 3f)) { @@ -411,10 +410,10 @@ public enum CombatManager { int attackAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD)); if (attacker.charItemManager.getEquipped().get(slot) != null) { - if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { + if (attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { DeferredPowerJob weaponPower = ((PlayerCharacter) attacker).getWeaponPower(); attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, weaponPower, slot.equals(mbEnums.EquipSlotType.RHELD)); - }else { + } else { attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, slot.equals(mbEnums.EquipSlotType.RHELD)); } } @@ -513,7 +512,7 @@ public enum CombatManager { int random = ThreadLocalRandom.current().nextInt(wb.weapon_attack_anim_right.size()); int anim = wb.weapon_attack_anim_right.get(random)[0]; return anim; - }else { + } else { int random = ThreadLocalRandom.current().nextInt(wb.weapon_attack_anim_left.size()); return wb.weapon_attack_anim_left.get(random)[0]; } diff --git a/src/engine/gameManager/DbManager.java b/src/engine/gameManager/DbManager.java index 4e1ac385..1cb13e83 100644 --- a/src/engine/gameManager/DbManager.java +++ b/src/engine/gameManager/DbManager.java @@ -10,9 +10,9 @@ package engine.gameManager; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; +import engine.db.handlers.*; import engine.mbEnums; import engine.mbEnums.GameObjectType; -import engine.db.handlers.*; import engine.objects.*; import engine.server.MBServerStatics; import engine.util.Hasher; diff --git a/src/engine/gameManager/ItemManager.java b/src/engine/gameManager/ItemManager.java index 76bd7f0f..fb774e3b 100644 --- a/src/engine/gameManager/ItemManager.java +++ b/src/engine/gameManager/ItemManager.java @@ -192,7 +192,7 @@ public enum ItemManager { if (!ValidRace(item, abstractCharacter.absRace)) return false; - if (!ValidClass(item, abstractCharacter.absBaseClass,abstractCharacter.absPromotionClass)) + if (!ValidClass(item, abstractCharacter.absBaseClass, abstractCharacter.absPromotionClass)) return false; //players can't wear 0 value items. diff --git a/src/engine/gameManager/ZoneManager.java b/src/engine/gameManager/ZoneManager.java index bae9898e..cdb3373e 100644 --- a/src/engine/gameManager/ZoneManager.java +++ b/src/engine/gameManager/ZoneManager.java @@ -8,12 +8,12 @@ package engine.gameManager; -import engine.mbEnums; import engine.InterestManagement.Terrain; import engine.math.Bounds; import engine.math.Vector2f; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.objects.Building; import engine.objects.City; import engine.objects.Zone; diff --git a/src/engine/jobs/FinishSummonsJob.java b/src/engine/jobs/FinishSummonsJob.java index 9396620c..bc1c52fa 100644 --- a/src/engine/jobs/FinishSummonsJob.java +++ b/src/engine/jobs/FinishSummonsJob.java @@ -9,11 +9,11 @@ package engine.jobs; -import engine.mbEnums.ModType; -import engine.mbEnums.SourceType; import engine.gameManager.PowersManager; import engine.job.AbstractScheduleJob; import engine.job.JobContainer; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.net.client.msg.ErrorPopupMsg; import engine.objects.PlayerCharacter; diff --git a/src/engine/jobs/UpgradeNPCJob.java b/src/engine/jobs/UpgradeNPCJob.java index 217033bf..9d6dcfce 100644 --- a/src/engine/jobs/UpgradeNPCJob.java +++ b/src/engine/jobs/UpgradeNPCJob.java @@ -9,9 +9,9 @@ package engine.jobs; -import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.job.AbstractScheduleJob; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractCharacter; import engine.objects.Mob; import engine.objects.NPC; diff --git a/src/engine/mbEnums.java b/src/engine/mbEnums.java index 2dfcd6cd..55cb6808 100644 --- a/src/engine/mbEnums.java +++ b/src/engine/mbEnums.java @@ -2595,11 +2595,11 @@ public class mbEnums { } public boolean canJoin(AbstractCharacter character) { - if(this.requiredRaces.contains(character.absRace) == false) + if (this.requiredRaces.contains(character.absRace) == false) return false; - if(this.requiredClasses.contains(character.absBaseClass) == false && this.requiredClasses.contains(character.absPromotionClass) == false) + if (this.requiredClasses.contains(character.absBaseClass) == false && this.requiredClasses.contains(character.absPromotionClass) == false) return false; - if(this.sexRequired.contains(character.absGender) == false) + if (this.sexRequired.contains(character.absGender) == false) return false; return true; diff --git a/src/engine/net/AbstractNetMsg.java b/src/engine/net/AbstractNetMsg.java index 8a00f4b2..6f946722 100644 --- a/src/engine/net/AbstractNetMsg.java +++ b/src/engine/net/AbstractNetMsg.java @@ -9,7 +9,6 @@ package engine.net; -import engine.exception.SerializationException; import engine.server.MBServerStatics; import engine.util.StringUtils; import org.pmw.tinylog.Logger; @@ -95,7 +94,7 @@ public abstract class AbstractNetMsg { * @throws Exception */ protected abstract void _serialize(ByteBufferWriter writer) - throws SerializationException; + ; /** * Attempts to serialize this NetMsg into a ByteBuffer. ByteBuffer is diff --git a/src/engine/net/client/handlers/ObjectActionMsgHandler.java b/src/engine/net/client/handlers/ObjectActionMsgHandler.java index 2f7d79c4..5cc7874a 100644 --- a/src/engine/net/client/handlers/ObjectActionMsgHandler.java +++ b/src/engine/net/client/handlers/ObjectActionMsgHandler.java @@ -265,7 +265,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { player.cancelOnSpell(); break; case RUNE: - ApplyRuneMsg.applyRune(uuid,origin,player); + ApplyRuneMsg.applyRune(uuid, origin, player); itemMan.consume(item); break; default: //shouldn't be here, consume item diff --git a/src/engine/net/client/handlers/RequestEnterWorldHandler.java b/src/engine/net/client/handlers/RequestEnterWorldHandler.java index c61ffaf4..d90a5682 100644 --- a/src/engine/net/client/handlers/RequestEnterWorldHandler.java +++ b/src/engine/net/client/handlers/RequestEnterWorldHandler.java @@ -6,12 +6,12 @@ import engine.db.archive.CharacterRecord; import engine.db.archive.DataWarehouse; import engine.db.archive.PvpRecord; import engine.exception.MsgSendException; +import engine.gameManager.DispatchManager; import engine.gameManager.SessionManager; import engine.math.Vector3fImmutable; import engine.mbEnums; import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; -import engine.gameManager.DispatchManager; import engine.net.client.ClientConnection; import engine.net.client.msg.*; import engine.objects.Account; diff --git a/src/engine/net/client/handlers/RequestGuildListHandler.java b/src/engine/net/client/handlers/RequestGuildListHandler.java index 1238f8a5..5df004c0 100644 --- a/src/engine/net/client/handlers/RequestGuildListHandler.java +++ b/src/engine/net/client/handlers/RequestGuildListHandler.java @@ -11,10 +11,10 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; +import engine.gameManager.DispatchManager; import engine.gameManager.SessionManager; import engine.mbEnums; import engine.net.Dispatch; -import engine.gameManager.DispatchManager; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.ErrorPopupMsg; diff --git a/src/engine/net/client/handlers/RespawnMsgHandler.java b/src/engine/net/client/handlers/RespawnMsgHandler.java index 01ad147a..3ffb9df0 100644 --- a/src/engine/net/client/handlers/RespawnMsgHandler.java +++ b/src/engine/net/client/handlers/RespawnMsgHandler.java @@ -9,12 +9,12 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; +import engine.gameManager.DispatchManager; import engine.gameManager.MovementManager; import engine.job.JobScheduler; import engine.jobs.RefreshGroupJob; import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; -import engine.gameManager.DispatchManager; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.MoveToPointMsg; diff --git a/src/engine/net/client/handlers/SetCombatModeMsgHandler.java b/src/engine/net/client/handlers/SetCombatModeMsgHandler.java index 0cd9f93b..a7ad7215 100644 --- a/src/engine/net/client/handlers/SetCombatModeMsgHandler.java +++ b/src/engine/net/client/handlers/SetCombatModeMsgHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; -import engine.mbEnums; import engine.gameManager.DispatchManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.SetCombatModeMsg; diff --git a/src/engine/net/client/handlers/ShowMsgHandler.java b/src/engine/net/client/handlers/ShowMsgHandler.java index 36176661..0c31a346 100644 --- a/src/engine/net/client/handlers/ShowMsgHandler.java +++ b/src/engine/net/client/handlers/ShowMsgHandler.java @@ -9,10 +9,10 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; +import engine.gameManager.DispatchManager; import engine.mbEnums; import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; -import engine.gameManager.DispatchManager; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.ShowMsg; diff --git a/src/engine/net/client/handlers/SocialMsgHandler.java b/src/engine/net/client/handlers/SocialMsgHandler.java index 7f3333f7..ca7cbd39 100644 --- a/src/engine/net/client/handlers/SocialMsgHandler.java +++ b/src/engine/net/client/handlers/SocialMsgHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; -import engine.mbEnums.DispatchChannel; import engine.gameManager.DispatchManager; +import engine.mbEnums.DispatchChannel; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.SocialMsg; diff --git a/src/engine/net/client/msg/AbandonAssetMsg.java b/src/engine/net/client/msg/AbandonAssetMsg.java index e1514b7b..ce49d96c 100644 --- a/src/engine/net/client/msg/AbandonAssetMsg.java +++ b/src/engine/net/client/msg/AbandonAssetMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -46,7 +45,7 @@ public class AbandonAssetMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.pad); writer.putInt(this.objectType); writer.putInt(this.objectUUID); diff --git a/src/engine/net/client/msg/AcceptTradeRequestMsg.java b/src/engine/net/client/msg/AcceptTradeRequestMsg.java index 3b0da8d4..1d4d4462 100644 --- a/src/engine/net/client/msg/AcceptTradeRequestMsg.java +++ b/src/engine/net/client/msg/AcceptTradeRequestMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -70,8 +69,7 @@ public class AcceptTradeRequestMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putInt(playerType); writer.putInt(playerID); diff --git a/src/engine/net/client/msg/AddGoldToTradeWindowMsg.java b/src/engine/net/client/msg/AddGoldToTradeWindowMsg.java index 818abbce..2acb4951 100644 --- a/src/engine/net/client/msg/AddGoldToTradeWindowMsg.java +++ b/src/engine/net/client/msg/AddGoldToTradeWindowMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -57,8 +56,7 @@ public class AddGoldToTradeWindowMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putLong(playerCompID); writer.putInt(amount); diff --git a/src/engine/net/client/msg/AddItemToTradeWindowMsg.java b/src/engine/net/client/msg/AddItemToTradeWindowMsg.java index d2f6c91b..956ee027 100644 --- a/src/engine/net/client/msg/AddItemToTradeWindowMsg.java +++ b/src/engine/net/client/msg/AddItemToTradeWindowMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -64,8 +63,7 @@ public class AddItemToTradeWindowMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putInt(playerType); writer.putInt(playerID); diff --git a/src/engine/net/client/msg/AllianceChangeMsg.java b/src/engine/net/client/msg/AllianceChangeMsg.java index a132a028..d5dc8112 100644 --- a/src/engine/net/client/msg/AllianceChangeMsg.java +++ b/src/engine/net/client/msg/AllianceChangeMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -97,7 +96,7 @@ public class AllianceChangeMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.put(this.msgType); if (this.msgType == ERROR_TO0_EARLY) writer.putInt(this.secondsToWait); diff --git a/src/engine/net/client/msg/AllyEnemyListMsg.java b/src/engine/net/client/msg/AllyEnemyListMsg.java index 242427cc..689e293b 100644 --- a/src/engine/net/client/msg/AllyEnemyListMsg.java +++ b/src/engine/net/client/msg/AllyEnemyListMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -67,7 +66,7 @@ public class AllyEnemyListMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(GameObjectType.Guild.ordinal()); writer.putInt(this.guildID); diff --git a/src/engine/net/client/msg/ArcMineChangeProductionMsg.java b/src/engine/net/client/msg/ArcMineChangeProductionMsg.java index ad8207be..ae9531f1 100644 --- a/src/engine/net/client/msg/ArcMineChangeProductionMsg.java +++ b/src/engine/net/client/msg/ArcMineChangeProductionMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -44,7 +43,7 @@ public class ArcMineChangeProductionMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.mineID); writer.putInt(this.resourceHash); } diff --git a/src/engine/net/client/msg/ArcMineWindowAvailableTimeMsg.java b/src/engine/net/client/msg/ArcMineWindowAvailableTimeMsg.java index 118fa551..59b922be 100644 --- a/src/engine/net/client/msg/ArcMineWindowAvailableTimeMsg.java +++ b/src/engine/net/client/msg/ArcMineWindowAvailableTimeMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -88,7 +87,7 @@ public class ArcMineWindowAvailableTimeMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(MBServerStatics.MINE_EARLY_WINDOW); //15); writer.putInt(late); diff --git a/src/engine/net/client/msg/ArcMineWindowChangeMsg.java b/src/engine/net/client/msg/ArcMineWindowChangeMsg.java index 9c6011af..7b30268a 100644 --- a/src/engine/net/client/msg/ArcMineWindowChangeMsg.java +++ b/src/engine/net/client/msg/ArcMineWindowChangeMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -46,7 +45,7 @@ public class ArcMineWindowChangeMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.time); writer.putInt(this.buildingType); writer.putInt(this.buildingID); diff --git a/src/engine/net/client/msg/ArcOwnedMinesListMsg.java b/src/engine/net/client/msg/ArcOwnedMinesListMsg.java index 24d0b70f..c04bb56b 100644 --- a/src/engine/net/client/msg/ArcOwnedMinesListMsg.java +++ b/src/engine/net/client/msg/ArcOwnedMinesListMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -45,7 +44,7 @@ public class ArcOwnedMinesListMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(mineList.size()); for (Mine mine : mineList) { mine.serializeForMineProduction(writer); diff --git a/src/engine/net/client/msg/ArcSiegeSpireMsg.java b/src/engine/net/client/msg/ArcSiegeSpireMsg.java index 71155876..456959a6 100644 --- a/src/engine/net/client/msg/ArcSiegeSpireMsg.java +++ b/src/engine/net/client/msg/ArcSiegeSpireMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -48,7 +47,7 @@ public class ArcSiegeSpireMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { } diff --git a/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java b/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java index 924f0e5c..007e7d6a 100644 --- a/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java +++ b/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.gameManager.BuildingManager; import engine.mbEnums.GameObjectType; import engine.mbEnums.TransactionType; @@ -75,7 +74,7 @@ public class ArcViewAssetTransactionsMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.transactionID); writer.putInt(this.warehouse.building.getObjectUUID()); diff --git a/src/engine/net/client/msg/AssetSupportMsg.java b/src/engine/net/client/msg/AssetSupportMsg.java index 3a35a18e..1321ecef 100644 --- a/src/engine/net/client/msg/AssetSupportMsg.java +++ b/src/engine/net/client/msg/AssetSupportMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -152,7 +151,7 @@ public class AssetSupportMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.messageType); this.supportMsgType = mbEnums.SupportMsgType.typeLookup.get(this.messageType); diff --git a/src/engine/net/client/msg/ChangeGuildLeaderMsg.java b/src/engine/net/client/msg/ChangeGuildLeaderMsg.java index 071e385d..432ad57e 100644 --- a/src/engine/net/client/msg/ChangeGuildLeaderMsg.java +++ b/src/engine/net/client/msg/ChangeGuildLeaderMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -50,7 +49,7 @@ public class ChangeGuildLeaderMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(0); writer.putInt(0); writer.putInt(0); diff --git a/src/engine/net/client/msg/CityAssetMsg.java b/src/engine/net/client/msg/CityAssetMsg.java index 7af6d02f..e15e02eb 100644 --- a/src/engine/net/client/msg/CityAssetMsg.java +++ b/src/engine/net/client/msg/CityAssetMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.gameManager.BuildingManager; import engine.mbEnums; import engine.mbEnums.GameObjectType; @@ -141,7 +140,7 @@ public class CityAssetMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { String buildingName; diff --git a/src/engine/net/client/msg/ClaimAssetMsg.java b/src/engine/net/client/msg/ClaimAssetMsg.java index 590a4d8a..55d03206 100644 --- a/src/engine/net/client/msg/ClaimAssetMsg.java +++ b/src/engine/net/client/msg/ClaimAssetMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -53,7 +52,7 @@ public class ClaimAssetMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.pad); writer.putInt(this.objectType); writer.putInt(this.objectUUID); diff --git a/src/engine/net/client/msg/ClientNetMsg.java b/src/engine/net/client/msg/ClientNetMsg.java index a521f5e4..68be228f 100644 --- a/src/engine/net/client/msg/ClientNetMsg.java +++ b/src/engine/net/client/msg/ClientNetMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.*; public abstract class ClientNetMsg extends AbstractNetMsg { @@ -49,7 +48,7 @@ public abstract class ClientNetMsg extends AbstractNetMsg { */ @Override protected abstract void _serialize(ByteBufferWriter writer) - throws SerializationException; + ; /* * return the header size of 4 for ClientMsgs diff --git a/src/engine/net/client/msg/CloseTradeWindowMsg.java b/src/engine/net/client/msg/CloseTradeWindowMsg.java index b34629a6..2ccbc877 100644 --- a/src/engine/net/client/msg/CloseTradeWindowMsg.java +++ b/src/engine/net/client/msg/CloseTradeWindowMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -59,8 +58,7 @@ public class CloseTradeWindowMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(playerType); writer.putInt(playerID); diff --git a/src/engine/net/client/msg/CommitToTradeMsg.java b/src/engine/net/client/msg/CommitToTradeMsg.java index cc871155..4beb7a74 100644 --- a/src/engine/net/client/msg/CommitToTradeMsg.java +++ b/src/engine/net/client/msg/CommitToTradeMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -56,8 +55,7 @@ public class CommitToTradeMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putLong(playerCompID); } diff --git a/src/engine/net/client/msg/CostOpenBankMsg.java b/src/engine/net/client/msg/CostOpenBankMsg.java index 5831816d..ba9587b7 100644 --- a/src/engine/net/client/msg/CostOpenBankMsg.java +++ b/src/engine/net/client/msg/CostOpenBankMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -65,7 +64,7 @@ public class CostOpenBankMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(playerType); writer.putInt(playerID); writer.putLong(unknown01); diff --git a/src/engine/net/client/msg/DeleteItemMsg.java b/src/engine/net/client/msg/DeleteItemMsg.java index 289cedd1..d64a6762 100644 --- a/src/engine/net/client/msg/DeleteItemMsg.java +++ b/src/engine/net/client/msg/DeleteItemMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -55,7 +54,7 @@ public class DeleteItemMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.type); writer.putInt(this.objectUUID); writer.putInt(this.unknown1); diff --git a/src/engine/net/client/msg/DestroyBuildingMsg.java b/src/engine/net/client/msg/DestroyBuildingMsg.java index 7bdfa851..a1ce71ef 100644 --- a/src/engine/net/client/msg/DestroyBuildingMsg.java +++ b/src/engine/net/client/msg/DestroyBuildingMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -46,7 +45,7 @@ public class DestroyBuildingMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.pad); writer.putInt(this.objectType); writer.putInt(this.objectUUID); diff --git a/src/engine/net/client/msg/FurnitureMsg.java b/src/engine/net/client/msg/FurnitureMsg.java index c682a8ff..a622f08e 100644 --- a/src/engine/net/client/msg/FurnitureMsg.java +++ b/src/engine/net/client/msg/FurnitureMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.math.Vector3fImmutable; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; @@ -89,7 +88,7 @@ public class FurnitureMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { if (this.type == 3 || this.type == 4) { writer.putInt(this.type); writer.putInt(GameObjectType.Building.ordinal()); diff --git a/src/engine/net/client/msg/GoldFromVaultMsg.java b/src/engine/net/client/msg/GoldFromVaultMsg.java index 0357a44d..33c736a9 100644 --- a/src/engine/net/client/msg/GoldFromVaultMsg.java +++ b/src/engine/net/client/msg/GoldFromVaultMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -63,8 +62,7 @@ public class GoldFromVaultMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putLong(unknown01); writer.putLong(playerCompID); writer.putLong(accountCompID); diff --git a/src/engine/net/client/msg/GoldToVaultMsg.java b/src/engine/net/client/msg/GoldToVaultMsg.java index 8acef2a6..479f6236 100644 --- a/src/engine/net/client/msg/GoldToVaultMsg.java +++ b/src/engine/net/client/msg/GoldToVaultMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -74,8 +73,7 @@ public class GoldToVaultMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(GameObjectType.PlayerCharacter.ordinal()); writer.putInt(this.playerID); writer.putInt(GameObjectType.Account.ordinal()); diff --git a/src/engine/net/client/msg/InvalidTradeRequestMsg.java b/src/engine/net/client/msg/InvalidTradeRequestMsg.java index 0c9d917c..2ee6f323 100644 --- a/src/engine/net/client/msg/InvalidTradeRequestMsg.java +++ b/src/engine/net/client/msg/InvalidTradeRequestMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -66,8 +65,7 @@ public class InvalidTradeRequestMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putInt(busyType); writer.putInt(busyID); diff --git a/src/engine/net/client/msg/ItemFromVaultMsg.java b/src/engine/net/client/msg/ItemFromVaultMsg.java index 75cec72f..e28da5a0 100644 --- a/src/engine/net/client/msg/ItemFromVaultMsg.java +++ b/src/engine/net/client/msg/ItemFromVaultMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -94,8 +93,7 @@ public class ItemFromVaultMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putInt(unknown02); writer.putLong(playerCompID); diff --git a/src/engine/net/client/msg/ItemToVaultMsg.java b/src/engine/net/client/msg/ItemToVaultMsg.java index 2c0ef59e..db7d7783 100644 --- a/src/engine/net/client/msg/ItemToVaultMsg.java +++ b/src/engine/net/client/msg/ItemToVaultMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -95,8 +94,7 @@ public class ItemToVaultMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putLong(playerCompID); writer.putInt(unknown01); writer.putInt(unknown02); diff --git a/src/engine/net/client/msg/LeaderboardMessage.java b/src/engine/net/client/msg/LeaderboardMessage.java index 0026c456..2fb4f575 100644 --- a/src/engine/net/client/msg/LeaderboardMessage.java +++ b/src/engine/net/client/msg/LeaderboardMessage.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.gameManager.BuildingManager; import engine.mbEnums.ShrineType; import engine.net.AbstractConnection; @@ -49,7 +48,7 @@ public class LeaderboardMessage extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(ShrineType.values().length);//?? diff --git a/src/engine/net/client/msg/LoadCharacterMsg.java b/src/engine/net/client/msg/LoadCharacterMsg.java index e4efc1b3..84ecb6a2 100644 --- a/src/engine/net/client/msg/LoadCharacterMsg.java +++ b/src/engine/net/client/msg/LoadCharacterMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.*; import engine.objects.AbstractCharacter; import engine.objects.Corpse; @@ -63,7 +62,7 @@ public class LoadCharacterMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { if (absChar != null) { diff --git a/src/engine/net/client/msg/MinionTrainingMessage.java b/src/engine/net/client/msg/MinionTrainingMessage.java index d9e3cf84..ced811ce 100644 --- a/src/engine/net/client/msg/MinionTrainingMessage.java +++ b/src/engine/net/client/msg/MinionTrainingMessage.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -85,7 +84,7 @@ public class MinionTrainingMessage extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { } diff --git a/src/engine/net/client/msg/ModifyCommitToTradeMsg.java b/src/engine/net/client/msg/ModifyCommitToTradeMsg.java index 18b83439..b4be9b14 100644 --- a/src/engine/net/client/msg/ModifyCommitToTradeMsg.java +++ b/src/engine/net/client/msg/ModifyCommitToTradeMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -68,8 +67,7 @@ public class ModifyCommitToTradeMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(playerType); writer.putInt(playerID); writer.putInt(targetType); diff --git a/src/engine/net/client/msg/ObjectActionMsg.java b/src/engine/net/client/msg/ObjectActionMsg.java index 2e64dafc..d639f49f 100644 --- a/src/engine/net/client/msg/ObjectActionMsg.java +++ b/src/engine/net/client/msg/ObjectActionMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -64,8 +63,7 @@ public class ObjectActionMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putInt(unknown02); for (int i = 0; i < unknown01; i++) diff --git a/src/engine/net/client/msg/OpenTradeWindowMsg.java b/src/engine/net/client/msg/OpenTradeWindowMsg.java index 35931622..e00ab31e 100644 --- a/src/engine/net/client/msg/OpenTradeWindowMsg.java +++ b/src/engine/net/client/msg/OpenTradeWindowMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -65,8 +64,7 @@ public class OpenTradeWindowMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putInt(playerType); writer.putInt(playerID); diff --git a/src/engine/net/client/msg/OpenVaultMsg.java b/src/engine/net/client/msg/OpenVaultMsg.java index 3238008d..b5fefb4d 100644 --- a/src/engine/net/client/msg/OpenVaultMsg.java +++ b/src/engine/net/client/msg/OpenVaultMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -66,8 +65,7 @@ public class OpenVaultMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(playerType); writer.putInt(playerID); writer.putInt(npcType); diff --git a/src/engine/net/client/msg/PowerProjectileMsg.java b/src/engine/net/client/msg/PowerProjectileMsg.java index 1f31dd06..88f5e1a8 100644 --- a/src/engine/net/client/msg/PowerProjectileMsg.java +++ b/src/engine/net/client/msg/PowerProjectileMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -68,7 +67,7 @@ public class PowerProjectileMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { engine.math.Vector3fImmutable faceDir = this.source.getLoc().subtract2D(target.getLoc()).normalize(); engine.math.Vector3fImmutable newLoc = faceDir.scaleAdd(range, target.getLoc()); diff --git a/src/engine/net/client/msg/RecommendNationMsg.java b/src/engine/net/client/msg/RecommendNationMsg.java index 5efc2de8..259665b0 100644 --- a/src/engine/net/client/msg/RecommendNationMsg.java +++ b/src/engine/net/client/msg/RecommendNationMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -67,7 +66,7 @@ public class RecommendNationMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(GameObjectType.Guild.ordinal()); writer.putInt(guildID); writer.put(this.ally); diff --git a/src/engine/net/client/msg/RejectTradeRequestMsg.java b/src/engine/net/client/msg/RejectTradeRequestMsg.java index 9fdb282e..d2b97a7a 100644 --- a/src/engine/net/client/msg/RejectTradeRequestMsg.java +++ b/src/engine/net/client/msg/RejectTradeRequestMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -59,8 +58,7 @@ public class RejectTradeRequestMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putLong(playerCompID); writer.putLong(targetCompID); diff --git a/src/engine/net/client/msg/RepairBuildingMsg.java b/src/engine/net/client/msg/RepairBuildingMsg.java index 1cb03004..d89dadfa 100644 --- a/src/engine/net/client/msg/RepairBuildingMsg.java +++ b/src/engine/net/client/msg/RepairBuildingMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -77,7 +76,7 @@ public class RepairBuildingMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(0); writer.putInt(GameObjectType.Building.ordinal()); writer.putInt(this.buildingID); diff --git a/src/engine/net/client/msg/RepairMsg.java b/src/engine/net/client/msg/RepairMsg.java index 08a51023..4c224441 100644 --- a/src/engine/net/client/msg/RepairMsg.java +++ b/src/engine/net/client/msg/RepairMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -108,8 +107,7 @@ public class RepairMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.msgType); writer.putInt(0); writer.putInt(this.unknown01); diff --git a/src/engine/net/client/msg/ReqBankInventoryMsg.java b/src/engine/net/client/msg/ReqBankInventoryMsg.java index fd5f14bd..15dd9ed8 100644 --- a/src/engine/net/client/msg/ReqBankInventoryMsg.java +++ b/src/engine/net/client/msg/ReqBankInventoryMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -62,7 +61,7 @@ public class ReqBankInventoryMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(playerType); writer.putInt(playerID); writer.putLong(unknown01); diff --git a/src/engine/net/client/msg/SendOwnPlayerMsg.java b/src/engine/net/client/msg/SendOwnPlayerMsg.java index bd43ba20..dbc8a1ec 100644 --- a/src/engine/net/client/msg/SendOwnPlayerMsg.java +++ b/src/engine/net/client/msg/SendOwnPlayerMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.*; import engine.objects.Building; import engine.objects.PlayerCharacter; @@ -87,7 +86,7 @@ public class SendOwnPlayerMsg extends ClientNetMsg { writer.putVector3f(ch.getLoc()); try { PlayerCharacter.serializeForClientMsgFull(this.ch, writer); - } catch (SerializationException e) { + } catch (Exception e) { Logger.error(e); } } diff --git a/src/engine/net/client/msg/SetObjectValueMsg.java b/src/engine/net/client/msg/SetObjectValueMsg.java index 74cd0a16..12b3df46 100644 --- a/src/engine/net/client/msg/SetObjectValueMsg.java +++ b/src/engine/net/client/msg/SetObjectValueMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -61,7 +60,7 @@ public class SetObjectValueMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.targetType); writer.putInt(this.targetID); writer.putInt(0); diff --git a/src/engine/net/client/msg/ShowBankInventoryMsg.java b/src/engine/net/client/msg/ShowBankInventoryMsg.java index f739f47a..9fb7135b 100644 --- a/src/engine/net/client/msg/ShowBankInventoryMsg.java +++ b/src/engine/net/client/msg/ShowBankInventoryMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -55,7 +54,7 @@ public class ShowBankInventoryMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { ArrayList bank = pc.charItemManager.getBank(); diff --git a/src/engine/net/client/msg/ShowVaultInventoryMsg.java b/src/engine/net/client/msg/ShowVaultInventoryMsg.java index 04692531..4e1ba5ea 100644 --- a/src/engine/net/client/msg/ShowVaultInventoryMsg.java +++ b/src/engine/net/client/msg/ShowVaultInventoryMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -58,8 +57,7 @@ public class ShowVaultInventoryMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(accountType); writer.putInt(accountID); diff --git a/src/engine/net/client/msg/TaxCityMsg.java b/src/engine/net/client/msg/TaxCityMsg.java index d0030bf7..4758a261 100644 --- a/src/engine/net/client/msg/TaxCityMsg.java +++ b/src/engine/net/client/msg/TaxCityMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.gameManager.BuildingManager; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; @@ -84,7 +83,7 @@ public class TaxCityMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(0); writer.putInt(GameObjectType.Building.ordinal()); diff --git a/src/engine/net/client/msg/TaxResourcesMsg.java b/src/engine/net/client/msg/TaxResourcesMsg.java index f6ca4e28..7ca48b0a 100644 --- a/src/engine/net/client/msg/TaxResourcesMsg.java +++ b/src/engine/net/client/msg/TaxResourcesMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -82,7 +81,7 @@ public class TaxResourcesMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(0); writer.putInt(GameObjectType.Building.ordinal()); diff --git a/src/engine/net/client/msg/TerritoryChangeMessage.java b/src/engine/net/client/msg/TerritoryChangeMessage.java index ff42b87a..fab89a5b 100644 --- a/src/engine/net/client/msg/TerritoryChangeMessage.java +++ b/src/engine/net/client/msg/TerritoryChangeMessage.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -59,7 +58,7 @@ public class TerritoryChangeMessage extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putString(realm.getRealmName()); if (this.realmOwner != null) { diff --git a/src/engine/net/client/msg/TradeRequestMsg.java b/src/engine/net/client/msg/TradeRequestMsg.java index bfcbd30a..8b427c4b 100644 --- a/src/engine/net/client/msg/TradeRequestMsg.java +++ b/src/engine/net/client/msg/TradeRequestMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -67,8 +66,7 @@ public class TradeRequestMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putInt(this.sourceType); writer.putInt(this.sourceID); diff --git a/src/engine/net/client/msg/TransferAssetMsg.java b/src/engine/net/client/msg/TransferAssetMsg.java index bfa55504..7715a748 100644 --- a/src/engine/net/client/msg/TransferAssetMsg.java +++ b/src/engine/net/client/msg/TransferAssetMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -51,7 +50,7 @@ public class TransferAssetMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.pad); writer.putInt(this.objectType); writer.putInt(this.objectID); diff --git a/src/engine/net/client/msg/TransferBuildingMsg.java b/src/engine/net/client/msg/TransferBuildingMsg.java index 83886f5da..a09df6b7 100644 --- a/src/engine/net/client/msg/TransferBuildingMsg.java +++ b/src/engine/net/client/msg/TransferBuildingMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -50,7 +49,7 @@ public class TransferBuildingMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.pad); writer.putInt(this.objectType); writer.putInt(this.objectID); diff --git a/src/engine/net/client/msg/TransferGoldToFromBuildingMsg.java b/src/engine/net/client/msg/TransferGoldToFromBuildingMsg.java index 0681c9f4..0d6fcee4 100644 --- a/src/engine/net/client/msg/TransferGoldToFromBuildingMsg.java +++ b/src/engine/net/client/msg/TransferGoldToFromBuildingMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -75,8 +74,7 @@ public class TransferGoldToFromBuildingMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.direction); writer.putInt(this.failReason); writer.putInt(this.objectType); diff --git a/src/engine/net/client/msg/TransferItemFromBankMsg.java b/src/engine/net/client/msg/TransferItemFromBankMsg.java index 3ee1da26..56d8ef6d 100644 --- a/src/engine/net/client/msg/TransferItemFromBankMsg.java +++ b/src/engine/net/client/msg/TransferItemFromBankMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -99,8 +98,7 @@ public class TransferItemFromBankMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putLong(playerCompID1); writer.putLong(playerCompID2); writer.putInt(type); diff --git a/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java b/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java index dce19863..28dab922 100644 --- a/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java +++ b/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -58,7 +57,7 @@ public class TransferItemFromEquipToInventoryMsg extends ClientNetMsg { * Deserializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.playerType); writer.putInt(this.playerUUID); writer.putInt(this.slot.ordinal()); diff --git a/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java b/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java index 8b734f3c..748a43af 100644 --- a/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java +++ b/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -77,7 +76,7 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { * Deserializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.sourceType); writer.putInt(this.sourceID); writer.putInt(pad1); diff --git a/src/engine/net/client/msg/TransferItemToBankMsg.java b/src/engine/net/client/msg/TransferItemToBankMsg.java index deda39f6..cea9d7e6 100644 --- a/src/engine/net/client/msg/TransferItemToBankMsg.java +++ b/src/engine/net/client/msg/TransferItemToBankMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -99,8 +98,7 @@ public class TransferItemToBankMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putLong(playerCompID1); writer.putLong(playerCompID2); writer.putInt(type); diff --git a/src/engine/net/client/msg/UncommitToTradeMsg.java b/src/engine/net/client/msg/UncommitToTradeMsg.java index abc38e61..095ec3f2 100644 --- a/src/engine/net/client/msg/UncommitToTradeMsg.java +++ b/src/engine/net/client/msg/UncommitToTradeMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -56,8 +55,7 @@ public class UncommitToTradeMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(unknown01); writer.putLong(playerCompID); } diff --git a/src/engine/net/client/msg/UpdateCharOrMobMessage.java b/src/engine/net/client/msg/UpdateCharOrMobMessage.java index de5ab270..5438e904 100644 --- a/src/engine/net/client/msg/UpdateCharOrMobMessage.java +++ b/src/engine/net/client/msg/UpdateCharOrMobMessage.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -62,7 +61,7 @@ public class UpdateCharOrMobMessage extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.type); if (this.type == 2) { writer.putInt(this.playerType); diff --git a/src/engine/net/client/msg/UpdateClientAlliancesMsg.java b/src/engine/net/client/msg/UpdateClientAlliancesMsg.java index c2b23970..452b84c3 100644 --- a/src/engine/net/client/msg/UpdateClientAlliancesMsg.java +++ b/src/engine/net/client/msg/UpdateClientAlliancesMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -67,7 +66,7 @@ public class UpdateClientAlliancesMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { Guild guild = Guild.getGuild(this.guildID); diff --git a/src/engine/net/client/msg/UpdateGoldMsg.java b/src/engine/net/client/msg/UpdateGoldMsg.java index 4c706581..ccd77991 100644 --- a/src/engine/net/client/msg/UpdateGoldMsg.java +++ b/src/engine/net/client/msg/UpdateGoldMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -91,8 +90,7 @@ public class UpdateGoldMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { if (looter == null) { writer.putInt(0); diff --git a/src/engine/net/client/msg/UpdateObjectMsg.java b/src/engine/net/client/msg/UpdateObjectMsg.java index 9b16e475..1b1bd345 100644 --- a/src/engine/net/client/msg/UpdateObjectMsg.java +++ b/src/engine/net/client/msg/UpdateObjectMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -58,7 +57,7 @@ public class UpdateObjectMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.msgType); switch (this.msgType) { case 2: diff --git a/src/engine/net/client/msg/UpdateTradeWindowMsg.java b/src/engine/net/client/msg/UpdateTradeWindowMsg.java index 80937e16..33ff2b69 100644 --- a/src/engine/net/client/msg/UpdateTradeWindowMsg.java +++ b/src/engine/net/client/msg/UpdateTradeWindowMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -51,8 +50,7 @@ public class UpdateTradeWindowMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(pc1.getObjectType().ordinal()); writer.putInt(pc1.getObjectUUID()); diff --git a/src/engine/net/client/msg/UpdateVaultMsg.java b/src/engine/net/client/msg/UpdateVaultMsg.java index 9a8a278c..4878b8a3 100644 --- a/src/engine/net/client/msg/UpdateVaultMsg.java +++ b/src/engine/net/client/msg/UpdateVaultMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -49,8 +48,7 @@ public class UpdateVaultMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(accountType); writer.putInt(accountID); } diff --git a/src/engine/net/client/msg/VendorBuyMsg.java b/src/engine/net/client/msg/VendorBuyMsg.java index 643865b6..66bde71c 100644 --- a/src/engine/net/client/msg/VendorBuyMsg.java +++ b/src/engine/net/client/msg/VendorBuyMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -60,8 +59,7 @@ public class VendorBuyMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.npcType); writer.putInt(this.npcID); diff --git a/src/engine/net/client/msg/VendorBuyWindowMsg.java b/src/engine/net/client/msg/VendorBuyWindowMsg.java index 9c5517a3..1f314336 100644 --- a/src/engine/net/client/msg/VendorBuyWindowMsg.java +++ b/src/engine/net/client/msg/VendorBuyWindowMsg.java @@ -9,7 +9,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.ItemType; import engine.net.*; import engine.net.client.ClientConnection; @@ -76,8 +75,7 @@ public class VendorBuyWindowMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { ClientConnection clientConnection = (ClientConnection) this.getOrigin(); PlayerCharacter player = null; diff --git a/src/engine/net/client/msg/VendorSellMsg.java b/src/engine/net/client/msg/VendorSellMsg.java index 630f8a60..fef56171 100644 --- a/src/engine/net/client/msg/VendorSellMsg.java +++ b/src/engine/net/client/msg/VendorSellMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -62,8 +61,7 @@ public class VendorSellMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.npcType); writer.putInt(this.npcID); writer.putInt(this.itemType); diff --git a/src/engine/net/client/msg/VendorSellWindowMsg.java b/src/engine/net/client/msg/VendorSellWindowMsg.java index 152a3c74..819b2296 100644 --- a/src/engine/net/client/msg/VendorSellWindowMsg.java +++ b/src/engine/net/client/msg/VendorSellWindowMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -115,8 +114,7 @@ public class VendorSellWindowMsg extends ClientNetMsg { * Serializes the subclass specific items from the supplied NetMsgReader. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { writer.putInt(this.npcType); writer.putInt(this.npcID); writer.put(this.unknownByte01); diff --git a/src/engine/net/client/msg/VisualUpdateMessage.java b/src/engine/net/client/msg/VisualUpdateMessage.java index fa88e585..130fc76d 100644 --- a/src/engine/net/client/msg/VisualUpdateMessage.java +++ b/src/engine/net/client/msg/VisualUpdateMessage.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -70,7 +69,7 @@ public class VisualUpdateMessage extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { if (this.building == null) { writer.putInt(4); diff --git a/src/engine/net/client/msg/WorldDataMsg.java b/src/engine/net/client/msg/WorldDataMsg.java index bd526df0..34b2fcb7 100644 --- a/src/engine/net/client/msg/WorldDataMsg.java +++ b/src/engine/net/client/msg/WorldDataMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg; -import engine.exception.SerializationException; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; @@ -60,8 +59,7 @@ public class WorldDataMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied NetMsgWriter. */ @Override - protected void _serialize(ByteBufferWriter writer) - throws SerializationException { + protected void _serialize(ByteBufferWriter writer) { // TODO replace this return with SerializationException diff --git a/src/engine/net/client/msg/chat/AbstractChatMsg.java b/src/engine/net/client/msg/chat/AbstractChatMsg.java index bdb17057..33be9aa2 100644 --- a/src/engine/net/client/msg/chat/AbstractChatMsg.java +++ b/src/engine/net/client/msg/chat/AbstractChatMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg.chat; -import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -79,7 +78,7 @@ public abstract class AbstractChatMsg extends ClientNetMsg { * Serializes the subclass specific items to the supplied ByteBufferWriter. */ @Override - protected abstract void _serialize(ByteBufferWriter writer) throws SerializationException; + protected abstract void _serialize(ByteBufferWriter writer); /** * @return the unknown01 diff --git a/src/engine/net/client/msg/login/CharSelectScreenMsg.java b/src/engine/net/client/msg/login/CharSelectScreenMsg.java index fec17ef2..417e3110 100644 --- a/src/engine/net/client/msg/login/CharSelectScreenMsg.java +++ b/src/engine/net/client/msg/login/CharSelectScreenMsg.java @@ -10,7 +10,6 @@ package engine.net.client.msg.login; -import engine.exception.SerializationException; import engine.net.*; import engine.net.client.msg.ClientNetMsg; import engine.objects.Account; @@ -161,7 +160,7 @@ public class CharSelectScreenMsg extends ClientNetMsg { PlayerCharacter.serializeForClientMsgLogin(this.chars.get(i), writer); else PlayerCharacter.serializeForClientMsgCommit(this.chars.get(i), writer); - } catch (SerializationException e) { + } catch (Exception e) { Logger.error("failed to serialize character " + this.chars.get(i).getObjectUUID()); // Handled already. } diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index a6749f9b..6d90b66b 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -12,7 +12,6 @@ package engine.objects; import engine.InterestManagement.InterestManager; import engine.InterestManagement.Terrain; import engine.InterestManagement.WorldGrid; -import engine.exception.SerializationException; import engine.gameManager.*; import engine.job.AbstractJob; import engine.job.JobContainer; @@ -386,14 +385,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject { return 5000; } - public static void _serializeForClientMsg(AbstractCharacter abstractCharacter, final ByteBufferWriter writer) throws SerializationException { + public static void _serializeForClientMsg(AbstractCharacter abstractCharacter, final ByteBufferWriter writer) { AbstractCharacter.__serializeForClientMsg(abstractCharacter, writer); } - public static void __serializeForClientMsg(AbstractCharacter abstractCharacter, final ByteBufferWriter writer) throws SerializationException { + public static void __serializeForClientMsg(AbstractCharacter abstractCharacter, final ByteBufferWriter writer) { } - public static void serializeForClientMsgOtherPlayer(AbstractCharacter abstractCharacter, final ByteBufferWriter writer, final boolean asciiLastName) throws SerializationException { + public static void serializeForClientMsgOtherPlayer(AbstractCharacter abstractCharacter, final ByteBufferWriter writer, final boolean asciiLastName) { switch (abstractCharacter.getObjectType()) { case PlayerCharacter: diff --git a/src/engine/objects/Corpse.java b/src/engine/objects/Corpse.java index 8b583122..526bd050 100644 --- a/src/engine/objects/Corpse.java +++ b/src/engine/objects/Corpse.java @@ -10,7 +10,6 @@ package engine.objects; import engine.InterestManagement.WorldGrid; -import engine.exception.SerializationException; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.DispatchManager; @@ -139,12 +138,10 @@ public class Corpse extends AbstractWorldObject { DbManager.removeFromCache(corpse); } - public static void _serializeForClientMsg(Corpse corpse, ByteBufferWriter writer) - throws SerializationException { + public static void _serializeForClientMsg(Corpse corpse, ByteBufferWriter writer) { } - public static void _serializeForClientMsg(Corpse corpse, ByteBufferWriter writer, boolean aln) - throws SerializationException { + public static void _serializeForClientMsg(Corpse corpse, ByteBufferWriter writer, boolean aln) { Building building = null; if (corpse.inBuildingID != 0) diff --git a/src/engine/objects/Effect.java b/src/engine/objects/Effect.java index 0bd7c2f1..22165e4b 100644 --- a/src/engine/objects/Effect.java +++ b/src/engine/objects/Effect.java @@ -9,8 +9,6 @@ package engine.objects; -import engine.mbEnums; -import engine.mbEnums.EffectSourceType; import engine.gameManager.PowersManager; import engine.job.AbstractJob; import engine.job.AbstractScheduleJob; @@ -19,6 +17,8 @@ import engine.jobs.AbstractEffectJob; import engine.jobs.DamageOverTimeJob; import engine.jobs.NoTimeJob; import engine.jobs.PersistentAoeJob; +import engine.mbEnums; +import engine.mbEnums.EffectSourceType; import engine.net.ByteBufferWriter; import engine.net.client.ClientConnection; import engine.powers.ActionsBase; diff --git a/src/engine/objects/Experience.java b/src/engine/objects/Experience.java index e7c73a1e..45c06f8b 100644 --- a/src/engine/objects/Experience.java +++ b/src/engine/objects/Experience.java @@ -9,9 +9,9 @@ package engine.objects; -import engine.mbEnums.TargetColor; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.TargetColor; import engine.server.MBServerStatics; import java.util.ArrayList; diff --git a/src/engine/objects/GuildAlliances.java b/src/engine/objects/GuildAlliances.java index 21e94e1d..c743eb81 100644 --- a/src/engine/objects/GuildAlliances.java +++ b/src/engine/objects/GuildAlliances.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.mbEnums.AllianceType; import engine.gameManager.DbManager; +import engine.mbEnums.AllianceType; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index 1bc36a83..1e4eb9e6 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -9,7 +9,6 @@ package engine.objects; -import engine.exception.SerializationException; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; import engine.gameManager.DispatchManager; @@ -174,8 +173,7 @@ public class Item extends AbstractWorldObject { } - public static void _serializeForClientMsg(Item item, ByteBufferWriter writer) - throws SerializationException { + public static void _serializeForClientMsg(Item item, ByteBufferWriter writer) { Item._serializeForClientMsg(item, writer, true); } @@ -482,7 +480,7 @@ public class Item extends AbstractWorldObject { Item.serializeForClientMsgForVendor(item, writer, vendor.getSellPercent()); - } catch (SerializationException se) { + } catch (Exception se) { continue; } ++serialized; @@ -516,7 +514,7 @@ public class Item extends AbstractWorldObject { Item.serializeForClientMsgForVendor(item, writer, vendor.getSellPercent()); - } catch (SerializationException se) { + } catch (Exception se) { continue; } ++serialized; diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index b288e295..01a78a93 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -10,7 +10,6 @@ package engine.objects; import engine.InterestManagement.WorldGrid; -import engine.exception.SerializationException; import engine.gameManager.*; import engine.job.JobScheduler; import engine.jobs.DeferredPowerJob; @@ -157,11 +156,11 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { } - public static void serializeMobForClientMsgOtherPlayer(Mob mob, ByteBufferWriter writer) throws SerializationException { + public static void serializeMobForClientMsgOtherPlayer(Mob mob, ByteBufferWriter writer) { Mob.serializeForClientMsgOtherPlayer(mob, writer); } - public static void serializeForClientMsgOtherPlayer(Mob mob, ByteBufferWriter writer) throws SerializationException { + public static void serializeForClientMsgOtherPlayer(Mob mob, ByteBufferWriter writer) { writer.putInt(0); writer.putInt(0); diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 603cd387..4b3dbd42 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -10,7 +10,6 @@ package engine.objects; import engine.InterestManagement.WorldGrid; -import engine.exception.SerializationException; import engine.gameManager.*; import engine.job.JobContainer; import engine.job.JobScheduler; @@ -179,13 +178,11 @@ public class NPC extends AbstractCharacter { } - public static void serializeNpcForClientMsgOtherPlayer(NPC npc, ByteBufferWriter writer, boolean hideAsciiLastName) - throws SerializationException { + public static void serializeNpcForClientMsgOtherPlayer(NPC npc, ByteBufferWriter writer, boolean hideAsciiLastName) { serializeForClientMsgOtherPlayer(npc, writer); } - public static void serializeForClientMsgOtherPlayer(NPC npc, ByteBufferWriter writer) - throws SerializationException { + public static void serializeForClientMsgOtherPlayer(NPC npc, ByteBufferWriter writer) { writer.putInt(0); writer.putInt(0); @@ -914,13 +911,13 @@ public class NPC extends AbstractCharacter { this.charItemManager.equipped = loadEquipmentSet(this.equipmentSetID); - // Create NPC bounds object - Bounds npcBounds = Bounds.borrow(); - npcBounds.setBounds(this.getLoc()); + // Create NPC bounds object + Bounds npcBounds = Bounds.borrow(); + npcBounds.setBounds(this.getLoc()); - //apply NPC rune effects - NPCManager.applyRunesForNPC(this); - this.resists.setImmuneToAll(true); + //apply NPC rune effects + NPCManager.applyRunesForNPC(this); + this.resists.setImmuneToAll(true); } diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 663fdd98..bd314996 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -17,7 +17,6 @@ import engine.db.archive.CharacterRecord; import engine.db.archive.DataWarehouse; import engine.db.archive.PvpRecord; import engine.exception.MsgSendException; -import engine.exception.SerializationException; import engine.gameManager.*; import engine.job.JobContainer; import engine.job.JobScheduler; @@ -315,33 +314,32 @@ public class PlayerCharacter extends AbstractCharacter { return returnBuilding; } - public static void __serializeForClientMsg(PlayerCharacter playerCharacter, ByteBufferWriter writer) throws SerializationException { + public static void __serializeForClientMsg(PlayerCharacter playerCharacter, ByteBufferWriter writer) { serializeForClientCommon(playerCharacter, writer, true, false, false, false); } - public static void serializeForClientMsgLogin(PlayerCharacter playerCharacter, ByteBufferWriter writer) throws SerializationException { + public static void serializeForClientMsgLogin(PlayerCharacter playerCharacter, ByteBufferWriter writer) { serializeForClientCommon(playerCharacter, writer, true, false, false, false); } - public static void serializeForClientMsgCommit(PlayerCharacter playerCharacter, ByteBufferWriter writer) throws SerializationException { + public static void serializeForClientMsgCommit(PlayerCharacter playerCharacter, ByteBufferWriter writer) { serializeForClientCommon(playerCharacter, writer, true, true, false, false); } - public static void serializeForClientMsgFull(PlayerCharacter playerCharacter, ByteBufferWriter writer) throws SerializationException { + public static void serializeForClientMsgFull(PlayerCharacter playerCharacter, ByteBufferWriter writer) { serializeForClientCommon(playerCharacter, writer, false, false, false, false); } - public static void serializeForClientMsgOtherPlayer(PlayerCharacter playerCharacter, ByteBufferWriter writer) throws SerializationException { + public static void serializeForClientMsgOtherPlayer(PlayerCharacter playerCharacter, ByteBufferWriter writer) { serializeForClientCommon(playerCharacter, writer, false, false, true, false); } - public static void serializePlayerForClientMsgOtherPlayer(PlayerCharacter playerCharacter, ByteBufferWriter writer, boolean hideAsciiLastName) throws SerializationException { + public static void serializePlayerForClientMsgOtherPlayer(PlayerCharacter playerCharacter, ByteBufferWriter writer, boolean hideAsciiLastName) { serializeForClientCommon(playerCharacter, writer, false, false, true, hideAsciiLastName); } // TODO what is a Fresh Char? - private static void serializeForClientCommon(PlayerCharacter playerCharacter, ByteBufferWriter writer, boolean loginData, boolean freshChar, boolean otherPlayer, boolean hideAsciiLastName) - throws SerializationException { + private static void serializeForClientCommon(PlayerCharacter playerCharacter, ByteBufferWriter writer, boolean loginData, boolean freshChar, boolean otherPlayer, boolean hideAsciiLastName) { /* * RUNES diff --git a/src/engine/objects/Resists.java b/src/engine/objects/Resists.java index 1a6de59c..9842e5e2 100644 --- a/src/engine/objects/Resists.java +++ b/src/engine/objects/Resists.java @@ -9,11 +9,11 @@ package engine.objects; +import engine.gameManager.ChatManager; +import engine.gameManager.DbManager; import engine.mbEnums; import engine.mbEnums.ModType; import engine.mbEnums.SourceType; -import engine.gameManager.ChatManager; -import engine.gameManager.DbManager; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; diff --git a/src/engine/objects/RuneBase.java b/src/engine/objects/RuneBase.java index 6f8b8d71..a892dbf4 100644 --- a/src/engine/objects/RuneBase.java +++ b/src/engine/objects/RuneBase.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.net.ByteBufferWriter; import engine.server.MBServerStatics; diff --git a/src/engine/objects/RuneBaseAttribute.java b/src/engine/objects/RuneBaseAttribute.java index 6629a053..b01c3831 100644 --- a/src/engine/objects/RuneBaseAttribute.java +++ b/src/engine/objects/RuneBaseAttribute.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.mbEnums.GameObjectType; import engine.gameManager.DbManager; +import engine.mbEnums.GameObjectType; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/src/engine/objects/Runegate.java b/src/engine/objects/Runegate.java index d771b1b9..ab8be278 100644 --- a/src/engine/objects/Runegate.java +++ b/src/engine/objects/Runegate.java @@ -1,7 +1,7 @@ package engine.objects; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.net.ByteBufferWriter; import java.util.ArrayList; diff --git a/src/engine/objects/Shrine.java b/src/engine/objects/Shrine.java index 9b7ac5ae..f7c1be01 100644 --- a/src/engine/objects/Shrine.java +++ b/src/engine/objects/Shrine.java @@ -9,11 +9,11 @@ package engine.objects; +import engine.gameManager.ChatManager; +import engine.gameManager.DbManager; import engine.mbEnums; import engine.mbEnums.BuildingGroup; import engine.mbEnums.ShrineType; -import engine.gameManager.ChatManager; -import engine.gameManager.DbManager; import org.pmw.tinylog.Logger; import java.sql.ResultSet; diff --git a/src/engine/objects/SkillsBase.java b/src/engine/objects/SkillsBase.java index 9327fdc6..c351b446 100644 --- a/src/engine/objects/SkillsBase.java +++ b/src/engine/objects/SkillsBase.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.mbEnums.SourceType; import engine.gameManager.DbManager; +import engine.mbEnums.SourceType; import engine.server.MBServerStatics; import java.sql.ResultSet; diff --git a/src/engine/objects/Zone.java b/src/engine/objects/Zone.java index c198d1ef..8653b60e 100644 --- a/src/engine/objects/Zone.java +++ b/src/engine/objects/Zone.java @@ -9,13 +9,13 @@ package engine.objects; -import engine.mbEnums; import engine.InterestManagement.Terrain; import engine.db.archive.DataWarehouse; import engine.gameManager.ZoneManager; import engine.math.Bounds; import engine.math.Vector2f; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.ByteBufferWriter; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; diff --git a/src/engine/powers/effectmodifiers/StunnedEffectModifier.java b/src/engine/powers/effectmodifiers/StunnedEffectModifier.java index caff6247..58a7c1e0 100644 --- a/src/engine/powers/effectmodifiers/StunnedEffectModifier.java +++ b/src/engine/powers/effectmodifiers/StunnedEffectModifier.java @@ -9,8 +9,8 @@ package engine.powers.effectmodifiers; -import engine.mbEnums.GameObjectType; import engine.jobs.AbstractEffectJob; +import engine.mbEnums.GameObjectType; import engine.objects.*; import java.sql.ResultSet; diff --git a/src/engine/powers/poweractions/FearPowerAction.java b/src/engine/powers/poweractions/FearPowerAction.java index fe573e62..254f59ee 100644 --- a/src/engine/powers/poweractions/FearPowerAction.java +++ b/src/engine/powers/poweractions/FearPowerAction.java @@ -9,10 +9,10 @@ package engine.powers.poweractions; -import engine.mbEnums; import engine.job.JobScheduler; import engine.jobs.EndFearJob; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; diff --git a/src/engine/powers/poweractions/RunegateTeleportPowerAction.java b/src/engine/powers/poweractions/RunegateTeleportPowerAction.java index 860f9fe1..1f1940fc 100644 --- a/src/engine/powers/poweractions/RunegateTeleportPowerAction.java +++ b/src/engine/powers/poweractions/RunegateTeleportPowerAction.java @@ -9,10 +9,10 @@ package engine.powers.poweractions; -import engine.mbEnums; +import engine.gameManager.DispatchManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.Dispatch; -import engine.gameManager.DispatchManager; import engine.net.client.msg.PromptRecallMsg; import engine.objects.*; import engine.powers.ActionsBase; diff --git a/src/engine/powers/poweractions/SetItemFlagPowerAction.java b/src/engine/powers/poweractions/SetItemFlagPowerAction.java index f49ddd92..471988f0 100644 --- a/src/engine/powers/poweractions/SetItemFlagPowerAction.java +++ b/src/engine/powers/poweractions/SetItemFlagPowerAction.java @@ -9,9 +9,9 @@ package engine.powers.poweractions; -import engine.mbEnums; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.CharacterItemManager; diff --git a/src/engine/powers/poweractions/SpireDisablePowerAction.java b/src/engine/powers/poweractions/SpireDisablePowerAction.java index 80d6687d..a92a3492 100644 --- a/src/engine/powers/poweractions/SpireDisablePowerAction.java +++ b/src/engine/powers/poweractions/SpireDisablePowerAction.java @@ -9,10 +9,10 @@ package engine.powers.poweractions; -import engine.mbEnums.BuildingGroup; -import engine.mbEnums.GameObjectType; import engine.gameManager.ChatManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; diff --git a/src/engine/powers/poweractions/TeleportPowerAction.java b/src/engine/powers/poweractions/TeleportPowerAction.java index 841cb9ff..5dcbd052 100644 --- a/src/engine/powers/poweractions/TeleportPowerAction.java +++ b/src/engine/powers/poweractions/TeleportPowerAction.java @@ -9,13 +9,13 @@ package engine.powers.poweractions; -import engine.mbEnums; -import engine.mbEnums.ModType; -import engine.mbEnums.SourceType; import engine.gameManager.MovementManager; import engine.gameManager.PowersManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.objects.*; import engine.powers.ActionsBase; import engine.powers.PowersBase; diff --git a/src/engine/session/Session.java b/src/engine/session/Session.java index 52b645bb..7c264d2a 100644 --- a/src/engine/session/Session.java +++ b/src/engine/session/Session.java @@ -9,8 +9,8 @@ package engine.session; -import engine.mbEnums; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.objects.Account; import engine.objects.PlayerCharacter; diff --git a/src/engine/workthreads/DisconnectTrashTask.java b/src/engine/workthreads/DisconnectTrashTask.java index 2171c857..50f319d2 100644 --- a/src/engine/workthreads/DisconnectTrashTask.java +++ b/src/engine/workthreads/DisconnectTrashTask.java @@ -8,9 +8,9 @@ package engine.workthreads; -import engine.mbEnums; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.objects.PlayerCharacter; import engine.session.Session; import org.pmw.tinylog.Logger; diff --git a/src/engine/workthreads/WarehousePushThread.java b/src/engine/workthreads/WarehousePushThread.java index 0e6fd8e3..68cfa29d 100644 --- a/src/engine/workthreads/WarehousePushThread.java +++ b/src/engine/workthreads/WarehousePushThread.java @@ -15,10 +15,10 @@ package engine.workthreads; * */ -import engine.mbEnums; import engine.db.archive.*; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; +import engine.mbEnums; import org.pmw.tinylog.Logger; import java.sql.*;