diff --git a/src/discord/Database.java b/src/discord/Database.java index c5175cab..6749c265 100644 --- a/src/discord/Database.java +++ b/src/discord/Database.java @@ -9,8 +9,8 @@ package discord; -import engine.Enum; import engine.gameManager.ConfigManager; +import engine.mbEnums; import org.pmw.tinylog.Logger; import java.sql.*; @@ -70,7 +70,7 @@ public class Database { } } - public boolean updateAccountStatus(String discordAccountID, Enum.AccountStatus accountStatus) { + public boolean updateAccountStatus(String discordAccountID, mbEnums.AccountStatus accountStatus) { try (Connection connection = DriverManager.getConnection(sqlURI, ConfigManager.MB_DATABASE_USER.getValue(), ConfigManager.MB_DATABASE_PASS.getValue()); @@ -131,7 +131,7 @@ public class Database { discordAccount = new DiscordAccount(); discordAccount.discordAccount = rs.getString("discordAccount"); discordAccount.gameAccountName = rs.getString("acct_uname"); - discordAccount.status = Enum.AccountStatus.valueOf(rs.getString("status")); + discordAccount.status = mbEnums.AccountStatus.valueOf(rs.getString("status")); discordAccount.isDiscordAdmin = rs.getByte("discordAdmin"); // Registration date cannot be null Timestamp registrationDate = rs.getTimestamp("registrationDate"); @@ -328,7 +328,7 @@ public class Database { discordAccount = new DiscordAccount(); discordAccount.discordAccount = rs.getString("discordAccount"); discordAccount.gameAccountName = rs.getString("acct_uname"); - discordAccount.status = Enum.AccountStatus.valueOf(rs.getString("status")); + discordAccount.status = mbEnums.AccountStatus.valueOf(rs.getString("status")); // Registration date cannot be null diff --git a/src/discord/DiscordAccount.java b/src/discord/DiscordAccount.java index fce59a4b..f6d21abb 100644 --- a/src/discord/DiscordAccount.java +++ b/src/discord/DiscordAccount.java @@ -8,14 +8,14 @@ package discord; -import engine.Enum; +import engine.mbEnums; import java.time.LocalDateTime; public class DiscordAccount { public String discordAccount; public String gameAccountName; - public Enum.AccountStatus status; + public mbEnums.AccountStatus status; public LocalDateTime registrationDate; public LocalDateTime lastUpdateRequest; public byte isDiscordAdmin; diff --git a/src/discord/handlers/AccountInfoRequest.java b/src/discord/handlers/AccountInfoRequest.java index 2e2c22cd..60e1d02b 100644 --- a/src/discord/handlers/AccountInfoRequest.java +++ b/src/discord/handlers/AccountInfoRequest.java @@ -11,7 +11,7 @@ package discord.handlers; import discord.Database; import discord.DiscordAccount; import discord.MagicBot; -import engine.Enum; +import engine.mbEnums; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import java.util.List; @@ -21,7 +21,7 @@ public class AccountInfoRequest { public static void handleRequest(MessageReceivedEvent event) { String discordAccountID = event.getAuthor().getId(); - Enum.AccountStatus accountStatus; + mbEnums.AccountStatus accountStatus; if (Database.online == false) { diff --git a/src/discord/handlers/BanToggleHandler.java b/src/discord/handlers/BanToggleHandler.java index e14cdcd6..5db2d397 100644 --- a/src/discord/handlers/BanToggleHandler.java +++ b/src/discord/handlers/BanToggleHandler.java @@ -11,7 +11,7 @@ package discord.handlers; import discord.DiscordAccount; import discord.MagicBot; import discord.RobotSpeak; -import engine.Enum; +import engine.mbEnums; import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import org.pmw.tinylog.Logger; @@ -23,7 +23,7 @@ public class BanToggleHandler { public static void handleRequest(MessageReceivedEvent event, String[] args) { String discordAccountID; - Enum.AccountStatus accountStatus; + mbEnums.AccountStatus accountStatus; // Early exit if database unavailable or is not an admin @@ -55,10 +55,10 @@ public class BanToggleHandler { // toggle ban status - if (discordAccounts.get(0).status.equals(Enum.AccountStatus.BANNED)) - accountStatus = Enum.AccountStatus.ACTIVE; + if (discordAccounts.get(0).status.equals(mbEnums.AccountStatus.BANNED)) + accountStatus = mbEnums.AccountStatus.ACTIVE; else - accountStatus = Enum.AccountStatus.BANNED; + accountStatus = mbEnums.AccountStatus.BANNED; // We have a valid discord ID at this point. Banstick? @@ -82,7 +82,7 @@ public class BanToggleHandler { // If we're toggling status to active we're done here. - if (accountStatus.equals(Enum.AccountStatus.ACTIVE)) + if (accountStatus.equals(mbEnums.AccountStatus.ACTIVE)) return; // Set users role to noob diff --git a/src/discord/handlers/PasswordChangeHandler.java b/src/discord/handlers/PasswordChangeHandler.java index bc228c25..e9924b7d 100644 --- a/src/discord/handlers/PasswordChangeHandler.java +++ b/src/discord/handlers/PasswordChangeHandler.java @@ -11,7 +11,7 @@ package discord.handlers; import discord.Database; import discord.DiscordAccount; import discord.MagicBot; -import engine.Enum; +import engine.mbEnums; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import org.pmw.tinylog.Logger; @@ -53,7 +53,7 @@ public class PasswordChangeHandler { // Banned or suspended user's get no love. - if (discordAccount.status.equals(Enum.AccountStatus.BANNED)) { + if (discordAccount.status.equals(mbEnums.AccountStatus.BANNED)) { MagicBot.sendResponse(event, "Sorry but that is too much work. \n" + "Your account detailings cannot for to log into game!"); diff --git a/src/engine/InterestManagement/InterestManager.java b/src/engine/InterestManagement/InterestManager.java index a9cf4c50..8496d73f 100644 --- a/src/engine/InterestManagement/InterestManager.java +++ b/src/engine/InterestManagement/InterestManager.java @@ -8,13 +8,13 @@ package engine.InterestManagement; -import engine.Enum; -import engine.Enum.DispatchChannel; -import engine.Enum.GameObjectType; import engine.gameManager.GroupManager; import engine.gameManager.SessionManager; import engine.job.JobScheduler; import engine.jobs.RefreshGroupJob; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.GameObjectType; import engine.net.AbstractNetMsg; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -482,7 +482,7 @@ public enum InterestManager implements Runnable { awonpc.playerAgroMap.put(player.getObjectUUID(), 0f); - if ((awonpc.agentType.equals(Enum.AIAgentType.MOBILE))) + if ((awonpc.agentType.equals(mbEnums.AIAgentType.MOBILE))) ((Mob) awonpc).setCombatTarget(null); lcm = new LoadCharacterMsg(awonpc, PlayerCharacter.hideNonAscii()); diff --git a/src/engine/InterestManagement/RealmMap.java b/src/engine/InterestManagement/RealmMap.java index 4c08f6bf..89d7b4ad 100644 --- a/src/engine/InterestManagement/RealmMap.java +++ b/src/engine/InterestManagement/RealmMap.java @@ -12,8 +12,8 @@ package engine.InterestManagement; * Interest management facilities. */ -import engine.Enum; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.msg.TerritoryChangeMessage; @@ -88,17 +88,17 @@ public enum RealmMap { if (city != null) { TerritoryChangeMessage tcm = new TerritoryChangeMessage((PlayerCharacter) realm.getRulingCity().getOwner(), realm); Dispatch dispatch = Dispatch.borrow(player, tcm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } else { TerritoryChangeMessage tcm = new TerritoryChangeMessage(null, realm); Dispatch dispatch = Dispatch.borrow(player, tcm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } else { TerritoryChangeMessage tcm = new TerritoryChangeMessage(null, realm); Dispatch dispatch = Dispatch.borrow(player, tcm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } diff --git a/src/engine/InterestManagement/WorldGrid.java b/src/engine/InterestManagement/WorldGrid.java index 2eb71a40..718d2431 100644 --- a/src/engine/InterestManagement/WorldGrid.java +++ b/src/engine/InterestManagement/WorldGrid.java @@ -8,7 +8,7 @@ package engine.InterestManagement; -import engine.Enum.GridObjectType; +import engine.mbEnums.GridObjectType; import engine.math.FastMath; import engine.math.Vector3f; import engine.math.Vector3fImmutable; diff --git a/src/engine/db/archive/BaneRecord.java b/src/engine/db/archive/BaneRecord.java index 700c4a2d..ee221efb 100644 --- a/src/engine/db/archive/BaneRecord.java +++ b/src/engine/db/archive/BaneRecord.java @@ -9,8 +9,8 @@ package engine.db.archive; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Bane; import engine.objects.City; import engine.workthreads.WarehousePushThread; @@ -21,7 +21,7 @@ import java.sql.*; import java.time.LocalDateTime; import java.util.concurrent.LinkedBlockingQueue; -import static engine.Enum.RecordEventType; +import static engine.mbEnums.RecordEventType; public class BaneRecord extends DataRecord { @@ -38,7 +38,7 @@ public class BaneRecord extends DataRecord { private DateTime baneDropTime; private BaneRecord(Bane bane) { - this.recordType = Enum.DataRecordType.BANE; + this.recordType = mbEnums.DataRecordType.BANE; this.eventType = RecordEventType.PENDING; } @@ -51,7 +51,7 @@ public class BaneRecord extends DataRecord { baneRecord = new BaneRecord(bane); baneRecord.eventType = eventType; } else { - baneRecord.recordType = Enum.DataRecordType.BANE; + baneRecord.recordType = mbEnums.DataRecordType.BANE; baneRecord.eventType = eventType; } diff --git a/src/engine/db/archive/CharacterRecord.java b/src/engine/db/archive/CharacterRecord.java index 7b329d32..5fe32326 100644 --- a/src/engine/db/archive/CharacterRecord.java +++ b/src/engine/db/archive/CharacterRecord.java @@ -9,8 +9,8 @@ package engine.db.archive; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Guild; import engine.objects.PlayerCharacter; import engine.workthreads.WarehousePushThread; @@ -33,7 +33,7 @@ public class CharacterRecord extends DataRecord { private PlayerCharacter player; private CharacterRecord(PlayerCharacter player) { - this.recordType = Enum.DataRecordType.CHARACTER; + this.recordType = mbEnums.DataRecordType.CHARACTER; this.player = player; } @@ -45,7 +45,7 @@ public class CharacterRecord extends DataRecord { if (characterRecord == null) { characterRecord = new CharacterRecord(player); } else { - characterRecord.recordType = Enum.DataRecordType.CHARACTER; + characterRecord.recordType = mbEnums.DataRecordType.CHARACTER; characterRecord.player = player; } diff --git a/src/engine/db/archive/CityRecord.java b/src/engine/db/archive/CityRecord.java index f8a0e9c2..946837d6 100644 --- a/src/engine/db/archive/CityRecord.java +++ b/src/engine/db/archive/CityRecord.java @@ -9,8 +9,8 @@ package engine.db.archive; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.City; import engine.workthreads.WarehousePushThread; @@ -20,7 +20,7 @@ import java.util.concurrent.LinkedBlockingQueue; public class CityRecord extends DataRecord { private static final LinkedBlockingQueue recordPool = new LinkedBlockingQueue<>(); - private Enum.RecordEventType eventType; + private mbEnums.RecordEventType eventType; private City city; private String cityHash; private String cityGuildHash; @@ -32,13 +32,13 @@ public class CityRecord extends DataRecord { private java.time.LocalDateTime establishedDatetime; private CityRecord(City city) { - this.recordType = Enum.DataRecordType.CITY; + this.recordType = mbEnums.DataRecordType.CITY; this.city = city; - this.eventType = Enum.RecordEventType.CREATE; + this.eventType = mbEnums.RecordEventType.CREATE; } - public static CityRecord borrow(City city, Enum.RecordEventType eventType) { + public static CityRecord borrow(City city, mbEnums.RecordEventType eventType) { CityRecord cityRecord; cityRecord = recordPool.poll(); @@ -47,7 +47,7 @@ public class CityRecord extends DataRecord { cityRecord = new CityRecord(city); cityRecord.eventType = eventType; } else { - cityRecord.recordType = Enum.DataRecordType.CITY; + cityRecord.recordType = mbEnums.DataRecordType.CITY; cityRecord.eventType = eventType; cityRecord.city = city; @@ -69,7 +69,7 @@ public class CityRecord extends DataRecord { cityRecord.zoneHash = cityRecord.city.getParent().hash; - if (cityRecord.eventType.equals(Enum.RecordEventType.CREATE)) + if (cityRecord.eventType.equals(mbEnums.RecordEventType.CREATE)) cityRecord.establishedDatetime = cityRecord.city.established; else cityRecord.establishedDatetime = java.time.LocalDateTime.now(); diff --git a/src/engine/db/archive/DataRecord.java b/src/engine/db/archive/DataRecord.java index acba35e7..e7f398ed 100644 --- a/src/engine/db/archive/DataRecord.java +++ b/src/engine/db/archive/DataRecord.java @@ -9,11 +9,11 @@ package engine.db.archive; -import engine.Enum; +import engine.mbEnums; class DataRecord { - public Enum.DataRecordType recordType; + public mbEnums.DataRecordType recordType; DataRecord() { diff --git a/src/engine/db/archive/DataWarehouse.java b/src/engine/db/archive/DataWarehouse.java index d8055409..bd67555c 100644 --- a/src/engine/db/archive/DataWarehouse.java +++ b/src/engine/db/archive/DataWarehouse.java @@ -22,7 +22,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.concurrent.LinkedBlockingQueue; -import static engine.Enum.DataRecordType; +import static engine.mbEnums.DataRecordType; public class DataWarehouse implements Runnable { diff --git a/src/engine/db/archive/GuildRecord.java b/src/engine/db/archive/GuildRecord.java index 213b000b..e1cc4a1b 100644 --- a/src/engine/db/archive/GuildRecord.java +++ b/src/engine/db/archive/GuildRecord.java @@ -9,9 +9,9 @@ package engine.db.archive; -import engine.Enum; -import engine.Enum.RecordEventType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.RecordEventType; import engine.objects.Guild; import engine.workthreads.WarehousePushThread; @@ -30,7 +30,7 @@ public class GuildRecord extends DataRecord { public static HashMap GuildRecordCache = null; public String guildHash; public int guildID; - private Enum.RecordEventType eventType; + private mbEnums.RecordEventType eventType; private Guild guild; private String guildName; private String charterName; @@ -44,9 +44,9 @@ public class GuildRecord extends DataRecord { private java.time.LocalDateTime eventDatetime; private GuildRecord(Guild guild) { - this.recordType = Enum.DataRecordType.GUILD; + this.recordType = mbEnums.DataRecordType.GUILD; this.guild = guild; - this.eventType = Enum.RecordEventType.CREATE; + this.eventType = mbEnums.RecordEventType.CREATE; } @@ -71,7 +71,7 @@ public class GuildRecord extends DataRecord { } - public static GuildRecord borrow(Guild guild, Enum.RecordEventType eventType) { + public static GuildRecord borrow(Guild guild, mbEnums.RecordEventType eventType) { GuildRecord guildRecord; //add guildRecord = recordPool.poll(); @@ -81,7 +81,7 @@ public class GuildRecord extends DataRecord { guildRecord.eventType = eventType; } else { guildRecord.guild = guild; - guildRecord.recordType = Enum.DataRecordType.GUILD; + guildRecord.recordType = mbEnums.DataRecordType.GUILD; guildRecord.eventType = eventType; } @@ -89,7 +89,7 @@ public class GuildRecord extends DataRecord { guildRecord.guildHash = guildRecord.guild.getHash(); guildRecord.guildID = guildRecord.guild.getObjectUUID(); guildRecord.guildName = guildRecord.guild.getName(); - guildRecord.charterName = Enum.GuildCharterType.getGuildTypeFromInt(guildRecord.guild.getCharter()).getCharterName(); + guildRecord.charterName = mbEnums.GuildCharterType.getGuildTypeFromInt(guildRecord.guild.getCharter()).getCharterName(); guildRecord.GLHash = DataWarehouse.hasher.encrypt(guildRecord.guild.getGuildLeaderUUID()); diff --git a/src/engine/db/archive/MineRecord.java b/src/engine/db/archive/MineRecord.java index ee67a24c..9d13c058 100644 --- a/src/engine/db/archive/MineRecord.java +++ b/src/engine/db/archive/MineRecord.java @@ -9,8 +9,8 @@ package engine.db.archive; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.AbstractCharacter; import engine.objects.Mine; import engine.objects.PlayerCharacter; @@ -23,7 +23,7 @@ import java.util.concurrent.LinkedBlockingQueue; public class MineRecord extends DataRecord { private static final LinkedBlockingQueue recordPool = new LinkedBlockingQueue<>(); - private Enum.RecordEventType eventType; + private mbEnums.RecordEventType eventType; private String zoneHash; private String charHash; private String mineGuildHash; @@ -33,12 +33,12 @@ public class MineRecord extends DataRecord { private float locY; private MineRecord() { - this.recordType = Enum.DataRecordType.MINE; - this.eventType = Enum.RecordEventType.CAPTURE; + this.recordType = mbEnums.DataRecordType.MINE; + this.eventType = mbEnums.RecordEventType.CAPTURE; } - public static MineRecord borrow(Mine mine, AbstractCharacter character, Enum.RecordEventType eventType) { + public static MineRecord borrow(Mine mine, AbstractCharacter character, mbEnums.RecordEventType eventType) { MineRecord mineRecord; mineRecord = recordPool.poll(); @@ -48,13 +48,13 @@ public class MineRecord extends DataRecord { mineRecord = new MineRecord(); mineRecord.eventType = eventType; } else { - mineRecord.recordType = Enum.DataRecordType.MINE; + mineRecord.recordType = mbEnums.DataRecordType.MINE; mineRecord.eventType = eventType; } mineRecord.zoneHash = mine.getParentZone().hash; - if (character.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (character.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { player = (PlayerCharacter) character; mineRecord.charHash = player.getHash(); } else diff --git a/src/engine/db/archive/PvpRecord.java b/src/engine/db/archive/PvpRecord.java index e90a8832..5e300742 100644 --- a/src/engine/db/archive/PvpRecord.java +++ b/src/engine/db/archive/PvpRecord.java @@ -23,8 +23,8 @@ import java.time.LocalDateTime; import java.util.LinkedList; import java.util.concurrent.LinkedBlockingQueue; -import static engine.Enum.DataRecordType; -import static engine.Enum.PvpHistoryType; +import static engine.mbEnums.DataRecordType; +import static engine.mbEnums.PvpHistoryType; public class PvpRecord extends DataRecord { diff --git a/src/engine/db/archive/RealmRecord.java b/src/engine/db/archive/RealmRecord.java index b93ed553..a4e8af3c 100644 --- a/src/engine/db/archive/RealmRecord.java +++ b/src/engine/db/archive/RealmRecord.java @@ -9,8 +9,8 @@ package engine.db.archive; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Realm; import engine.workthreads.WarehousePushThread; @@ -23,20 +23,20 @@ public class RealmRecord extends DataRecord { private static final LinkedBlockingQueue recordPool = new LinkedBlockingQueue<>(); private Realm realm; - private Enum.RecordEventType eventType; + private mbEnums.RecordEventType eventType; private String cityHash; private String guildHash; private String charterType; private LocalDateTime eventDateTime; private RealmRecord(Realm realm) { - this.recordType = Enum.DataRecordType.REALM; + this.recordType = mbEnums.DataRecordType.REALM; this.realm = realm; - this.eventType = Enum.RecordEventType.CAPTURE; + this.eventType = mbEnums.RecordEventType.CAPTURE; } - public static RealmRecord borrow(Realm realm, Enum.RecordEventType eventType) { + public static RealmRecord borrow(Realm realm, mbEnums.RecordEventType eventType) { RealmRecord realmRecord; realmRecord = recordPool.poll(); @@ -45,7 +45,7 @@ public class RealmRecord extends DataRecord { realmRecord = new RealmRecord(realm); realmRecord.eventType = eventType; } else { - realmRecord.recordType = Enum.DataRecordType.REALM; + realmRecord.recordType = mbEnums.DataRecordType.REALM; realmRecord.eventType = eventType; realmRecord.realm = realm; @@ -53,9 +53,9 @@ public class RealmRecord extends DataRecord { realmRecord.cityHash = realm.getRulingCity().getHash(); realmRecord.guildHash = realm.getRulingCity().getGuild().getHash(); - realmRecord.charterType = Enum.CharterType.getCharterTypeByID(realmRecord.realm.getCharterType()).name(); + realmRecord.charterType = mbEnums.CharterType.getCharterTypeByID(realmRecord.realm.getCharterType()).name(); - if (realmRecord.eventType.equals(Enum.RecordEventType.CAPTURE)) + if (realmRecord.eventType.equals(mbEnums.RecordEventType.CAPTURE)) realmRecord.eventDateTime = realm.ruledSince; else realmRecord.eventDateTime = LocalDateTime.now(); diff --git a/src/engine/db/handlers/dbAccountHandler.java b/src/engine/db/handlers/dbAccountHandler.java index f34ebe60..42ec8f29 100644 --- a/src/engine/db/handlers/dbAccountHandler.java +++ b/src/engine/db/handlers/dbAccountHandler.java @@ -9,10 +9,10 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.objects.Account; import engine.objects.PlayerCharacter; import org.pmw.tinylog.Logger; @@ -27,7 +27,7 @@ public class dbAccountHandler extends dbHandlerBase { public dbAccountHandler() { this.localClass = Account.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public Account GET_ACCOUNT(int accountID) { @@ -204,7 +204,7 @@ public class dbAccountHandler extends dbHandlerBase { if (account != null) { account.runAfterLoad(); - if (ConfigManager.serverType.equals(Enum.ServerType.LOGINSERVER)) + if (ConfigManager.serverType.equals(mbEnums.ServerType.LOGINSERVER)) Account.AccountsMap.put(uname, account.getObjectUUID()); } diff --git a/src/engine/db/handlers/dbBaseClassHandler.java b/src/engine/db/handlers/dbBaseClassHandler.java index 93f144b5..ba8e6053 100644 --- a/src/engine/db/handlers/dbBaseClassHandler.java +++ b/src/engine/db/handlers/dbBaseClassHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.objects.BaseClass; import org.pmw.tinylog.Logger; @@ -25,7 +25,7 @@ public class dbBaseClassHandler extends dbHandlerBase { public dbBaseClassHandler() { this.localClass = BaseClass.class; - this.localObjectType = Enum.GameObjectType.BaseClass; + this.localObjectType = mbEnums.GameObjectType.BaseClass; } public BaseClass GET_BASE_CLASS(final int id) { diff --git a/src/engine/db/handlers/dbBuildingHandler.java b/src/engine/db/handlers/dbBuildingHandler.java index 375dbf17..024081f2 100644 --- a/src/engine/db/handlers/dbBuildingHandler.java +++ b/src/engine/db/handlers/dbBuildingHandler.java @@ -9,13 +9,13 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.DbObjectType; -import engine.Enum.ProtectionState; -import engine.Enum.TaxType; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.DbObjectType; +import engine.mbEnums.ProtectionState; +import engine.mbEnums.TaxType; import engine.objects.*; import org.joda.time.DateTime; import org.pmw.tinylog.Logger; @@ -34,7 +34,7 @@ public class dbBuildingHandler extends dbHandlerBase { public dbBuildingHandler() { this.localClass = Building.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public Building CREATE_BUILDING(int parentZoneID, int OwnerUUID, String name, int meshUUID, @@ -112,7 +112,7 @@ public class dbBuildingHandler extends dbHandlerBase { if (uuid == 0) return null; - Building building = (Building) DbManager.getFromCache(Enum.GameObjectType.Building, uuid); + Building building = (Building) DbManager.getFromCache(mbEnums.GameObjectType.Building, uuid); if (building != null) return building; diff --git a/src/engine/db/handlers/dbBuildingLocationHandler.java b/src/engine/db/handlers/dbBuildingLocationHandler.java index 7a3bbd9e..c1bf7b04 100644 --- a/src/engine/db/handlers/dbBuildingLocationHandler.java +++ b/src/engine/db/handlers/dbBuildingLocationHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.BuildingLocation; import org.pmw.tinylog.Logger; @@ -23,7 +24,7 @@ public class dbBuildingLocationHandler extends dbHandlerBase { public dbBuildingLocationHandler() { this.localClass = BuildingLocation.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList LOAD_BUILDING_LOCATIONS() { diff --git a/src/engine/db/handlers/dbCSSessionHandler.java b/src/engine/db/handlers/dbCSSessionHandler.java index 5516c733..6e26b56c 100644 --- a/src/engine/db/handlers/dbCSSessionHandler.java +++ b/src/engine/db/handlers/dbCSSessionHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Account; import engine.objects.PlayerCharacter; import engine.session.CSSession; @@ -26,7 +27,7 @@ public class dbCSSessionHandler extends dbHandlerBase { public dbCSSessionHandler() { this.localClass = CSSession.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public boolean ADD_CSSESSION(String secKey, Account acc, InetAddress inet, String machineID) { diff --git a/src/engine/db/handlers/dbCharacterPowerHandler.java b/src/engine/db/handlers/dbCharacterPowerHandler.java index f16f67fb..773bfe53 100644 --- a/src/engine/db/handlers/dbCharacterPowerHandler.java +++ b/src/engine/db/handlers/dbCharacterPowerHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.CharacterPower; import engine.objects.PlayerCharacter; import engine.server.MBServerStatics; @@ -23,7 +23,7 @@ public class dbCharacterPowerHandler extends dbHandlerBase { public dbCharacterPowerHandler() { this.localClass = CharacterPower.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public CharacterPower ADD_CHARACTER_POWER(CharacterPower toAdd) { @@ -74,7 +74,7 @@ public class dbCharacterPowerHandler extends dbHandlerBase { public CharacterPower GET_CHARACTER_POWER(int objectUUID) { - CharacterPower characterPower = (CharacterPower) DbManager.getFromCache(Enum.GameObjectType.CharacterPower, objectUUID); + CharacterPower characterPower = (CharacterPower) DbManager.getFromCache(mbEnums.GameObjectType.CharacterPower, objectUUID); if (characterPower != null) return characterPower; diff --git a/src/engine/db/handlers/dbCharacterRuneHandler.java b/src/engine/db/handlers/dbCharacterRuneHandler.java index 7cdbed5c..03949407 100644 --- a/src/engine/db/handlers/dbCharacterRuneHandler.java +++ b/src/engine/db/handlers/dbCharacterRuneHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.CharacterRune; import org.pmw.tinylog.Logger; @@ -21,7 +21,7 @@ public class dbCharacterRuneHandler extends dbHandlerBase { public dbCharacterRuneHandler() { this.localClass = CharacterRune.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public CharacterRune ADD_CHARACTER_RUNE(final CharacterRune toAdd) { @@ -49,7 +49,7 @@ public class dbCharacterRuneHandler extends dbHandlerBase { public CharacterRune GET_CHARACTER_RUNE(int runeID) { - CharacterRune characterRune = (CharacterRune) DbManager.getFromCache(Enum.GameObjectType.CharacterRune, runeID); + CharacterRune characterRune = (CharacterRune) DbManager.getFromCache(mbEnums.GameObjectType.CharacterRune, runeID); if (characterRune != null) return characterRune; diff --git a/src/engine/db/handlers/dbCharacterSkillHandler.java b/src/engine/db/handlers/dbCharacterSkillHandler.java index 49e88952..76bd88af 100644 --- a/src/engine/db/handlers/dbCharacterSkillHandler.java +++ b/src/engine/db/handlers/dbCharacterSkillHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.AbstractCharacter; import engine.objects.CharacterSkill; import engine.objects.PlayerCharacter; @@ -24,7 +24,7 @@ public class dbCharacterSkillHandler extends dbHandlerBase { public dbCharacterSkillHandler() { this.localClass = CharacterSkill.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public CharacterSkill ADD_SKILL(CharacterSkill toAdd) { @@ -72,7 +72,7 @@ public class dbCharacterSkillHandler extends dbHandlerBase { public CharacterSkill GET_SKILL(final int objectUUID) { - CharacterSkill characterSkill = (CharacterSkill) DbManager.getFromCache(Enum.GameObjectType.CharacterSkill, objectUUID); + CharacterSkill characterSkill = (CharacterSkill) DbManager.getFromCache(mbEnums.GameObjectType.CharacterSkill, objectUUID); if (characterSkill != null) return characterSkill; @@ -95,7 +95,7 @@ public class dbCharacterSkillHandler extends dbHandlerBase { ConcurrentHashMap characterSkills = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); - if (ac == null || (!(ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)))) + if (ac == null || (!(ac.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)))) return characterSkills; PlayerCharacter playerCharacter = (PlayerCharacter) ac; diff --git a/src/engine/db/handlers/dbCityHandler.java b/src/engine/db/handlers/dbCityHandler.java index c93960f8..aeb69d2d 100644 --- a/src/engine/db/handlers/dbCityHandler.java +++ b/src/engine/db/handlers/dbCityHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.AbstractGameObject; import engine.objects.Building; import engine.objects.City; @@ -25,7 +25,7 @@ public class dbCityHandler extends dbHandlerBase { public dbCityHandler() { this.localClass = City.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public static void addObject(ArrayList list, ResultSet rs) throws SQLException { @@ -118,7 +118,7 @@ public class dbCityHandler extends dbHandlerBase { public City GET_CITY(final int cityId) { - City city = (City) DbManager.getFromCache(Enum.GameObjectType.City, cityId); + City city = (City) DbManager.getFromCache(mbEnums.GameObjectType.City, cityId); if (city != null) return city; diff --git a/src/engine/db/handlers/dbContractHandler.java b/src/engine/db/handlers/dbContractHandler.java index 36670462..9354882b 100644 --- a/src/engine/db/handlers/dbContractHandler.java +++ b/src/engine/db/handlers/dbContractHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Contract; import engine.objects.Item; import engine.objects.MobLoot; @@ -25,12 +25,12 @@ public class dbContractHandler extends dbHandlerBase { public dbContractHandler() { this.localClass = Contract.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public Contract GET_CONTRACT(final int objectUUID) { - Contract contract = (Contract) DbManager.getFromCache(Enum.GameObjectType.Contract, objectUUID); + Contract contract = (Contract) DbManager.getFromCache(mbEnums.GameObjectType.Contract, objectUUID); if (contract != null) return contract; diff --git a/src/engine/db/handlers/dbEffectsBaseHandler.java b/src/engine/db/handlers/dbEffectsBaseHandler.java index 4836ec6e..cdfd76e0 100644 --- a/src/engine/db/handlers/dbEffectsBaseHandler.java +++ b/src/engine/db/handlers/dbEffectsBaseHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; -import engine.Enum; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; +import engine.mbEnums; import engine.powers.EffectsBase; import engine.powers.effectmodifiers.*; import org.pmw.tinylog.Logger; @@ -63,7 +63,7 @@ public class dbEffectsBaseHandler extends dbHandlerBase { IDString = rs.getString("IDString"); EffectsBase effectBase = PowersManager.getEffectByIDString(IDString); - Enum.ModType modifier = Enum.ModType.GetModType(rs.getString("modType")); + mbEnums.ModType modifier = mbEnums.ModType.GetModType(rs.getString("modType")); //combine item prefix and suffix effect modifiers @@ -86,7 +86,7 @@ public class dbEffectsBaseHandler extends dbHandlerBase { } - private static AbstractEffectModifier getCombinedModifiers(AbstractEffectModifier abstractEffectModifier, ResultSet rs, EffectsBase effectBase, Enum.ModType modifier) throws SQLException { + private static AbstractEffectModifier getCombinedModifiers(AbstractEffectModifier abstractEffectModifier, ResultSet rs, EffectsBase effectBase, mbEnums.ModType modifier) throws SQLException { switch (modifier) { case AdjustAboveDmgCap: abstractEffectModifier = new AdjustAboveDmgCapEffectModifier(rs); diff --git a/src/engine/db/handlers/dbEffectsResourceCostHandler.java b/src/engine/db/handlers/dbEffectsResourceCostHandler.java index deae93a9..8525144c 100644 --- a/src/engine/db/handlers/dbEffectsResourceCostHandler.java +++ b/src/engine/db/handlers/dbEffectsResourceCostHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.EffectsResourceCosts; import org.pmw.tinylog.Logger; @@ -23,7 +24,7 @@ public class dbEffectsResourceCostHandler extends dbHandlerBase { public dbEffectsResourceCostHandler() { this.localClass = EffectsResourceCosts.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList GET_ALL_EFFECT_RESOURCES(String idString) { diff --git a/src/engine/db/handlers/dbGuildHandler.java b/src/engine/db/handlers/dbGuildHandler.java index 7a61f1a7..f0ca291b 100644 --- a/src/engine/db/handlers/dbGuildHandler.java +++ b/src/engine/db/handlers/dbGuildHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.GuildHistoryType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GuildHistoryType; import engine.objects.*; import engine.server.world.WorldServer; import org.joda.time.DateTime; @@ -24,7 +24,7 @@ public class dbGuildHandler extends dbHandlerBase { public dbGuildHandler() { this.localClass = Guild.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public static ArrayList GET_GUILD_BANISHED(final int id) { @@ -276,7 +276,7 @@ public class dbGuildHandler extends dbHandlerBase { public Guild GET_GUILD(int id) { - Guild guild = (Guild) DbManager.getFromCache(Enum.GameObjectType.Guild, id); + Guild guild = (Guild) DbManager.getFromCache(mbEnums.GameObjectType.Guild, id); if (guild != null) return guild; diff --git a/src/engine/db/handlers/dbHandlerBase.java b/src/engine/db/handlers/dbHandlerBase.java index 1e1ee851..92cb21bb 100644 --- a/src/engine/db/handlers/dbHandlerBase.java +++ b/src/engine/db/handlers/dbHandlerBase.java @@ -9,10 +9,10 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.AbstractWorldObject; import org.pmw.tinylog.Logger; @@ -42,7 +42,7 @@ public abstract class dbHandlerBase { // Only call runAfterLoad() for objects instanced on the world server if ((abstractGameObject != null && abstractGameObject instanceof AbstractWorldObject) && - (ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER) || + (ConfigManager.serverType.equals(mbEnums.ServerType.WORLDSERVER) || (abstractGameObject.getObjectType() == GameObjectType.Guild))) ((AbstractWorldObject) abstractGameObject).runAfterLoad(); diff --git a/src/engine/db/handlers/dbItemHandler.java b/src/engine/db/handlers/dbItemHandler.java index bd8c7d1b..040441e0 100644 --- a/src/engine/db/handlers/dbItemHandler.java +++ b/src/engine/db/handlers/dbItemHandler.java @@ -9,10 +9,10 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.ItemContainerType; -import engine.Enum.ItemType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.ItemContainerType; +import engine.mbEnums.ItemType; import engine.objects.AbstractCharacter; import engine.objects.CharacterItemManager; import engine.objects.Item; @@ -33,7 +33,7 @@ public class dbItemHandler extends dbHandlerBase { public dbItemHandler() { this.localClass = Item.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } private static String formatTradeString(HashSet list) { @@ -92,14 +92,14 @@ public class dbItemHandler extends dbHandlerBase { break; } - if (toAdd.equipSlot.equals(Enum.EquipSlotType.NONE)) + if (toAdd.equipSlot.equals(mbEnums.EquipSlotType.NONE)) preparedStatement.setString(7, ""); else preparedStatement.setString(7, toAdd.equipSlot.name()); String flagString = ""; - for (Enum.ItemFlags itemflag : toAdd.flags) + for (mbEnums.ItemFlags itemflag : toAdd.flags) flagString += itemflag.toString() + ";"; flagString = flagString.replaceAll(";$", ""); @@ -366,7 +366,7 @@ public class dbItemHandler extends dbHandlerBase { //Used to transfer a single item between owners or equip or vault or bank or inventory public boolean UPDATE_OWNER(final Item item, int newOwnerID, - ItemContainerType containerType, Enum.EquipSlotType slot) { + ItemContainerType containerType, mbEnums.EquipSlotType slot) { boolean worked = false; @@ -401,7 +401,7 @@ public class dbItemHandler extends dbHandlerBase { break; } - if (slot.equals(Enum.EquipSlotType.NONE)) + if (slot.equals(mbEnums.EquipSlotType.NONE)) preparedStatement.setString(4, ""); else preparedStatement.setString(4, slot.name()); @@ -531,7 +531,7 @@ public class dbItemHandler extends dbHandlerBase { String flagString = ""; - for (Enum.ItemFlags itemflag : item.flags) + for (mbEnums.ItemFlags itemflag : item.flags) flagString += itemflag.toString() + ";"; flagString = flagString.replaceAll(";$", ""); @@ -573,7 +573,7 @@ public class dbItemHandler extends dbHandlerBase { try (Connection connection = DbManager.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_item` SET `equipSlot`=? WHERE `UID` = ?")) { - if (item.equipSlot.equals(Enum.EquipSlotType.NONE)) + if (item.equipSlot.equals(mbEnums.EquipSlotType.NONE)) preparedStatement.setString(1, ""); else preparedStatement.setString(1, item.equipSlot.name()); diff --git a/src/engine/db/handlers/dbKitHandler.java b/src/engine/db/handlers/dbKitHandler.java index b23e94a6..f142f901 100644 --- a/src/engine/db/handlers/dbKitHandler.java +++ b/src/engine/db/handlers/dbKitHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Kit; import org.pmw.tinylog.Logger; @@ -23,7 +24,7 @@ public class dbKitHandler extends dbHandlerBase { public dbKitHandler() { this.localClass = Kit.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList GET_ALL_KITS() { diff --git a/src/engine/db/handlers/dbMenuHandler.java b/src/engine/db/handlers/dbMenuHandler.java index 959b0e23..193a2f8f 100644 --- a/src/engine/db/handlers/dbMenuHandler.java +++ b/src/engine/db/handlers/dbMenuHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.MenuOption; import org.pmw.tinylog.Logger; @@ -23,7 +24,7 @@ public class dbMenuHandler extends dbHandlerBase { public dbMenuHandler() { this.localClass = MenuOption.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList GET_MENU_OPTIONS(final int id) { diff --git a/src/engine/db/handlers/dbMineHandler.java b/src/engine/db/handlers/dbMineHandler.java index c3733bfd..6b07ff10 100644 --- a/src/engine/db/handlers/dbMineHandler.java +++ b/src/engine/db/handlers/dbMineHandler.java @@ -8,7 +8,7 @@ package engine.db.handlers; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.objects.Mine; import engine.objects.MineProduction; @@ -24,7 +24,7 @@ public class dbMineHandler extends dbHandlerBase { public dbMineHandler() { this.localClass = Mine.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public Mine GET_MINE(int id) { @@ -32,7 +32,7 @@ public class dbMineHandler extends dbHandlerBase { if (id == 0) return null; - Mine mine = (Mine) DbManager.getFromCache(Enum.GameObjectType.Mine, id); + Mine mine = (Mine) DbManager.getFromCache(mbEnums.GameObjectType.Mine, id); if (mine != null) return mine; @@ -83,7 +83,7 @@ public class dbMineHandler extends dbHandlerBase { return false; } - public boolean CHANGE_RESOURCE(Mine mine, Enum.ResourceType resource) { + public boolean CHANGE_RESOURCE(Mine mine, mbEnums.ResourceType resource) { try (Connection connection = DbManager.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_mine` SET `mine_resource`=? WHERE `UID`=?")) { diff --git a/src/engine/db/handlers/dbMobBaseHandler.java b/src/engine/db/handlers/dbMobBaseHandler.java index 0337ff76..e41454da 100644 --- a/src/engine/db/handlers/dbMobBaseHandler.java +++ b/src/engine/db/handlers/dbMobBaseHandler.java @@ -9,7 +9,8 @@ package engine.db.handlers; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.gameManager.DbManager; import engine.objects.MobBase; import engine.objects.MobBaseEffects; @@ -26,7 +27,7 @@ public class dbMobBaseHandler extends dbHandlerBase { public dbMobBaseHandler() { this.localClass = MobBase.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public MobBase GET_MOBBASE(int id) { diff --git a/src/engine/db/handlers/dbMobHandler.java b/src/engine/db/handlers/dbMobHandler.java index ae8cb0da..5ae550ff 100644 --- a/src/engine/db/handlers/dbMobHandler.java +++ b/src/engine/db/handlers/dbMobHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.Mob; import org.joda.time.DateTime; import org.pmw.tinylog.Logger; @@ -24,7 +25,7 @@ public class dbMobHandler extends dbHandlerBase { public dbMobHandler() { this.localClass = Mob.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public Mob PERSIST(Mob toAdd) { diff --git a/src/engine/db/handlers/dbNPCHandler.java b/src/engine/db/handlers/dbNPCHandler.java index 41b62b8f..edf1005f 100644 --- a/src/engine/db/handlers/dbNPCHandler.java +++ b/src/engine/db/handlers/dbNPCHandler.java @@ -9,7 +9,8 @@ package engine.db.handlers; -import engine.Enum.ProfitType; +import engine.mbEnums; +import engine.mbEnums.ProfitType; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; import engine.objects.NPC; @@ -29,7 +30,7 @@ public class dbNPCHandler extends dbHandlerBase { public dbNPCHandler() { this.localClass = NPC.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public static HashMap> LOAD_RUNES_FOR_NPC_AND_MOBS() { diff --git a/src/engine/db/handlers/dbPetitionHandler.java b/src/engine/db/handlers/dbPetitionHandler.java index 23237c01..48d35926 100644 --- a/src/engine/db/handlers/dbPetitionHandler.java +++ b/src/engine/db/handlers/dbPetitionHandler.java @@ -9,7 +9,7 @@ package engine.db.handlers; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.objects.Petition; import org.pmw.tinylog.Logger; @@ -58,8 +58,8 @@ public class dbPetitionHandler extends dbHandlerBase { " VALUES (?,?,?,?,?,?,?,?,?);")) { preparedStatement.setTimestamp(1, new java.sql.Timestamp(System.currentTimeMillis())); - preparedStatement.setString(2, Enum.PetitionType.values()[petition.primaryType].name()); - preparedStatement.setString(3, Enum.PetitionSubType.values()[petition.subType].name()); + preparedStatement.setString(2, mbEnums.PetitionType.values()[petition.primaryType].name()); + preparedStatement.setString(3, mbEnums.PetitionSubType.values()[petition.subType].name()); preparedStatement.setInt(4, petition.reportAccount.getObjectUUID()); preparedStatement.setString(5, petition.reportAccount.getUname()); preparedStatement.setInt(6, petition.reportPlayer.getObjectUUID()); diff --git a/src/engine/db/handlers/dbPlayerCharacterHandler.java b/src/engine/db/handlers/dbPlayerCharacterHandler.java index b36fe1d2..a3e51d4a 100644 --- a/src/engine/db/handlers/dbPlayerCharacterHandler.java +++ b/src/engine/db/handlers/dbPlayerCharacterHandler.java @@ -9,7 +9,7 @@ package engine.db.handlers; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.objects.AbstractWorldObject; import engine.objects.Heraldry; @@ -29,7 +29,7 @@ public class dbPlayerCharacterHandler extends dbHandlerBase { public dbPlayerCharacterHandler() { this.localClass = PlayerCharacter.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public PlayerCharacter ADD_PLAYER_CHARACTER(final PlayerCharacter toAdd) { @@ -176,7 +176,7 @@ public class dbPlayerCharacterHandler extends dbHandlerBase { if (objectUUID == 0) return null; - PlayerCharacter playerCharacter = (PlayerCharacter) DbManager.getFromCache(Enum.GameObjectType.PlayerCharacter, objectUUID); + PlayerCharacter playerCharacter = (PlayerCharacter) DbManager.getFromCache(mbEnums.GameObjectType.PlayerCharacter, objectUUID); if (playerCharacter != null) return playerCharacter; diff --git a/src/engine/db/handlers/dbPowerHandler.java b/src/engine/db/handlers/dbPowerHandler.java index e9714afe..c78fae82 100644 --- a/src/engine/db/handlers/dbPowerHandler.java +++ b/src/engine/db/handlers/dbPowerHandler.java @@ -9,7 +9,7 @@ package engine.db.handlers; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; import engine.objects.Mob; @@ -25,7 +25,7 @@ public class dbPowerHandler extends dbHandlerBase { public dbPowerHandler() { this.localClass = Mob.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public static void addAllSourceTypes() { @@ -41,7 +41,7 @@ public class dbPowerHandler extends dbHandlerBase { int token = DbManager.hasher.SBStringHash(IDString); source = rs.getString("source").replace("-", "").trim(); - Enum.EffectSourceType effectSourceType = Enum.EffectSourceType.GetEffectSourceType(source); + mbEnums.EffectSourceType effectSourceType = mbEnums.EffectSourceType.GetEffectSourceType(source); if (EffectsBase.effectSourceTypeMap.containsKey(token) == false) EffectsBase.effectSourceTypeMap.put(token, new HashSet<>()); diff --git a/src/engine/db/handlers/dbPromotionClassHandler.java b/src/engine/db/handlers/dbPromotionClassHandler.java index aef9af8e..bf41adb9 100644 --- a/src/engine/db/handlers/dbPromotionClassHandler.java +++ b/src/engine/db/handlers/dbPromotionClassHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.PromotionClass; import org.pmw.tinylog.Logger; @@ -23,7 +24,7 @@ public class dbPromotionClassHandler extends dbHandlerBase { public dbPromotionClassHandler() { this.localClass = PromotionClass.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList GET_ALLOWED_RUNES(final PromotionClass pc) { diff --git a/src/engine/db/handlers/dbRuneBaseAttributeHandler.java b/src/engine/db/handlers/dbRuneBaseAttributeHandler.java index 536addb5..f267cb73 100644 --- a/src/engine/db/handlers/dbRuneBaseAttributeHandler.java +++ b/src/engine/db/handlers/dbRuneBaseAttributeHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.RuneBaseAttribute; import org.pmw.tinylog.Logger; @@ -23,7 +24,7 @@ public class dbRuneBaseAttributeHandler extends dbHandlerBase { public dbRuneBaseAttributeHandler() { this.localClass = RuneBaseAttribute.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList GET_ATTRIBUTES_FOR_RUNEBASE() { diff --git a/src/engine/db/handlers/dbRuneBaseEffectHandler.java b/src/engine/db/handlers/dbRuneBaseEffectHandler.java index def0f204..926c5973 100644 --- a/src/engine/db/handlers/dbRuneBaseEffectHandler.java +++ b/src/engine/db/handlers/dbRuneBaseEffectHandler.java @@ -9,7 +9,8 @@ package engine.db.handlers; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.gameManager.DbManager; import engine.objects.AbstractGameObject; import engine.objects.RuneBaseEffect; @@ -26,7 +27,7 @@ public class dbRuneBaseEffectHandler extends dbHandlerBase { public dbRuneBaseEffectHandler() { this.localClass = RuneBaseEffect.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList GET_EFFECTS_FOR_RUNEBASE(int id) { diff --git a/src/engine/db/handlers/dbRuneBaseHandler.java b/src/engine/db/handlers/dbRuneBaseHandler.java index 1d7a79b6..6ad2e65f 100644 --- a/src/engine/db/handlers/dbRuneBaseHandler.java +++ b/src/engine/db/handlers/dbRuneBaseHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.RuneBase; import engine.powers.RunePowerEntry; import engine.powers.RuneSkillAdjustEntry; @@ -26,7 +27,7 @@ public class dbRuneBaseHandler extends dbHandlerBase { public dbRuneBaseHandler() { this.localClass = RuneBase.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public static HashMap> LOAD_RUNE_POWERS() { diff --git a/src/engine/db/handlers/dbRunegateHandler.java b/src/engine/db/handlers/dbRunegateHandler.java index 50b928b0..5fd3bd28 100644 --- a/src/engine/db/handlers/dbRunegateHandler.java +++ b/src/engine/db/handlers/dbRunegateHandler.java @@ -9,7 +9,7 @@ package engine.db.handlers; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.objects.Building; import engine.objects.Portal; @@ -49,7 +49,7 @@ public class dbRunegateHandler extends dbHandlerBase { public ArrayList GET_PORTAL_LIST(int gateUID) { ArrayList portalList = new ArrayList<>(); - Building sourceBuilding = (Building) DbManager.getObject(Enum.GameObjectType.Building, gateUID); + Building sourceBuilding = (Building) DbManager.getObject(mbEnums.GameObjectType.Building, gateUID); try (Connection connection = DbManager.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_runegate_portals` WHERE `sourceBuilding` = ?;")) { @@ -60,8 +60,8 @@ public class dbRunegateHandler extends dbHandlerBase { while (rs.next()) { int targetBuildingID = rs.getInt("targetBuilding"); - Building targetBuilding = (Building) DbManager.getObject(Enum.GameObjectType.Building, targetBuildingID); - Enum.PortalType portalType = Enum.PortalType.valueOf(rs.getString("portalType")); + Building targetBuilding = (Building) DbManager.getObject(mbEnums.GameObjectType.Building, targetBuildingID); + mbEnums.PortalType portalType = mbEnums.PortalType.valueOf(rs.getString("portalType")); Portal portal = new Portal(sourceBuilding, portalType, targetBuilding); portalList.add(portal); } diff --git a/src/engine/db/handlers/dbShrineHandler.java b/src/engine/db/handlers/dbShrineHandler.java index 5857372a..efaa9187 100644 --- a/src/engine/db/handlers/dbShrineHandler.java +++ b/src/engine/db/handlers/dbShrineHandler.java @@ -9,7 +9,8 @@ package engine.db.handlers; -import engine.Enum.ProtectionState; +import engine.mbEnums; +import engine.mbEnums.ProtectionState; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; import engine.objects.AbstractGameObject; @@ -28,7 +29,7 @@ public class dbShrineHandler extends dbHandlerBase { public dbShrineHandler() { this.localClass = Shrine.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public static void addObject(ArrayList list, ResultSet rs) throws SQLException { diff --git a/src/engine/db/handlers/dbSkillBaseHandler.java b/src/engine/db/handlers/dbSkillBaseHandler.java index 3bfdefe6..d48f1cda 100644 --- a/src/engine/db/handlers/dbSkillBaseHandler.java +++ b/src/engine/db/handlers/dbSkillBaseHandler.java @@ -9,8 +9,8 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.gameManager.DbManager; import engine.objects.MaxSkills; import engine.objects.SkillsBase; @@ -27,7 +27,7 @@ public class dbSkillBaseHandler extends dbHandlerBase { public dbSkillBaseHandler() { this.localClass = SkillsBase.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public SkillsBase GET_BASE(final int objectUUID) { diff --git a/src/engine/db/handlers/dbSkillReqHandler.java b/src/engine/db/handlers/dbSkillReqHandler.java index c2e0830c..012c8e07 100644 --- a/src/engine/db/handlers/dbSkillReqHandler.java +++ b/src/engine/db/handlers/dbSkillReqHandler.java @@ -10,6 +10,7 @@ package engine.db.handlers; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.objects.SkillReq; import engine.powers.PowersBase; import org.pmw.tinylog.Logger; @@ -25,7 +26,7 @@ public class dbSkillReqHandler extends dbHandlerBase { public dbSkillReqHandler() { this.localClass = SkillReq.class; - this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public static ArrayList getAllPowersBase() { diff --git a/src/engine/db/handlers/dbVendorDialogHandler.java b/src/engine/db/handlers/dbVendorDialogHandler.java index 8bcc40ee..49167024 100644 --- a/src/engine/db/handlers/dbVendorDialogHandler.java +++ b/src/engine/db/handlers/dbVendorDialogHandler.java @@ -9,7 +9,7 @@ package engine.db.handlers; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.objects.VendorDialog; import org.pmw.tinylog.Logger; @@ -23,12 +23,12 @@ public class dbVendorDialogHandler extends dbHandlerBase { public dbVendorDialogHandler() { this.localClass = VendorDialog.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public VendorDialog GET_VENDORDIALOG(final int objectUUID) { - VendorDialog vendorDialog = (VendorDialog) DbManager.getFromCache(Enum.GameObjectType.VendorDialog, objectUUID); + VendorDialog vendorDialog = (VendorDialog) DbManager.getFromCache(mbEnums.GameObjectType.VendorDialog, objectUUID); if (vendorDialog != null) return vendorDialog; diff --git a/src/engine/db/handlers/dbWarehouseHandler.java b/src/engine/db/handlers/dbWarehouseHandler.java index 16ef8e49..f70cb5ff 100644 --- a/src/engine/db/handlers/dbWarehouseHandler.java +++ b/src/engine/db/handlers/dbWarehouseHandler.java @@ -9,9 +9,9 @@ package engine.db.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.TransactionType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.TransactionType; import engine.gameManager.DbManager; import engine.objects.Building; import engine.objects.City; @@ -39,7 +39,7 @@ public class dbWarehouseHandler extends dbHandlerBase { } - public boolean CREATE_TRANSACTION(int warehouseBuildingID, GameObjectType targetType, int targetUUID, TransactionType transactionType, Enum.ResourceType resource, int amount, DateTime date) { + public boolean CREATE_TRANSACTION(int warehouseBuildingID, GameObjectType targetType, int targetUUID, TransactionType transactionType, mbEnums.ResourceType resource, int amount, DateTime date) { try (Connection connection = DbManager.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO `dyn_warehouse_transactions` (`warehouseUID`, `targetType`,`targetUID`, `type`,`resource`,`amount`,`date` ) VALUES (?,?,?,?,?,?,?)")) { @@ -105,7 +105,7 @@ public class dbWarehouseHandler extends dbHandlerBase { JSONArray locks = new JSONArray(); - for (Enum.ResourceType resource : warehouse.locked) + for (mbEnums.ResourceType resource : warehouse.locked) locks.add(resource.name()); warehouseJSON.put("locked", locks); @@ -142,7 +142,7 @@ public class dbWarehouseHandler extends dbHandlerBase { // Locate warehouse building for (Building building : city.parentZone.zoneBuildingSet) { - if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.WAREHOUSE)) { + if (building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.WAREHOUSE)) { city.warehouse.building = building; break; } diff --git a/src/engine/db/handlers/dbZoneHandler.java b/src/engine/db/handlers/dbZoneHandler.java index 136385f9..f20b3759 100644 --- a/src/engine/db/handlers/dbZoneHandler.java +++ b/src/engine/db/handlers/dbZoneHandler.java @@ -9,7 +9,7 @@ package engine.db.handlers; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; import engine.objects.Zone; @@ -26,7 +26,7 @@ public class dbZoneHandler extends dbHandlerBase { public dbZoneHandler() { this.localClass = Zone.class; - this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); + this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); } public ArrayList GET_ALL_ZONES() { @@ -48,7 +48,7 @@ public class dbZoneHandler extends dbHandlerBase { public Zone GET_BY_UID(long ID) { - Zone zone = (Zone) DbManager.getFromCache(Enum.GameObjectType.Zone, (int) ID); + Zone zone = (Zone) DbManager.getFromCache(mbEnums.GameObjectType.Zone, (int) ID); if (zone != null) return zone; @@ -90,8 +90,8 @@ public class dbZoneHandler extends dbHandlerBase { zoneTemplate.max_blend = 128; zoneTemplate.min_blend = 128; zoneTemplate.terrain_max_y = 5; - zoneTemplate.major_radius = (int) Enum.CityBoundsType.ZONE.halfExtents; - zoneTemplate.minor_radius = (int) Enum.CityBoundsType.ZONE.halfExtents; + zoneTemplate.major_radius = (int) mbEnums.CityBoundsType.ZONE.halfExtents; + zoneTemplate.minor_radius = (int) mbEnums.CityBoundsType.ZONE.halfExtents; zoneTemplate.terrain_type = "PLANAR"; ZoneManager._zone_templates.put(zoneTemplate.templateID, zoneTemplate); diff --git a/src/engine/devcmd/AbstractDevCmd.java b/src/engine/devcmd/AbstractDevCmd.java index ae2364b6..a911e2b7 100644 --- a/src/engine/devcmd/AbstractDevCmd.java +++ b/src/engine/devcmd/AbstractDevCmd.java @@ -9,9 +9,9 @@ package engine.devcmd; -import engine.Enum.GameObjectType; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; +import engine.mbEnums.GameObjectType; import engine.objects.*; import java.util.ArrayList; diff --git a/src/engine/devcmd/cmds/AddBuildingCmd.java b/src/engine/devcmd/cmds/AddBuildingCmd.java index 537faab1..af29a4a2 100644 --- a/src/engine/devcmd/cmds/AddBuildingCmd.java +++ b/src/engine/devcmd/cmds/AddBuildingCmd.java @@ -9,7 +9,6 @@ package engine.devcmd.cmds; -import engine.Enum.ProtectionState; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; @@ -17,6 +16,7 @@ import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums.ProtectionState; import engine.objects.*; import engine.server.MBServerStatics; diff --git a/src/engine/devcmd/cmds/AddMobCmd.java b/src/engine/devcmd/cmds/AddMobCmd.java index 49e872d3..80d03988 100644 --- a/src/engine/devcmd/cmds/AddMobCmd.java +++ b/src/engine/devcmd/cmds/AddMobCmd.java @@ -9,10 +9,10 @@ package engine.devcmd.cmds; -import engine.Enum; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; import engine.gameManager.ZoneManager; +import engine.mbEnums; import engine.objects.AbstractGameObject; import engine.objects.Mob; import engine.objects.PlayerCharacter; @@ -61,7 +61,7 @@ public class AddMobCmd extends AbstractDevCmd { } Mob mob = Mob.createMob(loadID, pc.getLoc(), - null, zone, null, null, "", 1, Enum.AIAgentType.MOBILE); + null, zone, null, null, "", 1, mbEnums.AIAgentType.MOBILE); if (mob != null) { mob.updateDatabase(); diff --git a/src/engine/devcmd/cmds/AddNPCCmd.java b/src/engine/devcmd/cmds/AddNPCCmd.java index 495d2517..c2f6dec1 100644 --- a/src/engine/devcmd/cmds/AddNPCCmd.java +++ b/src/engine/devcmd/cmds/AddNPCCmd.java @@ -9,10 +9,10 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.*; +import engine.mbEnums.GameObjectType; import engine.objects.*; import org.pmw.tinylog.Logger; diff --git a/src/engine/devcmd/cmds/ApplyBonusCmd.java b/src/engine/devcmd/cmds/ApplyBonusCmd.java index 898332fc..65fee3e6 100644 --- a/src/engine/devcmd/cmds/ApplyBonusCmd.java +++ b/src/engine/devcmd/cmds/ApplyBonusCmd.java @@ -9,10 +9,10 @@ package engine.devcmd.cmds; -import engine.Enum.PowerActionType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; import engine.gameManager.PowersManager; +import engine.mbEnums.PowerActionType; import engine.objects.AbstractGameObject; import engine.objects.PlayerCharacter; import engine.powers.ActionsBase; diff --git a/src/engine/devcmd/cmds/BoundsCmd.java b/src/engine/devcmd/cmds/BoundsCmd.java index e6a1a7aa..8a83a281 100644 --- a/src/engine/devcmd/cmds/BoundsCmd.java +++ b/src/engine/devcmd/cmds/BoundsCmd.java @@ -9,8 +9,8 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; import engine.devcmd.AbstractDevCmd; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.Building; import engine.objects.PlayerCharacter; diff --git a/src/engine/devcmd/cmds/GotoCmd.java b/src/engine/devcmd/cmds/GotoCmd.java index 93ae4e5f..bc343594 100644 --- a/src/engine/devcmd/cmds/GotoCmd.java +++ b/src/engine/devcmd/cmds/GotoCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; diff --git a/src/engine/devcmd/cmds/GotoObj.java b/src/engine/devcmd/cmds/GotoObj.java index e6e69b8c..3a4ec10b 100644 --- a/src/engine/devcmd/cmds/GotoObj.java +++ b/src/engine/devcmd/cmds/GotoObj.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum; +import engine.mbEnums; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; @@ -27,7 +27,7 @@ public class GotoObj extends AbstractDevCmd { int uuid; Vector3fImmutable targetLoc = Vector3fImmutable.ZERO; - Enum.DbObjectType objectType; + mbEnums.DbObjectType objectType; try { uuid = Integer.parseInt(words[0]); @@ -41,37 +41,37 @@ public class GotoObj extends AbstractDevCmd { switch (objectType) { case NPC: - NPC npc = (NPC) DbManager.getFromCache(Enum.GameObjectType.NPC, uuid); + NPC npc = (NPC) DbManager.getFromCache(mbEnums.GameObjectType.NPC, uuid); if (npc != null) targetLoc = npc.getLoc(); break; case MOB: - Mob mob = (Mob) DbManager.getFromCache(Enum.GameObjectType.Mob, uuid); + Mob mob = (Mob) DbManager.getFromCache(mbEnums.GameObjectType.Mob, uuid); if (mob != null) targetLoc = mob.getLoc(); break; case CHARACTER: - PlayerCharacter playerCharacter = (PlayerCharacter) DbManager.getFromCache(Enum.GameObjectType.PlayerCharacter, uuid); + PlayerCharacter playerCharacter = (PlayerCharacter) DbManager.getFromCache(mbEnums.GameObjectType.PlayerCharacter, uuid); if (playerCharacter != null) targetLoc = playerCharacter.getLoc(); break; case BUILDING: - Building building = (Building) DbManager.getFromCache(Enum.GameObjectType.Building, uuid); + Building building = (Building) DbManager.getFromCache(mbEnums.GameObjectType.Building, uuid); if (building != null) targetLoc = building.getLoc(); break; case ZONE: - Zone zone = (Zone) DbManager.getFromCache(Enum.GameObjectType.Zone, uuid); + Zone zone = (Zone) DbManager.getFromCache(mbEnums.GameObjectType.Zone, uuid); if (zone != null) targetLoc = zone.getLoc(); break; case CITY: - City city = (City) DbManager.getFromCache(Enum.GameObjectType.City, uuid); + City city = (City) DbManager.getFromCache(mbEnums.GameObjectType.City, uuid); if (city != null) targetLoc = city.getLoc(); diff --git a/src/engine/devcmd/cmds/InfoCmd.java b/src/engine/devcmd/cmds/InfoCmd.java index a8bd662c..6280d876 100644 --- a/src/engine/devcmd/cmds/InfoCmd.java +++ b/src/engine/devcmd/cmds/InfoCmd.java @@ -9,14 +9,14 @@ package engine.devcmd.cmds; -import engine.Enum; -import engine.Enum.BuildingGroup; -import engine.Enum.GameObjectType; -import engine.Enum.TargetColor; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.TargetColor; import engine.objects.*; import engine.util.StringUtils; @@ -436,7 +436,7 @@ public class InfoCmd extends AbstractDevCmd { if (targetMob.isPet()) { output += "isPet: true"; output += newline; - if ((targetMob.agentType.equals(Enum.AIAgentType.PET))) + if ((targetMob.agentType.equals(mbEnums.AIAgentType.PET))) output += "isSummonedPet: true"; else output += "isSummonedPet: false"; @@ -456,7 +456,7 @@ public class InfoCmd extends AbstractDevCmd { output += newline; } - if ((targetMob.agentType.equals(Enum.AIAgentType.MOBILE))) { + if ((targetMob.agentType.equals(mbEnums.AIAgentType.MOBILE))) { output += "SpawnRadius: " + targetMob.getSpawnRadius(); output += newline; output += "Spawn Timer: " + targetMob.getSpawnTimeAsString(); diff --git a/src/engine/devcmd/cmds/MakeBaneCmd.java b/src/engine/devcmd/cmds/MakeBaneCmd.java index fb521c0f..4eb6aaec 100644 --- a/src/engine/devcmd/cmds/MakeBaneCmd.java +++ b/src/engine/devcmd/cmds/MakeBaneCmd.java @@ -9,7 +9,6 @@ package engine.devcmd.cmds; -import engine.Enum.ProtectionState; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; @@ -18,6 +17,7 @@ import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums.ProtectionState; import engine.objects.*; import org.pmw.tinylog.Logger; diff --git a/src/engine/devcmd/cmds/MakeItemCmd.java b/src/engine/devcmd/cmds/MakeItemCmd.java index b276080d..14200fe9 100644 --- a/src/engine/devcmd/cmds/MakeItemCmd.java +++ b/src/engine/devcmd/cmds/MakeItemCmd.java @@ -9,10 +9,10 @@ package engine.devcmd.cmds; -import engine.Enum.ItemType; -import engine.Enum.OwnerType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; +import engine.mbEnums.ItemType; +import engine.mbEnums.OwnerType; import engine.objects.*; import engine.powers.EffectsBase; diff --git a/src/engine/devcmd/cmds/PrintBonusesCmd.java b/src/engine/devcmd/cmds/PrintBonusesCmd.java index bb1015e1..fe3a74e9 100644 --- a/src/engine/devcmd/cmds/PrintBonusesCmd.java +++ b/src/engine/devcmd/cmds/PrintBonusesCmd.java @@ -9,9 +9,9 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; +import engine.mbEnums.GameObjectType; import engine.objects.*; import engine.powers.effectmodifiers.AbstractEffectModifier; diff --git a/src/engine/devcmd/cmds/PrintEquipCmd.java b/src/engine/devcmd/cmds/PrintEquipCmd.java index 321e27a1..0779a20d 100644 --- a/src/engine/devcmd/cmds/PrintEquipCmd.java +++ b/src/engine/devcmd/cmds/PrintEquipCmd.java @@ -9,9 +9,9 @@ package engine.devcmd.cmds; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.devcmd.AbstractDevCmd; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.objects.*; import java.util.concurrent.ConcurrentHashMap; @@ -64,7 +64,7 @@ public class PrintEquipCmd extends AbstractDevCmd { if (tar.getObjectType() == GameObjectType.Mob) { Mob tarMob = (Mob) tar; throwbackInfo(pc, "Equip for " + type + ' ' + name + " (" + tar.getObjectUUID() + ')'); - for (Enum.EquipSlotType slot : tarMob.charItemManager.equipped.keySet()) { + for (mbEnums.EquipSlotType slot : tarMob.charItemManager.equipped.keySet()) { Item equip = tarMob.charItemManager.equipped.get(slot); throwbackInfo(pc, equip.templateID + " : " + equip.template.item_base_name + ", slot: " + slot); } @@ -74,7 +74,7 @@ public class PrintEquipCmd extends AbstractDevCmd { if (tar.getObjectType() == GameObjectType.NPC) { NPC tarMob = (NPC) tar; throwbackInfo(pc, "Equip for " + type + ' ' + name + " (" + tar.getObjectUUID() + ')'); - for (Enum.EquipSlotType slot : tarMob.charItemManager.equipped.keySet()) { + for (mbEnums.EquipSlotType slot : tarMob.charItemManager.equipped.keySet()) { Item equip = tarMob.charItemManager.equipped.get(slot); throwbackInfo(pc, equip.templateID + " : " + equip.template.item_base_name + ", slot: " + slot); } @@ -82,10 +82,10 @@ public class PrintEquipCmd extends AbstractDevCmd { } CharacterItemManager cim = ((AbstractCharacter) tar).charItemManager; - ConcurrentHashMap list = cim.getEquipped(); + ConcurrentHashMap list = cim.getEquipped(); throwbackInfo(pc, "Equip for " + type + ' ' + name + " (" + tar.getObjectUUID() + ')'); - for (Enum.EquipSlotType slot : list.keySet()) { + for (mbEnums.EquipSlotType slot : list.keySet()) { Item item = list.get(slot); throwbackInfo(pc, " " + item.template.item_base_name + ", slot: " + slot); } diff --git a/src/engine/devcmd/cmds/PrintInventoryCmd.java b/src/engine/devcmd/cmds/PrintInventoryCmd.java index e2b68464..d0c7ac1e 100644 --- a/src/engine/devcmd/cmds/PrintInventoryCmd.java +++ b/src/engine/devcmd/cmds/PrintInventoryCmd.java @@ -9,8 +9,8 @@ package engine.devcmd.cmds; -import engine.Enum.ItemType; import engine.devcmd.AbstractDevCmd; +import engine.mbEnums.ItemType; import engine.objects.*; import java.text.DecimalFormat; diff --git a/src/engine/devcmd/cmds/PrintSkillsCmd.java b/src/engine/devcmd/cmds/PrintSkillsCmd.java index 51fbe1bc..e315b9bc 100644 --- a/src/engine/devcmd/cmds/PrintSkillsCmd.java +++ b/src/engine/devcmd/cmds/PrintSkillsCmd.java @@ -9,8 +9,8 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; import engine.devcmd.AbstractDevCmd; +import engine.mbEnums.GameObjectType; import engine.objects.*; import java.util.concurrent.ConcurrentHashMap; diff --git a/src/engine/devcmd/cmds/PrintStatsCmd.java b/src/engine/devcmd/cmds/PrintStatsCmd.java index 6fd7315d..01bf42f3 100644 --- a/src/engine/devcmd/cmds/PrintStatsCmd.java +++ b/src/engine/devcmd/cmds/PrintStatsCmd.java @@ -9,9 +9,9 @@ package engine.devcmd.cmds; -import engine.Enum; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ItemManager; +import engine.mbEnums; import engine.objects.*; /** @@ -88,7 +88,7 @@ public class PrintStatsCmd extends AbstractDevCmd { //get weapons if (tar.charItemManager.equipped.isEmpty() == false) - if (tar.charItemManager.equipped.get(Enum.EquipSlotType.LHELD) != null && !ItemManager.isShield(tar.charItemManager.equipped.get(Enum.EquipSlotType.LHELD))) { + if (tar.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD) != null && !ItemManager.isShield(tar.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD))) { //off hand weapon out += "Attack Rating: " + tar.atrHandTwo + newline; out += "Damage: " + tar.minDamageHandTwo + " - " + tar.maxDamageHandTwo + newline; diff --git a/src/engine/devcmd/cmds/PurgeObjectsCmd.java b/src/engine/devcmd/cmds/PurgeObjectsCmd.java index 23c5a1c8..2725eb37 100644 --- a/src/engine/devcmd/cmds/PurgeObjectsCmd.java +++ b/src/engine/devcmd/cmds/PurgeObjectsCmd.java @@ -1,14 +1,14 @@ package engine.devcmd.cmds; -import engine.Enum; -import engine.Enum.BuildingGroup; -import engine.Enum.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GameObjectType; import engine.objects.*; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; @@ -163,7 +163,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd { mob.getParentZone().zoneMobSet.remove(mob); } DbManager.NPCQueries.DELETE_NPC(npc); - DbManager.removeFromCache(Enum.GameObjectType.NPC, + DbManager.removeFromCache(mbEnums.GameObjectType.NPC, npc.getObjectUUID()); WorldGrid.RemoveWorldObject(npc); } else if (mobA != null) { @@ -176,7 +176,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd { mob.getParentZone().zoneMobSet.remove(mob); } DbManager.MobQueries.DELETE_MOB(mobA); - DbManager.removeFromCache(Enum.GameObjectType.Mob, + DbManager.removeFromCache(mbEnums.GameObjectType.Mob, mobA.getObjectUUID()); WorldGrid.RemoveWorldObject(mobA); } diff --git a/src/engine/devcmd/cmds/RemoveBaneCmd.java b/src/engine/devcmd/cmds/RemoveBaneCmd.java index cb720307..a0f8c498 100644 --- a/src/engine/devcmd/cmds/RemoveBaneCmd.java +++ b/src/engine/devcmd/cmds/RemoveBaneCmd.java @@ -9,9 +9,9 @@ package engine.devcmd.cmds; -import engine.Enum.SiegeResult; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ZoneManager; +import engine.mbEnums.SiegeResult; import engine.objects.*; /** diff --git a/src/engine/devcmd/cmds/RemoveObjectCmd.java b/src/engine/devcmd/cmds/RemoveObjectCmd.java index ab30ec48..3b55edcd 100644 --- a/src/engine/devcmd/cmds/RemoveObjectCmd.java +++ b/src/engine/devcmd/cmds/RemoveObjectCmd.java @@ -9,8 +9,6 @@ package engine.devcmd.cmds; -import engine.Enum.BuildingGroup; -import engine.Enum.DbObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; @@ -18,6 +16,8 @@ import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.DbObjectType; import engine.objects.*; /** diff --git a/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java b/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java index 48386d00..28b0cef3 100644 --- a/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java +++ b/src/engine/devcmd/cmds/SetBuildingAltitudeCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; diff --git a/src/engine/devcmd/cmds/SetGuildCmd.java b/src/engine/devcmd/cmds/SetGuildCmd.java index d869081b..3be75ae0 100644 --- a/src/engine/devcmd/cmds/SetGuildCmd.java +++ b/src/engine/devcmd/cmds/SetGuildCmd.java @@ -1,6 +1,6 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; diff --git a/src/engine/devcmd/cmds/SetHealthCmd.java b/src/engine/devcmd/cmds/SetHealthCmd.java index 3ee2763b..1cfe6303 100644 --- a/src/engine/devcmd/cmds/SetHealthCmd.java +++ b/src/engine/devcmd/cmds/SetHealthCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.devcmd.AbstractDevCmd; import engine.net.DispatchMessage; import engine.net.client.msg.TargetedActionMsg; diff --git a/src/engine/devcmd/cmds/SetInvulCmd.java b/src/engine/devcmd/cmds/SetInvulCmd.java index f26df9e4..a1314d96 100644 --- a/src/engine/devcmd/cmds/SetInvulCmd.java +++ b/src/engine/devcmd/cmds/SetInvulCmd.java @@ -10,8 +10,8 @@ package engine.devcmd.cmds; -import engine.Enum; -import engine.Enum.ProtectionState; +import engine.mbEnums; +import engine.mbEnums.ProtectionState; import engine.devcmd.AbstractDevCmd; import engine.objects.AbstractGameObject; import engine.objects.Building; @@ -59,7 +59,7 @@ public class SetInvulCmd extends AbstractDevCmd { // status of the entire city if ((b.getBlueprint() != null) && - (b.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL))) { + (b.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.TOL))) { City city; diff --git a/src/engine/devcmd/cmds/SetManaCmd.java b/src/engine/devcmd/cmds/SetManaCmd.java index 3988e2a3..b8086733 100644 --- a/src/engine/devcmd/cmds/SetManaCmd.java +++ b/src/engine/devcmd/cmds/SetManaCmd.java @@ -1,6 +1,7 @@ package engine.devcmd.cmds; import engine.devcmd.AbstractDevCmd; +import engine.mbEnums; import engine.net.DispatchMessage; import engine.net.client.msg.TargetedActionMsg; import engine.objects.AbstractGameObject; @@ -31,7 +32,7 @@ public class SetManaCmd extends AbstractDevCmd { //Update all surrounding clients. - NOT for Mana? TargetedActionMsg cmm = new TargetedActionMsg(pc); - DispatchMessage.dispatchMsgToInterestArea(pc, cmm, engine.Enum.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + DispatchMessage.dispatchMsgToInterestArea(pc, cmm, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); } catch (NumberFormatException e) { this.throwbackError(pc, "Supplied data: " + words[0] diff --git a/src/engine/devcmd/cmds/SetNpcNameCmd.java b/src/engine/devcmd/cmds/SetNpcNameCmd.java index d670db67..0db4ac68 100644 --- a/src/engine/devcmd/cmds/SetNpcNameCmd.java +++ b/src/engine/devcmd/cmds/SetNpcNameCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.objects.AbstractGameObject; diff --git a/src/engine/devcmd/cmds/SetOwnerCmd.java b/src/engine/devcmd/cmds/SetOwnerCmd.java index f7753db2..ac413b77 100644 --- a/src/engine/devcmd/cmds/SetOwnerCmd.java +++ b/src/engine/devcmd/cmds/SetOwnerCmd.java @@ -1,7 +1,8 @@ package engine.devcmd.cmds; -import engine.Enum.DbObjectType; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.DbObjectType; +import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.DbManager; import engine.objects.*; @@ -37,7 +38,7 @@ public class SetOwnerCmd extends AbstractDevCmd { // if it's a tol change ownership of the city if (_targetBuilding.getBlueprint() != null && - _targetBuilding.getBlueprint().getBuildingGroup().equals(engine.Enum.BuildingGroup.TOL)) { + _targetBuilding.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.TOL)) { City city = _targetBuilding.getCity(); diff --git a/src/engine/devcmd/cmds/SetPromotionClassCmd.java b/src/engine/devcmd/cmds/SetPromotionClassCmd.java index f8776786..5ce13f2d 100644 --- a/src/engine/devcmd/cmds/SetPromotionClassCmd.java +++ b/src/engine/devcmd/cmds/SetPromotionClassCmd.java @@ -1,6 +1,6 @@ package engine.devcmd.cmds; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.InterestManagement.InterestManager; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; diff --git a/src/engine/devcmd/cmds/SetStaminaCmd.java b/src/engine/devcmd/cmds/SetStaminaCmd.java index d760a1cc..d17cdcb7 100644 --- a/src/engine/devcmd/cmds/SetStaminaCmd.java +++ b/src/engine/devcmd/cmds/SetStaminaCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.devcmd.AbstractDevCmd; import engine.net.DispatchMessage; import engine.net.client.msg.TargetedActionMsg; diff --git a/src/engine/devcmd/cmds/SetSubRaceCmd.java b/src/engine/devcmd/cmds/SetSubRaceCmd.java index c1788b2f..41adcf2c 100644 --- a/src/engine/devcmd/cmds/SetSubRaceCmd.java +++ b/src/engine/devcmd/cmds/SetSubRaceCmd.java @@ -10,7 +10,7 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.net.DispatchMessage; import engine.net.client.msg.ApplyBuildingEffectMsg; diff --git a/src/engine/devcmd/cmds/ShowOffsetCmd.java b/src/engine/devcmd/cmds/ShowOffsetCmd.java index 55b0a0fe..7acfab67 100644 --- a/src/engine/devcmd/cmds/ShowOffsetCmd.java +++ b/src/engine/devcmd/cmds/ShowOffsetCmd.java @@ -1,6 +1,6 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.math.Vector3fImmutable; import engine.objects.AbstractGameObject; diff --git a/src/engine/devcmd/cmds/SlotNpcCmd.java b/src/engine/devcmd/cmds/SlotNpcCmd.java index 38b06c7e..2ca7d820 100644 --- a/src/engine/devcmd/cmds/SlotNpcCmd.java +++ b/src/engine/devcmd/cmds/SlotNpcCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.BuildingGroup; +import engine.mbEnums.BuildingGroup; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; diff --git a/src/engine/devcmd/cmds/SlotTestCmd.java b/src/engine/devcmd/cmds/SlotTestCmd.java index bc31e7c2..273f8b38 100644 --- a/src/engine/devcmd/cmds/SlotTestCmd.java +++ b/src/engine/devcmd/cmds/SlotTestCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.ChatManager; diff --git a/src/engine/devcmd/cmds/SplatMobCmd.java b/src/engine/devcmd/cmds/SplatMobCmd.java index e6648fd4..7ebecd2b 100644 --- a/src/engine/devcmd/cmds/SplatMobCmd.java +++ b/src/engine/devcmd/cmds/SplatMobCmd.java @@ -1,6 +1,6 @@ package engine.devcmd.cmds; -import engine.Enum; +import engine.mbEnums; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; @@ -111,7 +111,7 @@ public class SplatMobCmd extends AbstractDevCmd { mobile = Mob.createMob(_mobileUUID, Vector3fImmutable.getRandomPointInCircle(_currentLocation, _targetRange), - null, serverZone, null, null, "", 1, Enum.AIAgentType.MOBILE); + null, serverZone, null, null, "", 1, mbEnums.AIAgentType.MOBILE); if (mobile != null) { mobile.updateDatabase(); diff --git a/src/engine/devcmd/cmds/UnloadFurnitureCmd.java b/src/engine/devcmd/cmds/UnloadFurnitureCmd.java index e926ccbc..cc117837 100644 --- a/src/engine/devcmd/cmds/UnloadFurnitureCmd.java +++ b/src/engine/devcmd/cmds/UnloadFurnitureCmd.java @@ -9,7 +9,7 @@ package engine.devcmd.cmds; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.net.client.msg.LoadStructureMsg; import engine.net.client.msg.MoveToPointMsg; diff --git a/src/engine/devcmd/cmds/aiInfoCmd.java b/src/engine/devcmd/cmds/aiInfoCmd.java index dd4d191c..a74df39d 100644 --- a/src/engine/devcmd/cmds/aiInfoCmd.java +++ b/src/engine/devcmd/cmds/aiInfoCmd.java @@ -9,10 +9,10 @@ package engine.devcmd.cmds; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.devcmd.AbstractDevCmd; import engine.gameManager.PowersManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.mobileAI.MobAI; import engine.objects.AbstractGameObject; import engine.objects.Mob; @@ -67,7 +67,7 @@ public class aiInfoCmd extends AbstractDevCmd { if (mob.isPlayerGuard() == true) { - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) contractID = mob.guardCaptain.contract.getContractID(); else contractID = mob.contract.getContractID(); @@ -75,7 +75,7 @@ public class aiInfoCmd extends AbstractDevCmd { if (contractID != 0) { - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) { + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) { output += "Captain Contract: " + contractID + newline; output += "Captain UUID: " + mob.guardCaptain.getObjectUUID() + newline; } else @@ -128,7 +128,7 @@ public class aiInfoCmd extends AbstractDevCmd { if (mob.contract != null) contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.contractUUID)); - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.guardCaptain.contractUUID)); powerEntries.addAll(contractEntries); diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 380c7d5d..d14e3d99 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -9,9 +9,6 @@ package engine.gameManager; -import engine.Enum; -import engine.Enum.BuildingGroup; -import engine.Enum.GameObjectType; import engine.InterestManagement.InterestManager; import engine.InterestManagement.WorldGrid; import engine.job.JobContainer; @@ -19,6 +16,9 @@ import engine.job.JobScheduler; import engine.jobs.UpgradeBuildingJob; import engine.math.Bounds; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GameObjectType; import engine.net.client.msg.ErrorPopupMsg; import engine.objects.*; import engine.server.MBServerStatics; @@ -230,7 +230,7 @@ public enum BuildingManager { if (warehouse == null) return false; - for (Enum.ResourceType resourceType : EnumSet.allOf(Enum.ResourceType.class)) { + for (mbEnums.ResourceType resourceType : EnumSet.allOf(mbEnums.ResourceType.class)) { if (!player.charItemManager.hasRoomInventory(resourceType.template.item_wt)) { ChatManager.chatSystemInfo(player, "You can not carry any more of that item."); @@ -323,7 +323,7 @@ public enum BuildingManager { // Clear minions from database if a guard captain - if (guardCaptain.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) + if (guardCaptain.agentType.equals(mbEnums.AIAgentType.GUARDCAPTAIN)) DbManager.MobQueries.REMOVE_ALL_MINIONS(hireling.getObjectUUID()); } @@ -418,7 +418,7 @@ public enum BuildingManager { Building building; - building = (Building) DbManager.getFromCache(Enum.GameObjectType.Building, id); + building = (Building) DbManager.getFromCache(mbEnums.GameObjectType.Building, id); if (building != null) return building; @@ -584,14 +584,14 @@ public enum BuildingManager { if (NPC.ISWallArcher(contract)) { - mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank, Enum.AIAgentType.GUARDWALLARCHER); + mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank, mbEnums.AIAgentType.GUARDWALLARCHER); if (mobile == null) return false; // Configure AI and write new mobile to disk - mobile.behaviourType = Enum.MobBehaviourType.GuardWallArcher; + mobile.behaviourType = mbEnums.MobBehaviourType.GuardWallArcher; mobile = DbManager.MobQueries.PERSIST(mobile); // Spawn new mobile @@ -603,14 +603,14 @@ public enum BuildingManager { if (NPC.ISGuardCaptain(contract.getContractID())) { - mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank, Enum.AIAgentType.GUARDCAPTAIN); + mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank, mbEnums.AIAgentType.GUARDCAPTAIN); if (mobile == null) return false; // Configure AI and write new mobile to disk - mobile.behaviourType = Enum.MobBehaviourType.GuardCaptain; + mobile.behaviourType = mbEnums.MobBehaviourType.GuardCaptain; mobile = DbManager.MobQueries.PERSIST(mobile); // Spawn new mobile @@ -623,14 +623,14 @@ public enum BuildingManager { if (contract.getContractID() == 910) { //guard dog - mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank, Enum.AIAgentType.GUARDCAPTAIN); + mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank, mbEnums.AIAgentType.GUARDCAPTAIN); if (mobile == null) return false; // Configure AI and write new mobile to disk - mobile.behaviourType = Enum.MobBehaviourType.GuardCaptain; + mobile.behaviourType = mbEnums.MobBehaviourType.GuardCaptain; mobile = DbManager.MobQueries.PERSIST(mobile); // Spawn new mobile @@ -739,7 +739,7 @@ public enum BuildingManager { Vector3fImmutable bindLoc = null; if (building == null) - return Enum.Ruins.getRandomRuin().getLocation(); + return mbEnums.Ruins.getRandomRuin().getLocation(); bindLoc = building.getLoc(); @@ -856,7 +856,7 @@ public enum BuildingManager { // protection if (building.rank == -1) - building.protectionState = Enum.ProtectionState.NONE; + building.protectionState = mbEnums.ProtectionState.NONE; // update object to clients diff --git a/src/engine/gameManager/ChatManager.java b/src/engine/gameManager/ChatManager.java index c19bc3fa..d5a93bfa 100644 --- a/src/engine/gameManager/ChatManager.java +++ b/src/engine/gameManager/ChatManager.java @@ -9,13 +9,13 @@ package engine.gameManager; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.InterestManagement.WorldGrid; import engine.db.archive.BaneRecord; import engine.db.archive.PvpRecord; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.MessageDispatcher; @@ -79,7 +79,7 @@ public enum ChatManager { ArrayList distroList = new ArrayList<>(); for (PlayerCharacter pc : SessionManager .getAllActivePlayerCharacters()) { - if (pc.getAccount().status.equals(Enum.AccountStatus.BANNED) == false) + if (pc.getAccount().status.equals(mbEnums.AccountStatus.BANNED) == false) distroList.add(pc); } // Send dispatch to each player @@ -87,7 +87,7 @@ public enum ChatManager { for (AbstractWorldObject abstractWorldObject : distroList) { PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject; Dispatch dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -161,7 +161,7 @@ public enum ChatManager { // Make the Message ChatSayMsg chatSayMsg = new ChatSayMsg(player, text); - DispatchMessage.dispatchMsgToInterestArea(pcSender, chatSayMsg, Enum.DispatchChannel.SECONDARY, MBServerStatics.SAY_RANGE, true, true); + DispatchMessage.dispatchMsgToInterestArea(pcSender, chatSayMsg, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.SAY_RANGE, true, true); } @@ -169,9 +169,9 @@ public enum ChatManager { ChatSystemMsg msg = new ChatSystemMsg(null, messageString); msg.setMessageType(4); - msg.setChannel(engine.Enum.ChatChannelType.SYSTEM.getChannelID()); + msg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID()); Dispatch dispatch = Dispatch.borrow(targetPlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } /* @@ -195,7 +195,7 @@ public enum ChatManager { // Make the Message ChatShoutMsg msg = new ChatShoutMsg(sender, text); - DispatchMessage.dispatchMsgToInterestArea(pcSender, msg, engine.Enum.DispatchChannel.SECONDARY, MBServerStatics.SHOUT_RANGE, true, true); + DispatchMessage.dispatchMsgToInterestArea(pcSender, msg, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.SHOUT_RANGE, true, true); } @@ -284,13 +284,13 @@ public enum ChatManager { // Send dispatch to each player Dispatch dispatch = Dispatch.borrow(pcRecip, chatTellMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } // Also send /tell to sender if (pcSender != null) { Dispatch dispatch = Dispatch.borrow(pcSender, chatTellMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } else @@ -342,14 +342,14 @@ public enum ChatManager { chatGuildMsg.setUnknown04(sender.getGuild() != null ? sender.getGuild() .getCharter() : 0); // Charter? chatGuildMsg.setUnknown05(GuildStatusController.getTitle(sender.getGuildStatus())); // Title? - chatGuildMsg.setUnknown06(sender.race.getRaceType().getCharacterSex().equals(Enum.CharacterSex.MALE) ? 1 : 2); // isMale?, seen 1 and 2 + chatGuildMsg.setUnknown06(sender.race.getRaceType().getCharacterSex().equals(mbEnums.CharacterSex.MALE) ? 1 : 2); // isMale?, seen 1 and 2 // Send dispatch to each player for (AbstractWorldObject abstractWorldObject : distroList) { PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject; Dispatch dispatch = Dispatch.borrow(playerCharacter, chatGuildMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -404,7 +404,7 @@ public enum ChatManager { for (AbstractWorldObject abstractWorldObject : distroList) { PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject; Dispatch dispatch = Dispatch.borrow(playerCharacter, chatICMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -463,7 +463,7 @@ public enum ChatManager { for (AbstractWorldObject abstractWorldObject : distroList) { PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject; Dispatch dispatch = Dispatch.borrow(playerCharacter, chatGroupMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -497,7 +497,7 @@ public enum ChatManager { for (AbstractWorldObject abstractWorldObject : distroList) { PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject; Dispatch dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -536,7 +536,7 @@ public enum ChatManager { if (item != null) //Steal if (success) { String name = ""; - if (item.template.item_type.equals(Enum.ItemType.GOLD)) + if (item.template.item_type.equals(mbEnums.ItemType.GOLD)) name = amount + " gold "; else { String vowels = "aeiou"; @@ -844,7 +844,7 @@ public enum ChatManager { for (AbstractWorldObject abstractWorldObject : distroList) { PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject; Dispatch dispatch = Dispatch.borrow(playerCharacter, chatSystemMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -993,7 +993,7 @@ public enum ChatManager { chatSystemMsg.setChannel(channel); Dispatch dispatch = Dispatch.borrow(playerCharacter, chatSystemMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 01806320..c621180d 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -8,11 +8,11 @@ package engine.gameManager; -import engine.Enum; import engine.job.JobContainer; import engine.job.JobScheduler; import engine.jobs.AttackJob; import engine.jobs.DeferredPowerJob; +import engine.mbEnums; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; import engine.net.client.msg.TargetedActionMsg; @@ -46,40 +46,40 @@ public enum CombatManager { case PlayerCharacter: case Mob: PlayerBonuses bonuses = ((AbstractCharacter) target).getBonuses(); - if (bonuses != null && bonuses.getBool(Enum.ModType.ImmuneToAttack, Enum.SourceType.None)) + if (bonuses != null && bonuses.getBool(mbEnums.ModType.ImmuneToAttack, mbEnums.SourceType.None)) return; break; case NPC: return; } - Item mainWeapon = attacker.charItemManager.getEquipped().get(Enum.EquipSlotType.RHELD); - Item offWeapon = attacker.charItemManager.getEquipped().get(Enum.EquipSlotType.LHELD); + Item mainWeapon = attacker.charItemManager.getEquipped().get(mbEnums.EquipSlotType.RHELD); + Item offWeapon = attacker.charItemManager.getEquipped().get(mbEnums.EquipSlotType.LHELD); if (mainWeapon == null && offWeapon == null) { //no weapons equipped, punch with both fists - processAttack(attacker, target, Enum.EquipSlotType.RHELD); - processAttack(attacker, target, Enum.EquipSlotType.LHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.RHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.LHELD); } else if (mainWeapon == null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block")) { //no weapon equipped with a shield, punch with one hand - processAttack(attacker, target, Enum.EquipSlotType.RHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.RHELD); } else if (mainWeapon != null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block")) { //one weapon equipped with a shield, swing with one hand - processAttack(attacker, target, Enum.EquipSlotType.RHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.RHELD); } else if (mainWeapon != null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block") == false) { //two weapons equipped, swing both hands - processAttack(attacker, target, Enum.EquipSlotType.RHELD); - processAttack(attacker, target, Enum.EquipSlotType.LHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.RHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.LHELD); } else if (mainWeapon == null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block") == false) { //swing left hand only - processAttack(attacker, target, Enum.EquipSlotType.LHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.LHELD); } else if (mainWeapon != null && offWeapon == null) { //swing left hand only - processAttack(attacker, target, Enum.EquipSlotType.RHELD); + processAttack(attacker, target, mbEnums.EquipSlotType.RHELD); } } - public static void processAttack(AbstractCharacter attacker, AbstractWorldObject target, Enum.EquipSlotType slot) { + public static void processAttack(AbstractCharacter attacker, AbstractWorldObject target, mbEnums.EquipSlotType slot) { // heck if character can even attack yet @@ -98,12 +98,12 @@ public enum CombatManager { if (weapon != null) { if (bonus != null) - rangeMod += bonus.getFloatPercentAll(Enum.ModType.WeaponRange, Enum.SourceType.None); + rangeMod += bonus.getFloatPercentAll(mbEnums.ModType.WeaponRange, mbEnums.SourceType.None); attackRange = weapon.template.item_weapon_max_range * rangeMod; } - if (attacker.getObjectType().equals(Enum.GameObjectType.Mob)) + if (attacker.getObjectType().equals(mbEnums.GameObjectType.Mob)) if (((Mob) attacker).isSiege()) attackRange = 300; @@ -133,7 +133,7 @@ public enum CombatManager { //get the proper stats based on which slot is attacking - if (slot == Enum.EquipSlotType.LHELD) { + if (slot == mbEnums.EquipSlotType.LHELD) { min = attacker.minDamageHandTwo; max = attacker.maxDamageHandTwo; atr = attacker.atrHandTwo; @@ -156,10 +156,10 @@ public enum CombatManager { else hitChance = ((int) (450 * (dif - 0.8f)) + 4); - if (target.getObjectType() == Enum.GameObjectType.Building) + if (target.getObjectType() == mbEnums.GameObjectType.Building) hitChance = 100; - int passiveAnim = getSwingAnimation(null, null, slot.equals(Enum.EquipSlotType.RHELD)); + int passiveAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD)); if (attacker.charItemManager.getEquipped().get(slot) != null) { passiveAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, true); } @@ -167,8 +167,8 @@ public enum CombatManager { if (ThreadLocalRandom.current().nextInt(100) > hitChance) { TargetedActionMsg msg = new TargetedActionMsg(attacker, target, 0f, passiveAnim); - if (target.getObjectType() == Enum.GameObjectType.PlayerCharacter) - DispatchMessage.dispatchMsgToInterestArea(target, msg, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter) + DispatchMessage.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); else DispatchMessage.sendToAllInRange(attacker, msg); @@ -177,8 +177,8 @@ public enum CombatManager { //calculate passive chances only if target is AbstractCharacter - if (EnumSet.of(Enum.GameObjectType.PlayerCharacter, Enum.GameObjectType.NPC, Enum.GameObjectType.Mob).contains(target.getObjectType())) { - Enum.PassiveType passiveType = Enum.PassiveType.None; + if (EnumSet.of(mbEnums.GameObjectType.PlayerCharacter, mbEnums.GameObjectType.NPC, mbEnums.GameObjectType.Mob).contains(target.getObjectType())) { + mbEnums.PassiveType passiveType = mbEnums.PassiveType.None; int hitRoll = ThreadLocalRandom.current().nextInt(100); float dodgeChance = ((AbstractCharacter) target).getPassiveChance("Dodge", attacker.getLevel(), true); @@ -192,18 +192,18 @@ public enum CombatManager { parryChance = Math.max(0, Math.min(75, parryChance)); if (hitRoll < dodgeChance) - passiveType = Enum.PassiveType.Dodge; + passiveType = mbEnums.PassiveType.Dodge; else if (hitRoll < blockChance) - passiveType = Enum.PassiveType.Block; + passiveType = mbEnums.PassiveType.Block; else if (hitRoll < parryChance) - passiveType = Enum.PassiveType.Parry; + passiveType = mbEnums.PassiveType.Parry; - if (passiveType.equals(Enum.PassiveType.None) == false) { + if (passiveType.equals(mbEnums.PassiveType.None) == false) { TargetedActionMsg msg = new TargetedActionMsg(attacker, passiveAnim, target, passiveType.value); - if (target.getObjectType() == Enum.GameObjectType.PlayerCharacter) - DispatchMessage.dispatchMsgToInterestArea(target, msg, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter) + DispatchMessage.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); else DispatchMessage.sendToAllInRange(attacker, msg); @@ -218,15 +218,15 @@ public enum CombatManager { //get the damage type - Enum.DamageType damageType; + mbEnums.DamageType damageType; if (attacker.charItemManager.getEquipped().get(slot) == null) { - damageType = Enum.DamageType.CRUSHING; - if (attacker.getObjectType().equals(Enum.GameObjectType.Mob)) + damageType = mbEnums.DamageType.CRUSHING; + if (attacker.getObjectType().equals(mbEnums.GameObjectType.Mob)) if (((Mob) attacker).isSiege()) - damageType = Enum.DamageType.SIEGE; + damageType = mbEnums.DamageType.SIEGE; } else { - damageType = (Enum.DamageType) attacker.charItemManager.getEquipped().get(slot).template.item_weapon_damage.keySet().toArray()[0]; + damageType = (mbEnums.DamageType) attacker.charItemManager.getEquipped().get(slot).template.item_weapon_damage.keySet().toArray()[0]; } //get resists @@ -298,16 +298,16 @@ public enum CombatManager { else ((Building) target).setCurrentHitPoints(target.getCurrentHitpoints() - damage); - int attackAnim = getSwingAnimation(null, null, slot.equals(Enum.EquipSlotType.RHELD)); + int attackAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD)); if (attacker.charItemManager.getEquipped().get(slot) != null) { - attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, slot.equals(Enum.EquipSlotType.RHELD)); + attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, slot.equals(mbEnums.EquipSlotType.RHELD)); } TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim); DispatchMessage.sendToAllInRange(target, cmm); } DeferredPowerJob dpj = null; - if (attacker.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { dpj = ((PlayerCharacter) attacker).getWeaponPower(); @@ -326,11 +326,11 @@ public enum CombatManager { int wepSpeed = (int) (weapon.template.item_weapon_wepspeed); - if (weapon.getBonusPercent(Enum.ModType.WeaponSpeed, Enum.SourceType.None) != 0f) //add weapon speed bonus - wepSpeed *= (1 + weapon.getBonus(Enum.ModType.WeaponSpeed, Enum.SourceType.None)); + if (weapon.getBonusPercent(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None) != 0f) //add weapon speed bonus + wepSpeed *= (1 + weapon.getBonus(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None)); - if (attacker.getBonuses() != null && attacker.getBonuses().getFloatPercentAll(Enum.ModType.AttackDelay, Enum.SourceType.None) != 0f) //add effects speed bonus - wepSpeed *= (1 + attacker.getBonuses().getFloatPercentAll(Enum.ModType.AttackDelay, Enum.SourceType.None)); + if (attacker.getBonuses() != null && attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None) != 0f) //add effects speed bonus + wepSpeed *= (1 + attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None)); if (wepSpeed < 10) wepSpeed = 10; //Old was 10, but it can be reached lower with legit buffs,effects. @@ -368,7 +368,7 @@ public enum CombatManager { UpdateStateMsg rwss = new UpdateStateMsg(); rwss.setPlayer(playerCharacter); - DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); + DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); } public static void toggleSit(boolean toggle, ClientConnection origin) { @@ -381,7 +381,7 @@ public enum CombatManager { playerCharacter.setSit(toggle); UpdateStateMsg rwss = new UpdateStateMsg(); rwss.setPlayer(playerCharacter); - DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); } @@ -395,7 +395,7 @@ public enum CombatManager { if (attacker.equals(target)) return; - if (target.isMoving() && target.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) + if (target.isMoving() && target.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) return; if (!target.isAlive() || !attacker.isAlive()) diff --git a/src/engine/gameManager/ConfigManager.java b/src/engine/gameManager/ConfigManager.java index b96543e5..a3a7a258 100644 --- a/src/engine/gameManager/ConfigManager.java +++ b/src/engine/gameManager/ConfigManager.java @@ -12,7 +12,7 @@ package engine.gameManager; is loaded from environment variables. */ -import engine.Enum; +import engine.mbEnums; import engine.server.login.LoginServer; import engine.server.world.WorldServer; import org.pmw.tinylog.Logger; @@ -106,7 +106,7 @@ public enum ConfigManager { public static final String DEFAULT_DATA_DIR = "mb.data/"; public static Map configMap = new HashMap(System.getenv()); - public static Enum.ServerType serverType = Enum.ServerType.NONE; + public static mbEnums.ServerType serverType = mbEnums.ServerType.NONE; public static WorldServer worldServer; public static LoginServer loginServer; public static Map regex = new HashMap<>(); diff --git a/src/engine/gameManager/DbManager.java b/src/engine/gameManager/DbManager.java index 58a9de54..4e1ac385 100644 --- a/src/engine/gameManager/DbManager.java +++ b/src/engine/gameManager/DbManager.java @@ -10,8 +10,8 @@ package engine.gameManager; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; -import engine.Enum; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.db.handlers.*; import engine.objects.*; import engine.server.MBServerStatics; @@ -176,7 +176,7 @@ public enum DbManager { public static boolean addToCache(AbstractGameObject gameObject) { - boolean isWorldServer = ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER); + boolean isWorldServer = ConfigManager.serverType.equals(mbEnums.ServerType.WORLDSERVER); if (!isWorldServer) { if (MBServerStatics.SKIP_CACHE_LOGIN) diff --git a/src/engine/gameManager/DevCmdManager.java b/src/engine/gameManager/DevCmdManager.java index fd3e5855..8458c61a 100644 --- a/src/engine/gameManager/DevCmdManager.java +++ b/src/engine/gameManager/DevCmdManager.java @@ -8,7 +8,7 @@ package engine.gameManager; -import engine.Enum; +import engine.mbEnums; import engine.devcmd.AbstractDevCmd; import engine.devcmd.cmds.*; import engine.objects.AbstractGameObject; @@ -156,7 +156,7 @@ public enum DevCmdManager { //kill any commands not available to everyone on production server //only admin level can run dev commands on production - if (a.status.equals(Enum.AccountStatus.ADMIN) == false) { + if (a.status.equals(mbEnums.AccountStatus.ADMIN) == false) { Logger.info("Account " + a.getUname() + "attempted to use dev command " + cmd); return false; } diff --git a/src/engine/gameManager/GroupManager.java b/src/engine/gameManager/GroupManager.java index ccc5fc7b..5c9bd570 100644 --- a/src/engine/gameManager/GroupManager.java +++ b/src/engine/gameManager/GroupManager.java @@ -8,7 +8,7 @@ package engine.gameManager; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -80,7 +80,7 @@ public enum GroupManager { groupUpdateMsg.setMessageType(3); groupUpdateMsg.setPlayer(groupMember); Dispatch dispatch = Dispatch.borrow(source, groupUpdateMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @@ -160,7 +160,7 @@ public enum GroupManager { gum.setPlayerUUID(groupMember.getObjectUUID()); Dispatch dispatch = Dispatch.borrow(groupMember, gum); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -189,7 +189,7 @@ public enum GroupManager { gum.setMessageType(1); gum.setPlayer(groupMember); Dispatch dispatch = Dispatch.borrow(groupMember, gum); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -217,7 +217,7 @@ public enum GroupManager { gum.setPlayer(playerToRefresh); Dispatch dispatch = Dispatch.borrow(source, gum); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } public static void RefreshOthersGroupList(PlayerCharacter source) { @@ -309,7 +309,7 @@ public enum GroupManager { return false; } - if (!item.template.item_type.equals(Enum.ItemType.GOLD)) //only split goldItem + if (!item.template.item_type.equals(mbEnums.ItemType.GOLD)) //only split goldItem return false; Group group = getGroup(pc); @@ -343,7 +343,7 @@ public enum GroupManager { int dif = total - (size * amount); if (AbstractWorldObject.IsAbstractCharacter(tar)) { - } else if (tar.getObjectType().equals(Enum.GameObjectType.Corpse)) { + } else if (tar.getObjectType().equals(mbEnums.GameObjectType.Corpse)) { Corpse corpse = (Corpse) tar; corpse.getInventory().remove(item); } else { @@ -351,8 +351,8 @@ public enum GroupManager { return false; } - if (item.getObjectType() == Enum.GameObjectType.MobLoot) { - if (tar.getObjectType() == Enum.GameObjectType.Mob) { + if (item.getObjectType() == mbEnums.GameObjectType.MobLoot) { + if (tar.getObjectType() == mbEnums.GameObjectType.Mob) { ((Mob) tar).charItemManager.delete(item); } else item.setNumOfItems(0); @@ -372,12 +372,12 @@ public enum GroupManager { ugm.configure(); Dispatch dispatch = Dispatch.borrow(splitPlayer, ugm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } UpdateGoldMsg updateTargetGold = new UpdateGoldMsg(tar); updateTargetGold.configure(); - DispatchMessage.dispatchMsgToInterestArea(tar, updateTargetGold, Enum.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + DispatchMessage.dispatchMsgToInterestArea(tar, updateTargetGold, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); // //TODO send group split message String text = "Group Split: " + amount; diff --git a/src/engine/gameManager/GuildManager.java b/src/engine/gameManager/GuildManager.java index 72565224..c34aebbc 100644 --- a/src/engine/gameManager/GuildManager.java +++ b/src/engine/gameManager/GuildManager.java @@ -8,9 +8,9 @@ package engine.gameManager; -import engine.Enum; -import engine.Enum.BuildingGroup; -import engine.Enum.GuildHistoryType; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GuildHistoryType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -89,7 +89,7 @@ public enum GuildManager { if (fromTeleportScreen) { dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } if (DbManager.GuildQueries.ADD_TO_GUILDHISTORY(guild.getObjectUUID(), playerCharacter, DateTime.now(), historyType)) { GuildHistory guildHistory = new GuildHistory(guild.getObjectUUID(), guild.getName(), DateTime.now(), historyType); @@ -202,7 +202,7 @@ public enum GuildManager { } public static Boolean meetsLoreRequirements(Guild guild, PlayerCharacter player) { - Enum.GuildCharterType charter = guild.getGuildType(); + mbEnums.GuildCharterType charter = guild.getGuildType(); if (charter.requiredClasses.contains(player.absPromotionClass)) if (charter.requiredRaces.contains(player.absRace)) if (charter.sexRequired.contains(player.absGender)) diff --git a/src/engine/gameManager/ItemManager.java b/src/engine/gameManager/ItemManager.java index 82431b83..149aa121 100644 --- a/src/engine/gameManager/ItemManager.java +++ b/src/engine/gameManager/ItemManager.java @@ -1,6 +1,6 @@ package engine.gameManager; -import engine.Enum; +import engine.mbEnums; import engine.objects.*; import org.pmw.tinylog.Logger; @@ -17,7 +17,7 @@ import java.util.concurrent.ConcurrentHashMap; public enum ItemManager { ITEMMANAGER; - public static Boolean ValidRace(Item item, Enum.MonsterType race) { + public static Boolean ValidRace(Item item, mbEnums.MonsterType race) { if (item.template.item_race_req.isEmpty() && item.template.item_race_res.isEmpty()) return true; @@ -33,7 +33,7 @@ public enum ItemManager { return false; } - public static Boolean ValidClass(Item item, Enum.ClassType base, Enum.ClassType profession) { + public static Boolean ValidClass(Item item, mbEnums.ClassType base, mbEnums.ClassType profession) { // Early exit if no entry @@ -51,14 +51,14 @@ public enum ItemManager { return false; } - public static Boolean ValidDiscipline(Item item, EnumSet discs) { + public static Boolean ValidDiscipline(Item item, EnumSet discs) { // Early exit if no entry if (item.template.item_disc_req.isEmpty() && item.template.item_disc_res.isEmpty()) return true; - EnumSet workSet = EnumSet.copyOf(discs); + EnumSet workSet = EnumSet.copyOf(discs); if (item.template.item_disc_req.isEmpty() == false) { @@ -108,18 +108,18 @@ public enum ItemManager { public static boolean isTwoHanded(Item item) { - if (!item.template.item_type.equals(Enum.ItemType.WEAPON)) + if (!item.template.item_type.equals(mbEnums.ItemType.WEAPON)) return false; - return item.template.item_eq_slots_and.contains(EnumSet.of(Enum.EquipSlotType.LHELD, Enum.EquipSlotType.RHELD)); + return item.template.item_eq_slots_and.contains(EnumSet.of(mbEnums.EquipSlotType.LHELD, mbEnums.EquipSlotType.RHELD)); } public static boolean isTwoHanded(ItemTemplate template) { - if (!template.item_type.equals(Enum.ItemType.WEAPON)) + if (!template.item_type.equals(mbEnums.ItemType.WEAPON)) return false; - return template.item_eq_slots_and.contains(EnumSet.of(Enum.EquipSlotType.LHELD, Enum.EquipSlotType.RHELD)); + return template.item_eq_slots_and.contains(EnumSet.of(mbEnums.EquipSlotType.LHELD, mbEnums.EquipSlotType.RHELD)); } public static boolean isShield(Item item) { @@ -138,7 +138,7 @@ public enum ItemManager { return false; } - public static boolean validForSlot(Enum.EquipSlotType slot, ConcurrentHashMap equipped, Item item) { + public static boolean validForSlot(mbEnums.EquipSlotType slot, ConcurrentHashMap equipped, Item item) { boolean validSlot = false; @@ -157,18 +157,18 @@ public enum ItemManager { // Two handed weapons take up two slots if ((isTwoHanded(item)) && - ((slot == Enum.EquipSlotType.LHELD && equipped.get(Enum.EquipSlotType.RHELD) != null) || - (slot == Enum.EquipSlotType.RHELD && equipped.get(Enum.EquipSlotType.LHELD) != null))) + ((slot == mbEnums.EquipSlotType.LHELD && equipped.get(mbEnums.EquipSlotType.RHELD) != null) || + (slot == mbEnums.EquipSlotType.RHELD && equipped.get(mbEnums.EquipSlotType.LHELD) != null))) return false; - if (item.template.item_type.equals(Enum.ItemType.WEAPON)) + if (item.template.item_type.equals(mbEnums.ItemType.WEAPON)) if (equipped.get(slot) != null && equipped.get(slot).equals(item) == false) return false; return true; } - public static boolean canEquip(Enum.EquipSlotType slot, CharacterItemManager itemManager, AbstractCharacter abstractCharacter, Item item) { + public static boolean canEquip(mbEnums.EquipSlotType slot, CharacterItemManager itemManager, AbstractCharacter abstractCharacter, Item item) { if (itemManager == null || abstractCharacter == null) return false; @@ -176,7 +176,7 @@ public enum ItemManager { // Early exit for mobiles and NPCS. // Perhaps not needed now that mobs have skills. - if (EnumSet.of(Enum.GameObjectType.NPC, Enum.GameObjectType.Mob).contains(abstractCharacter.getObjectType())) + if (EnumSet.of(mbEnums.GameObjectType.NPC, mbEnums.GameObjectType.Mob).contains(abstractCharacter.getObjectType())) return false; if (!validForSlot(slot, itemManager.getEquipped(), item)) @@ -201,8 +201,8 @@ public enum ItemManager { Item item = new Item(templateID); item.ownerID = reciever.getObjectUUID(); - item.ownerType = Enum.OwnerType.PlayerCharacter; - item.containerType = Enum.ItemContainerType.INVENTORY; + item.ownerType = mbEnums.OwnerType.PlayerCharacter; + item.containerType = mbEnums.ItemContainerType.INVENTORY; item.numberOfItems = amount; try { diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 6da78e72..e70cf827 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -8,8 +8,8 @@ package engine.gameManager; -import engine.Enum; import engine.loot.*; +import engine.mbEnums; import engine.net.DispatchMessage; import engine.net.client.msg.ErrorPopupMsg; import engine.net.client.msg.chat.ChatSystemMsg; @@ -92,7 +92,7 @@ public enum LootManager { if ((it.templateID > 2499 && it.templateID <= 3050) || template.item_base_name.toLowerCase().contains("of the gods")) { ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().zoneName + " has found the " + template.item_base_name + ". Are you tough enough to take it?"); chatMsg.setMessageType(10); - chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + chatMsg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID()); DispatchMessage.dispatchMsgToAll(chatMsg); } } @@ -177,7 +177,7 @@ public enum LootManager { if (itemUUID == 0) return null; - if (ItemTemplate.templates.get(itemUUID).item_type.equals(Enum.ItemType.RESOURCE)) { + if (ItemTemplate.templates.get(itemUUID).item_type.equals(mbEnums.ItemType.RESOURCE)) { int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1); return new MobLoot(mob, ItemTemplate.templates.get(itemUUID), amount, false); } @@ -187,7 +187,7 @@ public enum LootManager { if (selectedRow.pModTable != 0) try { outItem = GeneratePrefix(mob, outItem, genTableID, genRoll, inHotzone); - outItem.flags.remove(Enum.ItemFlags.Identified); + outItem.flags.remove(mbEnums.ItemFlags.Identified); } catch (Exception e) { Logger.error("Failed to GeneratePrefix for item: " + outItem.getName()); } @@ -195,7 +195,7 @@ public enum LootManager { if (selectedRow.sModTable != 0) try { outItem = GenerateSuffix(mob, outItem, genTableID, genRoll, inHotzone); - outItem.flags.remove(Enum.ItemFlags.Identified); + outItem.flags.remove(mbEnums.ItemFlags.Identified); } catch (Exception e) { Logger.error("Failed to GenerateSuffix for item: " + outItem.getName()); } @@ -338,7 +338,7 @@ public enum LootManager { public static void GenerateEquipmentDrop(Mob mob) { - if (mob.behaviourType.equals(Enum.MobBehaviourType.HamletGuard)) + if (mob.behaviourType.equals(mbEnums.MobBehaviourType.HamletGuard)) return; // safehold guards don't drop their equipment //do equipment here int dropCount = 0; @@ -358,7 +358,7 @@ public enum LootManager { MobLoot ml = new MobLoot(mob, item.template, false); if (ml != null && dropCount < 1) { - ml.flags.add(Enum.ItemFlags.Identified); + ml.flags.add(mbEnums.ItemFlags.Identified); ml.setCombat_health_current((short) ((short) ml.combat_health_current - ThreadLocalRandom.current().nextInt(5) + 1)); mob.charItemManager.addItemToInventory(ml); dropCount = 1; @@ -453,7 +453,7 @@ public enum LootManager { if (suffix != null) winnings.addPermanentEnchantment(suffix.action, 0, suffix.level, true); } - winnings.flags.add(Enum.ItemFlags.Identified); + winnings.flags.add(mbEnums.ItemFlags.Identified); //remove gift from inventory diff --git a/src/engine/gameManager/MaintenanceManager.java b/src/engine/gameManager/MaintenanceManager.java index 2b099699..90b9ba3e 100644 --- a/src/engine/gameManager/MaintenanceManager.java +++ b/src/engine/gameManager/MaintenanceManager.java @@ -11,7 +11,7 @@ package engine.gameManager; // Defines static methods which comprise the magicbane // building maintenance system. -import engine.Enum; +import engine.mbEnums; import engine.objects.Building; import engine.objects.City; import engine.objects.Warehouse; @@ -44,7 +44,7 @@ public enum MaintenanceManager { // Build list of buildings to apply maintenance on. - buildingList = new ArrayList(DbManager.getList(Enum.GameObjectType.Building)); + buildingList = new ArrayList(DbManager.getList(mbEnums.GameObjectType.Building)); HashMap> maintMap = new HashMap<>(); maintMap = buildMaintList(buildingList); @@ -119,7 +119,7 @@ public enum MaintenanceManager { // No maintenance on NPC owned buildings (Cache loaded) - if (building.getProtectionState() == Enum.ProtectionState.NPC) + if (building.getProtectionState() == mbEnums.ProtectionState.NPC) continue; // No maintenance on constructing meshes @@ -141,12 +141,12 @@ public enum MaintenanceManager { // No maintenance on banestones omfg - if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.BANESTONE)) + if (building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.BANESTONE)) continue; // no maintenance on Mines omfg - if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.MINE)) + if (building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.MINE)) continue; // Null Maintenance date? @@ -169,7 +169,7 @@ public enum MaintenanceManager { // Add building to maintenance queue - if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL)) + if (building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.TOL)) tolList.add(building); else maintList.add(building); @@ -220,14 +220,14 @@ public enum MaintenanceManager { // the overdraft for us. - if (hasFunds == false && (building.assetIsProtected() || building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.WAREHOUSE)) { + if (hasFunds == false && (building.assetIsProtected() || building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.WAREHOUSE)) { overDraft = maintCost - building.getStrongboxValue(); } if ((overDraft > 0)) - if ((building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.SHRINE) == false) && + if ((building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.SHRINE) == false) && (warehouse != null) && building.assetIsProtected() == true && - (warehouse.resources.get(Enum.ResourceType.GOLD)) >= overDraft) { + (warehouse.resources.get(mbEnums.ResourceType.GOLD)) >= overDraft) { hasFunds = true; } @@ -242,22 +242,22 @@ public enum MaintenanceManager { hasResources = false; else { - resourceValue = warehouse.resources.get(Enum.ResourceType.STONE); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.STONE); if (resourceValue < 1500) hasResources = false; - resourceValue = warehouse.resources.get(Enum.ResourceType.LUMBER); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.LUMBER); if (resourceValue < 1500) hasResources = false; - resourceValue = warehouse.resources.get(Enum.ResourceType.GALVOR); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.GALVOR); if (resourceValue < 5) hasResources = false; - resourceValue = warehouse.resources.get(Enum.ResourceType.WORMWOOD); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.WORMWOOD); if (resourceValue < 5) hasResources = false; @@ -290,16 +290,16 @@ public enum MaintenanceManager { if (overDraft > 0) { - resourceValue = warehouse.resources.get(Enum.ResourceType.GOLD); - warehouse.resources.put(Enum.ResourceType.GOLD, resourceValue - overDraft); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.GOLD); + warehouse.resources.put(mbEnums.ResourceType.GOLD, resourceValue - overDraft); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { - warehouse.resources.put(Enum.ResourceType.GOLD, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.GOLD, resourceValue); Logger.error("gold update failed for warehouse of city:" + warehouse.city.getName()); return true; } - Warehouse.AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, building.getObjectUUID(), Enum.TransactionType.WITHDRAWL, Enum.ResourceType.GOLD, overDraft); + Warehouse.AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, building.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, mbEnums.ResourceType.GOLD, overDraft); } // Early exit as we're done if we're not an R8 tree @@ -311,54 +311,54 @@ public enum MaintenanceManager { // Withdraw Stone - resourceValue = warehouse.resources.get(Enum.ResourceType.STONE); - warehouse.resources.put(Enum.ResourceType.STONE, resourceValue - 1500); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.STONE); + warehouse.resources.put(mbEnums.ResourceType.STONE, resourceValue - 1500); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { - warehouse.resources.put(Enum.ResourceType.STONE, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.STONE, resourceValue); Logger.error("stone update failed for warehouse of city:" + warehouse.city.getName()); return true; } - Warehouse.AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, building.getObjectUUID(), Enum.TransactionType.WITHDRAWL, Enum.ResourceType.STONE, 1500); + Warehouse.AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, building.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, mbEnums.ResourceType.STONE, 1500); // Withdraw Lumber - resourceValue = warehouse.resources.get(Enum.ResourceType.LUMBER); - warehouse.resources.put(Enum.ResourceType.LUMBER, resourceValue - 1500); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.LUMBER); + warehouse.resources.put(mbEnums.ResourceType.LUMBER, resourceValue - 1500); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { - warehouse.resources.put(Enum.ResourceType.STONE, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.STONE, resourceValue); Logger.error("lumber update failed for warehouse of city:" + warehouse.city.getName()); return true; } - Warehouse.AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, building.getObjectUUID(), Enum.TransactionType.WITHDRAWL, Enum.ResourceType.LUMBER, 1500); + Warehouse.AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, building.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, mbEnums.ResourceType.LUMBER, 1500); // Withdraw Galvor - resourceValue = warehouse.resources.get(Enum.ResourceType.GALVOR); - warehouse.resources.put(Enum.ResourceType.GALVOR, resourceValue - 5); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.GALVOR); + warehouse.resources.put(mbEnums.ResourceType.GALVOR, resourceValue - 5); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { - warehouse.resources.put(Enum.ResourceType.GALVOR, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.GALVOR, resourceValue); Logger.error("GALVOR update failed for warehouse of city:" + warehouse.city.getName()); return true; } - Warehouse.AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, building.getObjectUUID(), Enum.TransactionType.WITHDRAWL, Enum.ResourceType.GALVOR, 5); + Warehouse.AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, building.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, mbEnums.ResourceType.GALVOR, 5); // Withdraw GWORMWOOD - resourceValue = warehouse.resources.get(Enum.ResourceType.WORMWOOD); - warehouse.resources.put(Enum.ResourceType.WORMWOOD, resourceValue - 5); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.WORMWOOD); + warehouse.resources.put(mbEnums.ResourceType.WORMWOOD, resourceValue - 5); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { - warehouse.resources.put(Enum.ResourceType.GALVOR, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.GALVOR, resourceValue); Logger.error("wyrmwood update failed for warehouse of city:" + warehouse.city.getName()); return true; } - Warehouse.AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, building.getObjectUUID(), Enum.TransactionType.WITHDRAWL, Enum.ResourceType.WORMWOOD, 5); + Warehouse.AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, building.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, mbEnums.ResourceType.WORMWOOD, 5); return true; } diff --git a/src/engine/gameManager/MovementManager.java b/src/engine/gameManager/MovementManager.java index 9d8da63a..1aedfa31 100644 --- a/src/engine/gameManager/MovementManager.java +++ b/src/engine/gameManager/MovementManager.java @@ -8,15 +8,15 @@ package engine.gameManager; -import engine.Enum.DispatchChannel; -import engine.Enum.GameObjectType; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.InterestManagement.InterestManager; import engine.exception.MsgSendException; import engine.math.Bounds; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; import engine.net.client.msg.MoveToPointMsg; diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 90c017d3..54efa093 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -8,11 +8,11 @@ package engine.gameManager; -import engine.Enum; import engine.InterestManagement.WorldGrid; import engine.math.Quaternion; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -66,7 +66,7 @@ public enum NPCManager { PetMsg petMsg = new PetMsg(5, null); Dispatch dispatch = Dispatch.borrow(petOwner, petMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } @@ -96,7 +96,7 @@ public enum NPCManager { for (Mob necroPet : player.necroPets) if (necroPet.isPet()) - necroPet.agentType = Enum.AIAgentType.MOBILE; + necroPet.agentType = mbEnums.AIAgentType.MOBILE; } public static void spawnNecroPet(PlayerCharacter playerCharacter, Mob mob) { @@ -170,10 +170,10 @@ public enum NPCManager { if (b.getBlueprint() == null) continue; - if (b.getProtectionState().equals(Enum.ProtectionState.CONTRACT)) + if (b.getProtectionState().equals(mbEnums.ProtectionState.CONTRACT)) protectedBuildings.add(b); - if (b.getProtectionState().equals(Enum.ProtectionState.PENDING)) + if (b.getProtectionState().equals(mbEnums.ProtectionState.PENDING)) protectedBuildings.add(b); } @@ -191,14 +191,14 @@ public enum NPCManager { // to add the NPC to the building's hireling list // Account for R8's having slots reversed. - if (abstractCharacter.building.getBlueprint() != null && abstractCharacter.building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL) && abstractCharacter.building.getRank() == 8) + if (abstractCharacter.building.getBlueprint() != null && abstractCharacter.building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.TOL) && abstractCharacter.building.getRank() == 8) buildingSlot = BuildingManager.getLastAvailableSlot(abstractCharacter.building); else buildingSlot = BuildingManager.getAvailableSlot(abstractCharacter.building); // Override slot for siege engines - if (abstractCharacter.getObjectType().equals(Enum.GameObjectType.Mob) && ((Mob) abstractCharacter).behaviourType.equals(Enum.MobBehaviourType.SiegeEngine)) { + if (abstractCharacter.getObjectType().equals(mbEnums.GameObjectType.Mob) && ((Mob) abstractCharacter).behaviourType.equals(mbEnums.MobBehaviourType.SiegeEngine)) { Mob siegeMobile = (Mob) abstractCharacter; buildingSlot = siegeMobile.guardCaptain.minions.size() + 2; } @@ -265,7 +265,7 @@ public enum NPCManager { float attackSpeedModifier = 1; float powerDamageModifier = 1; //handle stance modifiers for guard mob - if (guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)) { + if (guard.agentType.equals(mbEnums.AIAgentType.GUARDWALLARCHER)) { //apply rogue bonuses attackRatingModifier += 0.5f; defenseModifier += 0.5f; @@ -273,12 +273,12 @@ public enum NPCManager { attackSpeedModifier -= 0.36f; } else { Integer contractID; - if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) { + if (guard.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) { contractID = guard.guardCaptain.contract.getContractID(); } else { contractID = guard.contract.getContractID(); } - if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()) { + if (mbEnums.MinionType.ContractToMinionMap.get(contractID) != null && mbEnums.MinionType.ContractToMinionMap.get(contractID).isMage()) { //apply mage offensive Stance powerDamageModifier += 0.5f; } else { @@ -309,11 +309,11 @@ public enum NPCManager { guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax()) * rankModifier); guard.speedHandOne = 30.0f; } else { - if (guard.charItemManager.equipped.containsKey(Enum.EquipSlotType.RHELD)) { + if (guard.charItemManager.equipped.containsKey(mbEnums.EquipSlotType.RHELD)) { //has main hand weapon - Item weapon = guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD); + Item weapon = guard.charItemManager.equipped.get(mbEnums.EquipSlotType.RHELD); - if (weapon.template.item_primary_attr.equals(Enum.AttributeType.Strength)) + if (weapon.template.item_primary_attr.equals(mbEnums.AttributeType.Strength)) primaryStat = guard.getStatStrCurrent(); else primaryStat = guard.getStatDexCurrent(); @@ -322,10 +322,10 @@ public enum NPCManager { guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax() + weapon.template.item_weapon_damage.values().iterator().next()[1]) * rankModifier) + primaryStat; guard.speedHandOne = weapon.template.item_weapon_wepspeed; guard.rangeHandOne = weapon.template.item_weapon_max_range; - } else if (guard.charItemManager.equipped.containsKey(Enum.EquipSlotType.LHELD) && !ItemManager.isShield(guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template)) { + } else if (guard.charItemManager.equipped.containsKey(mbEnums.EquipSlotType.LHELD) && !ItemManager.isShield(guard.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD).template)) { //has off hand weapon - Item weapon = guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD); - if (weapon.template.item_primary_attr.equals(Enum.AttributeType.Strength)) + Item weapon = guard.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD); + if (weapon.template.item_primary_attr.equals(mbEnums.AttributeType.Strength)) primaryStat = guard.getStatStrCurrent(); else primaryStat = guard.getStatDexCurrent(); @@ -350,7 +350,7 @@ public enum NPCManager { int baseDef = guard.mobBase.getDefenseRating(); int armorDefense = 0; for (Item equipped : guard.charItemManager.equipped.values()) - if (equipped.template.item_type.equals(Enum.ItemType.ARMOR) || ItemManager.isShield(equipped.template)) + if (equipped.template.item_type.equals(mbEnums.ItemType.ARMOR) || ItemManager.isShield(equipped.template)) armorDefense += equipped.template.item_defense_rating; guard.defenseRating = dexterity + baseDef + armorDefense; } @@ -358,10 +358,10 @@ public enum NPCManager { public static void setAttackRatingForGuard(Mob guard) { int strength = guard.getStatStrCurrent(); int baseAtr = guard.mobBase.getAttackRating(); - if (guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD) != null) - guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + ((int) guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).template.item_skill_required.values().toArray()[0] * 4) + ((int) guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).template.item_skill_required.values().toArray()[0] * 3)); - else if (guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD) != null && !ItemManager.isShield(guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template)) - guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + ((int) guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template.item_skill_required.values().toArray()[0] * 4) + ((int) guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template.item_skill_required.values().toArray()[0] * 3)); + if (guard.charItemManager.equipped.get(mbEnums.EquipSlotType.RHELD) != null) + guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + ((int) guard.charItemManager.equipped.get(mbEnums.EquipSlotType.RHELD).template.item_skill_required.values().toArray()[0] * 4) + ((int) guard.charItemManager.equipped.get(mbEnums.EquipSlotType.RHELD).template.item_skill_required.values().toArray()[0] * 3)); + else if (guard.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD) != null && !ItemManager.isShield(guard.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD).template)) + guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + ((int) guard.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD).template.item_skill_required.values().toArray()[0] * 4) + ((int) guard.charItemManager.equipped.get(mbEnums.EquipSlotType.LHELD).template.item_skill_required.values().toArray()[0] * 3)); else guard.atrHandOne = baseAtr; } @@ -440,10 +440,10 @@ public enum NPCManager { return; for (Item equipped : mob.charItemManager.equipped.values()) { - if (equipped.template.item_type.equals(Enum.ItemType.ARMOR)) { - mob.resists.setResist(Enum.DamageType.SLASHING, mob.resists.getResist(Enum.DamageType.SLASHING, 0) + equipped.template.combat_attack_resist.get("SLASHING")); - mob.resists.setResist(Enum.DamageType.CRUSHING, mob.resists.getResist(Enum.DamageType.CRUSHING, 0) + equipped.template.combat_attack_resist.get("CRUSHING")); - mob.resists.setResist(Enum.DamageType.PIERCING, mob.resists.getResist(Enum.DamageType.PIERCING, 0) + equipped.template.combat_attack_resist.get("PIERCING")); + if (equipped.template.item_type.equals(mbEnums.ItemType.ARMOR)) { + mob.resists.setResist(mbEnums.DamageType.SLASHING, mob.resists.getResist(mbEnums.DamageType.SLASHING, 0) + equipped.template.combat_attack_resist.get("SLASHING")); + mob.resists.setResist(mbEnums.DamageType.CRUSHING, mob.resists.getResist(mbEnums.DamageType.CRUSHING, 0) + equipped.template.combat_attack_resist.get("CRUSHING")); + mob.resists.setResist(mbEnums.DamageType.PIERCING, mob.resists.getResist(mbEnums.DamageType.PIERCING, 0) + equipped.template.combat_attack_resist.get("PIERCING")); } } } diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 85b7fd53..4578f79f 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -8,7 +8,6 @@ package engine.gameManager; -import engine.Enum.*; import engine.InterestManagement.Terrain; import engine.InterestManagement.WorldGrid; import engine.db.handlers.dbEffectsBaseHandler; @@ -23,6 +22,7 @@ import engine.jobs.FinishRecycleTimeJob; import engine.jobs.UseItemJob; import engine.jobs.UsePowerJob; import engine.math.Vector3fImmutable; +import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.Dispatch; import engine.net.DispatchMessage; diff --git a/src/engine/gameManager/SimulationManager.java b/src/engine/gameManager/SimulationManager.java index ccdcb007..1ac64199 100644 --- a/src/engine/gameManager/SimulationManager.java +++ b/src/engine/gameManager/SimulationManager.java @@ -8,8 +8,8 @@ package engine.gameManager; -import engine.Enum; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.City; import engine.objects.PlayerCharacter; @@ -192,7 +192,7 @@ public enum SimulationManager { // often at all. Have a cityListIsDirty boolean that gets set if it // needs an update. Will speed up this method a great deal. - Collection cityList = DbManager.getList(Enum.GameObjectType.City); + Collection cityList = DbManager.getList(mbEnums.GameObjectType.City); if (cityList == null) { Logger.info("City List null"); diff --git a/src/engine/gameManager/ZoneManager.java b/src/engine/gameManager/ZoneManager.java index b842b968..bae9898e 100644 --- a/src/engine/gameManager/ZoneManager.java +++ b/src/engine/gameManager/ZoneManager.java @@ -8,7 +8,7 @@ package engine.gameManager; -import engine.Enum; +import engine.mbEnums; import engine.InterestManagement.Terrain; import engine.math.Bounds; import engine.math.Vector2f; @@ -384,7 +384,7 @@ public enum ZoneManager { treeBounds = Bounds.borrow(); - treeBounds.setBounds(new Vector2f(positionX, positionZ), new Vector2f(Enum.CityBoundsType.PLACEMENT.halfExtents, Enum.CityBoundsType.PLACEMENT.halfExtents), 0.0f); + treeBounds.setBounds(new Vector2f(positionX, positionZ), new Vector2f(mbEnums.CityBoundsType.PLACEMENT.halfExtents, mbEnums.CityBoundsType.PLACEMENT.halfExtents), 0.0f); zoneList = currentZone.nodes; diff --git a/src/engine/jobs/ActivateBaneJob.java b/src/engine/jobs/ActivateBaneJob.java index 65d3cd94..521c6db4 100644 --- a/src/engine/jobs/ActivateBaneJob.java +++ b/src/engine/jobs/ActivateBaneJob.java @@ -9,10 +9,10 @@ package engine.jobs; -import engine.Enum; -import engine.Enum.ChatChannelType; import engine.gameManager.DbManager; import engine.job.AbstractScheduleJob; +import engine.mbEnums; +import engine.mbEnums.ChatChannelType; import engine.net.DispatchMessage; import engine.net.client.msg.chat.ChatSystemMsg; import engine.objects.City; @@ -33,7 +33,7 @@ public class ActivateBaneJob extends AbstractScheduleJob { City city; - city = (City) DbManager.getObject(Enum.GameObjectType.City, cityUUID); + city = (City) DbManager.getObject(mbEnums.GameObjectType.City, cityUUID); if (city == null) return; diff --git a/src/engine/jobs/ChantJob.java b/src/engine/jobs/ChantJob.java index cfb2bfb7..03d23680 100644 --- a/src/engine/jobs/ChantJob.java +++ b/src/engine/jobs/ChantJob.java @@ -9,11 +9,11 @@ package engine.jobs; -import engine.Enum.GameObjectType; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.gameManager.PowersManager; import engine.gameManager.SessionManager; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.PlayerBonuses; diff --git a/src/engine/jobs/CloseGateJob.java b/src/engine/jobs/CloseGateJob.java index 46168b76..2da270c9 100644 --- a/src/engine/jobs/CloseGateJob.java +++ b/src/engine/jobs/CloseGateJob.java @@ -9,9 +9,9 @@ package engine.jobs; -import engine.Enum; -import engine.Enum.PortalType; import engine.job.AbstractScheduleJob; +import engine.mbEnums; +import engine.mbEnums.PortalType; import engine.objects.Building; import engine.objects.Runegate; import org.pmw.tinylog.Logger; @@ -19,7 +19,7 @@ import org.pmw.tinylog.Logger; public class CloseGateJob extends AbstractScheduleJob { private final Building building; - private final Enum.PortalType portalType; + private final mbEnums.PortalType portalType; public CloseGateJob(Building building, PortalType portalType) { diff --git a/src/engine/jobs/DamageOverTimeJob.java b/src/engine/jobs/DamageOverTimeJob.java index eaa4d25f..66c2d140 100644 --- a/src/engine/jobs/DamageOverTimeJob.java +++ b/src/engine/jobs/DamageOverTimeJob.java @@ -9,8 +9,8 @@ package engine.jobs; -import engine.Enum.GameObjectType; import engine.gameManager.PowersManager; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; diff --git a/src/engine/jobs/DatabaseUpdateJob.java b/src/engine/jobs/DatabaseUpdateJob.java index fa45cf44..96a5cdd3 100644 --- a/src/engine/jobs/DatabaseUpdateJob.java +++ b/src/engine/jobs/DatabaseUpdateJob.java @@ -9,9 +9,9 @@ package engine.jobs; -import engine.Enum.GameObjectType; import engine.gameManager.DbManager; import engine.job.AbstractScheduleJob; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractGameObject; import engine.objects.Building; import engine.objects.PlayerCharacter; diff --git a/src/engine/jobs/DoorCloseJob.java b/src/engine/jobs/DoorCloseJob.java index 8606d6f3..2bbd304f 100644 --- a/src/engine/jobs/DoorCloseJob.java +++ b/src/engine/jobs/DoorCloseJob.java @@ -9,7 +9,7 @@ package engine.jobs; -import engine.Enum.DoorState; +import engine.mbEnums.DoorState; import engine.job.AbstractScheduleJob; import engine.net.DispatchMessage; import engine.net.client.msg.DoorTryOpenMsg; diff --git a/src/engine/jobs/FinishSummonsJob.java b/src/engine/jobs/FinishSummonsJob.java index 3c0c269a..9396620c 100644 --- a/src/engine/jobs/FinishSummonsJob.java +++ b/src/engine/jobs/FinishSummonsJob.java @@ -9,8 +9,8 @@ package engine.jobs; -import engine.Enum.ModType; -import engine.Enum.SourceType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.gameManager.PowersManager; import engine.job.AbstractScheduleJob; import engine.job.JobContainer; diff --git a/src/engine/jobs/PersistentAoeJob.java b/src/engine/jobs/PersistentAoeJob.java index 68465274..cfc59dc7 100644 --- a/src/engine/jobs/PersistentAoeJob.java +++ b/src/engine/jobs/PersistentAoeJob.java @@ -9,9 +9,9 @@ package engine.jobs; -import engine.Enum.GameObjectType; import engine.gameManager.PowersManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.net.client.msg.PerformActionMsg; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; diff --git a/src/engine/jobs/TrackJob.java b/src/engine/jobs/TrackJob.java index 066292b4..80fd6b2e 100644 --- a/src/engine/jobs/TrackJob.java +++ b/src/engine/jobs/TrackJob.java @@ -9,7 +9,7 @@ package engine.jobs; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.PowersManager; import engine.math.Vector3fImmutable; import engine.net.Dispatch; @@ -84,7 +84,7 @@ public class TrackJob extends AbstractEffectJob { TrackArrowMsg tam = new TrackArrowMsg(rotation); Dispatch dispatch = Dispatch.borrow(pc, tam); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } diff --git a/src/engine/jobs/UpgradeNPCJob.java b/src/engine/jobs/UpgradeNPCJob.java index d080746c..217033bf 100644 --- a/src/engine/jobs/UpgradeNPCJob.java +++ b/src/engine/jobs/UpgradeNPCJob.java @@ -9,7 +9,7 @@ package engine.jobs; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.job.AbstractScheduleJob; import engine.objects.AbstractCharacter; diff --git a/src/engine/Enum.java b/src/engine/mbEnums.java similarity index 99% rename from src/engine/Enum.java rename to src/engine/mbEnums.java index 38612cd0..b77bf902 100644 --- a/src/engine/Enum.java +++ b/src/engine/mbEnums.java @@ -24,6 +24,8 @@ import java.util.EnumSet; import java.util.HashMap; import java.util.concurrent.ThreadLocalRandom; +; + /* * MagicBane engine enumeration class. * @@ -32,7 +34,7 @@ import java.util.concurrent.ThreadLocalRandom; * the imports consolidated. */ -public class Enum { +public class mbEnums { public static > EnumSet fromLong(long bitVector, Class enumClass) { diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 1401aded..059d0005 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -8,12 +8,12 @@ package engine.mobileAI; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.InterestManagement.WorldGrid; import engine.gameManager.*; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.mobileAI.Threads.MobAIThread; import engine.mobileAI.Threads.Respawner; import engine.mobileAI.utilities.MovementUtilities; @@ -50,13 +50,13 @@ public class MobAI { return; } - if (target.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && + if (target.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter) && !mob.canSee((AbstractCharacter) target)) { mob.setCombatTarget(null); return; } - if (target.getObjectType() == Enum.GameObjectType.PlayerCharacter && canCast(mob)) { + if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter && canCast(mob)) { if (MobCast(mob)) { mob.updateLocation(); @@ -141,7 +141,7 @@ public class MobAI { if (playercity != null) for (Mob guard : playercity.getParent().zoneMobSet) - if (guard.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) + if (guard.agentType.equals(mbEnums.AIAgentType.GUARDCAPTAIN)) if (guard.getCombatTarget() == null && !guard.getGuild().equals(mob.getGuild())) guard.setCombatTarget(mob); @@ -188,7 +188,7 @@ public class MobAI { // early exit while waiting to patrol again. // Minions are force marched if captain is alive - boolean forced = mob.agentType.equals(Enum.AIAgentType.GUARDMINION) && + boolean forced = mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION) && mob.guardCaptain.isAlive(); if (mob.stopPatrolTime + (patrolDelay * 1000) > System.currentTimeMillis()) @@ -198,7 +198,7 @@ public class MobAI { //guards inherit barracks patrol points dynamically if (mob.patrolPoints == null || mob.patrolPoints.isEmpty()) - if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN) || mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) { + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDCAPTAIN) || mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) { Building barracks = mob.building; @@ -215,7 +215,7 @@ public class MobAI { // Minions are given marching orders by the captain if he is alive - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) { + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) { Mob captain = (Mob) mob.guardCaptain; mob.destination = captain.destination.add(Formation.getOffset(2, mob.guardCaptain.minions.indexOf(mob.getObjectUUID()) + 3)); mob.lastPatrolPointIndex = captain.lastPatrolPointIndex; @@ -226,7 +226,7 @@ public class MobAI { // Captain orders minions to patrol - if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDCAPTAIN)) for (Integer minionUUID : mob.minions) { Mob minion = Mob.getMob(minionUUID); if (minion.isAlive() && minion.combatTarget == null) @@ -254,16 +254,16 @@ public class MobAI { if (mob.isPlayerGuard() == true) { - if (mob.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)) + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDWALLARCHER)) return false; //wall archers don't cast - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) contractID = mob.guardCaptain.contract.getContractID(); else contractID = mob.contract.getContractID(); // exception allowing werewolf and werebear guard captains to cast - if (Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false && contractID != 980103 && contractID != 980104) + if (mbEnums.MinionType.ContractToMinionMap.get(contractID).isMage() == false && contractID != 980103 && contractID != 980104) return false; } @@ -313,7 +313,7 @@ public class MobAI { if (mob.contract != null) contractEntries = PowersManager.getPowersForRune(mob.contractUUID); - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) contractEntries = PowersManager.getPowersForRune(mob.guardCaptain.contractUUID); powerEntries.addAll(contractEntries); @@ -473,7 +473,7 @@ public class MobAI { if (mob.despawned && mob.isPlayerGuard()) { - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) { + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION)) { if (mob.guardCaptain.isAlive() == false || ((Mob) mob.guardCaptain).despawned == true) { //minions don't respawn while guard captain is dead @@ -490,7 +490,7 @@ public class MobAI { //check to send mob home for player guards to prevent exploit of dragging guards away and then teleporting - if (!mob.agentType.equals(Enum.AIAgentType.PET)) + if (!mob.agentType.equals(mbEnums.AIAgentType.PET)) CheckToSendMobHome(mob); return; @@ -507,7 +507,7 @@ public class MobAI { boolean bypassLoadedPlayerCheck = false; if (mob.isPlayerGuard() || mob.isSiege()) { bypassLoadedPlayerCheck = true; - if (mob.combatTarget != null && mob.combatTarget.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) + if (mob.combatTarget != null && mob.combatTarget.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) if (mob.combatTarget.loc.distanceSquared(mob.loc) > 10000) mob.setCombatTarget(null); } @@ -519,7 +519,7 @@ public class MobAI { } - if (mob.agentType.equals(Enum.AIAgentType.PET) == false) + if (mob.agentType.equals(mbEnums.AIAgentType.PET) == false) CheckToSendMobHome(mob); if (mob.getCombatTarget() != null) { @@ -684,7 +684,7 @@ public class MobAI { // Minions only patrol on their own if captain is dead. - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION) == false) + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION) == false) Patrol(mob); else if (mob.guardCaptain.isAlive() == false) Patrol(mob); @@ -758,19 +758,19 @@ public class MobAI { if (mob.getCombatTarget() == null) return; - if (mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && MovementUtilities.inRangeDropAggro(mob, (PlayerCharacter) mob.getCombatTarget()) == false && - mob.agentType.equals(Enum.AIAgentType.PET) == false) { + if (mob.getCombatTarget().getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter) && MovementUtilities.inRangeDropAggro(mob, (PlayerCharacter) mob.getCombatTarget()) == false && + mob.agentType.equals(mbEnums.AIAgentType.PET) == false) { mob.setCombatTarget(null); return; } if (System.currentTimeMillis() > mob.getNextAttackTime()) { int delay = 3000; - if (mob.charItemManager.getEquipped().get(Enum.EquipSlotType.RHELD) != null) { - delay = (int) (mob.charItemManager.getEquipped().get(Enum.EquipSlotType.RHELD).template.item_weapon_wepspeed * 100); + if (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.RHELD) != null) { + delay = (int) (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.RHELD).template.item_weapon_wepspeed * 100); } - if (mob.charItemManager.getEquipped().get(Enum.EquipSlotType.LHELD) != null && mob.charItemManager.getEquipped().get(Enum.EquipSlotType.LHELD).template.item_type.equals(Enum.ItemType.WEAPON)) { - delay += (int) (mob.charItemManager.getEquipped().get(Enum.EquipSlotType.LHELD).template.item_weapon_wepspeed * 100); + if (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.LHELD) != null && mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.LHELD).template.item_type.equals(mbEnums.ItemType.WEAPON)) { + delay += (int) (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.LHELD).template.item_weapon_wepspeed * 100); } @@ -799,7 +799,7 @@ public class MobAI { PowersManager.useMobPower(mob, mob, recall, 40); mob.setCombatTarget(null); - if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN) && mob.isAlive()) { + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDCAPTAIN) && mob.isAlive()) { //guard captain pulls his minions home with him @@ -883,7 +883,7 @@ public class MobAI { continue; //don't attack pets - if (aggroMob.agentType.equals(Enum.AIAgentType.PET)) + if (aggroMob.agentType.equals(mbEnums.AIAgentType.PET)) continue; if (mob.getLoc().distanceSquared2D(aggroMob.getLoc()) > sqr(50)) @@ -907,7 +907,7 @@ public class MobAI { if (newTarget != null) { - if (newTarget.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (newTarget.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { if (GuardCanAggro(mob, (PlayerCharacter) newTarget)) mob.setCombatTarget(newTarget); } else @@ -947,7 +947,7 @@ public class MobAI { if (mob.isSit() && mob.getTimeStamp("HEALTHRECOVERED") < System.currentTimeMillis() + 3000) if (mob.getHealth() < mob.getHealthMax()) { - float recoveredHealth = mob.getHealthMax() * ((1 + mob.getBonuses().getFloatPercentAll(Enum.ModType.HealthRecoverRate, Enum.SourceType.None)) * 0.01f); + float recoveredHealth = mob.getHealthMax() * ((1 + mob.getBonuses().getFloatPercentAll(mbEnums.ModType.HealthRecoverRate, mbEnums.SourceType.None)) * 0.01f); mob.setHealth(mob.getHealth() + recoveredHealth); mob.getTimestamps().put("HEALTHRECOVERED", System.currentTimeMillis()); @@ -992,7 +992,7 @@ public class MobAI { mob.setCombatTarget(newTarget); else { if (mob.getCombatTarget() == null) { - if (mob.behaviourType == Enum.MobBehaviourType.HamletGuard) + if (mob.behaviourType == mbEnums.MobBehaviourType.HamletGuard) SafeGuardAggro(mob); //safehold guard else CheckForAggro(mob); //normal aggro @@ -1026,7 +1026,7 @@ public class MobAI { // Defer to captain if possible for current target - if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION) && + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION) && mob.guardCaptain.isAlive() && mob.guardCaptain.combatTarget != null) { mob.setCombatTarget(mob.guardCaptain.combatTarget); @@ -1178,7 +1178,7 @@ public class MobAI { MovementUtilities.aiMove(mob, mob.destination, true); - if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) { + if (mob.agentType.equals(mbEnums.AIAgentType.GUARDCAPTAIN)) { for (Integer minionUUID : mob.minions) { Mob minion = Mob.getMob(minionUUID); @@ -1206,7 +1206,7 @@ public class MobAI { float CurrentHateValue = 0; - if (mob.getCombatTarget() != null && mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) + if (mob.getCombatTarget() != null && mob.getCombatTarget().getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) CurrentHateValue = mob.playerAgroMap.get(mob.combatTarget.getObjectUUID()).floatValue(); AbstractWorldObject mostHatedTarget = null; diff --git a/src/engine/mobileAI/utilities/MovementUtilities.java b/src/engine/mobileAI/utilities/MovementUtilities.java index c00bfffa..0e91800a 100644 --- a/src/engine/mobileAI/utilities/MovementUtilities.java +++ b/src/engine/mobileAI/utilities/MovementUtilities.java @@ -9,13 +9,13 @@ package engine.mobileAI.utilities; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.exception.MsgSendException; import engine.gameManager.MovementManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.mobileAI.Threads.MobAIThread; import engine.net.client.msg.MoveToPointMsg; import engine.objects.*; @@ -51,7 +51,7 @@ public class MovementUtilities { //Guards recall distance = 814. if (tol != null) { - return !(agent.getLoc().distanceSquared2D(tol.getLoc()) > sqr(Enum.CityBoundsType.ZONE.halfExtents)); + return !(agent.getLoc().distanceSquared2D(tol.getLoc()) > sqr(mbEnums.CityBoundsType.ZONE.halfExtents)); } } @@ -166,7 +166,7 @@ public class MovementUtilities { public static boolean canMove(Mob agent) { - if (agent.getMobBase() != null && Enum.MobFlagType.SENTINEL.elementOf(agent.getMobBase().getFlags())) + if (agent.getMobBase() != null && mbEnums.MobFlagType.SENTINEL.elementOf(agent.getMobBase().getFlags())) return false; return (agent.isAlive() && !agent.getBonuses().getBool(ModType.Stunned, SourceType.None) && !agent.getBonuses().getBool(ModType.CannotMove, SourceType.None)); diff --git a/src/engine/net/DispatchMessage.java b/src/engine/net/DispatchMessage.java index 5ef7d033..647c2d33 100644 --- a/src/engine/net/DispatchMessage.java +++ b/src/engine/net/DispatchMessage.java @@ -9,8 +9,8 @@ package engine.net; -import engine.Enum.DispatchChannel; -import engine.Enum.GameObjectType; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.gameManager.SessionManager; import engine.math.Vector3fImmutable; diff --git a/src/engine/net/ItemProductionManager.java b/src/engine/net/ItemProductionManager.java index 78577668..1e8c8ec1 100644 --- a/src/engine/net/ItemProductionManager.java +++ b/src/engine/net/ItemProductionManager.java @@ -9,7 +9,7 @@ package engine.net; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.objects.ProducedItem; import org.pmw.tinylog.Logger; diff --git a/src/engine/net/MessageDispatcher.java b/src/engine/net/MessageDispatcher.java index 862be7b7..3466b161 100644 --- a/src/engine/net/MessageDispatcher.java +++ b/src/engine/net/MessageDispatcher.java @@ -9,7 +9,7 @@ package engine.net; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import org.pmw.tinylog.Logger; import java.util.concurrent.ConcurrentLinkedQueue; diff --git a/src/engine/net/client/ClientConnection.java b/src/engine/net/client/ClientConnection.java index fc3430fd..b2ec544a 100644 --- a/src/engine/net/client/ClientConnection.java +++ b/src/engine/net/client/ClientConnection.java @@ -9,11 +9,11 @@ package engine.net.client; -import engine.Enum; import engine.gameManager.ConfigManager; import engine.gameManager.SessionManager; import engine.job.JobScheduler; import engine.jobs.DisconnectJob; +import engine.mbEnums; import engine.net.AbstractConnection; import engine.net.AbstractNetMsg; import engine.net.Network; @@ -218,7 +218,7 @@ public class ClientConnection extends AbstractConnection { super.disconnect(); try { - if (ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER)) + if (ConfigManager.serverType.equals(mbEnums.ServerType.WORLDSERVER)) ConfigManager.worldServer.removeClient(this); else ConfigManager.loginServer.removeClient(this); diff --git a/src/engine/net/client/handlers/AbandonAssetMsgHandler.java b/src/engine/net/client/handlers/AbandonAssetMsgHandler.java index fbbcea93..e44fcbd8 100644 --- a/src/engine/net/client/handlers/AbandonAssetMsgHandler.java +++ b/src/engine/net/client/handlers/AbandonAssetMsgHandler.java @@ -1,10 +1,10 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.BuildingGroup; -import engine.Enum.GuildState; import engine.exception.MsgSendException; import engine.gameManager.*; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GuildState; import engine.net.client.ClientConnection; import engine.net.client.msg.AbandonAssetMsg; import engine.net.client.msg.ClientNetMsg; @@ -38,7 +38,7 @@ public class AbandonAssetMsgHandler extends AbstractClientMsgHandler { if (targetBuilding.getBlueprint().getBuildingGroup().equals(BuildingGroup.BULWARK) || targetBuilding.getBlueprint().getBuildingGroup().equals(BuildingGroup.SIEGETENT)) - targetBuilding.setProtectionState(Enum.ProtectionState.NONE); + targetBuilding.setProtectionState(mbEnums.ProtectionState.NONE); DbManager.BuildingQueries.CLEAR_CONDEMNED_LIST(targetBuilding.getObjectUUID()); targetBuilding.getCondemned().clear(); diff --git a/src/engine/net/client/handlers/AcceptInviteToGuildHandler.java b/src/engine/net/client/handlers/AcceptInviteToGuildHandler.java index a0269277..ce93f4cb 100644 --- a/src/engine/net/client/handlers/AcceptInviteToGuildHandler.java +++ b/src/engine/net/client/handlers/AcceptInviteToGuildHandler.java @@ -9,14 +9,14 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.GuildHistoryType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.GuildManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.GuildHistoryType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -86,7 +86,7 @@ public class AcceptInviteToGuildHandler extends AbstractClientMsgHandler { player.resetGuildStatuses(); Dispatch dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); DispatchMessage.sendToAllInRange(player, new GuildInfoMsg(player, guild, 2)); diff --git a/src/engine/net/client/handlers/AcceptSubInviteHandler.java b/src/engine/net/client/handlers/AcceptSubInviteHandler.java index d70b0b2e..def58428 100644 --- a/src/engine/net/client/handlers/AcceptSubInviteHandler.java +++ b/src/engine/net/client/handlers/AcceptSubInviteHandler.java @@ -9,13 +9,13 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.GuildState; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.GuildState; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -98,7 +98,7 @@ public class AcceptSubInviteHandler extends AbstractClientMsgHandler { msg.setUnknown02(1); msg.setResponse("Your guild is now a " + sourceGuild.getGuildState().name() + '.'); dispatch = Dispatch.borrow(sourcePlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); ChatManager.chatSystemInfo(sourcePlayer, "Your guild is now a " + sourceGuild.getGuildState().name() + '.'); return true; diff --git a/src/engine/net/client/handlers/AcceptTradeRequestMsgHandler.java b/src/engine/net/client/handlers/AcceptTradeRequestMsgHandler.java index 5cc736b9..83197728 100644 --- a/src/engine/net/client/handlers/AcceptTradeRequestMsgHandler.java +++ b/src/engine/net/client/handlers/AcceptTradeRequestMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -92,10 +92,10 @@ public class AcceptTradeRequestMsgHandler extends AbstractClientMsgHandler { UpdateVaultMsg uvmTarget = new UpdateVaultMsg(targetAccount); dispatch = Dispatch.borrow(source, uvmSource); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); dispatch = Dispatch.borrow(target, uvmTarget); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); source.charItemManager.setVaultOpen(false); toTradeWith.setVaultOpen(false); @@ -118,10 +118,10 @@ public class AcceptTradeRequestMsgHandler extends AbstractClientMsgHandler { toTradeWith.tradeID = msg.getUnknown01(); dispatch = Dispatch.borrow(source, otwm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); dispatch = Dispatch.borrow(target, otwm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); return true; } diff --git a/src/engine/net/client/handlers/ActivateNPCMsgHandler.java b/src/engine/net/client/handlers/ActivateNPCMsgHandler.java index 944ed06c..67eefdd1 100644 --- a/src/engine/net/client/handlers/ActivateNPCMsgHandler.java +++ b/src/engine/net/client/handlers/ActivateNPCMsgHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.ItemType; import engine.exception.MsgSendException; import engine.gameManager.*; +import engine.mbEnums; +import engine.mbEnums.ItemType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -66,7 +66,7 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler { anm.setSize(ItemLists.size()); anm.setItemList(ItemLists); Dispatch dispatch = Dispatch.borrow(player, anm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } if (msg.getUnknown01() == 0) { @@ -125,7 +125,7 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler { mca1.setAssetName1(building.getName()); mca1.setUnknown54(1); Dispatch dispatch = Dispatch.borrow(player, mca1); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } diff --git a/src/engine/net/client/handlers/AddGoldToTradeWindowMsgHandler.java b/src/engine/net/client/handlers/AddGoldToTradeWindowMsgHandler.java index 414e1bc5..99bf6635 100644 --- a/src/engine/net/client/handlers/AddGoldToTradeWindowMsgHandler.java +++ b/src/engine/net/client/handlers/AddGoldToTradeWindowMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -95,13 +95,13 @@ public class AddGoldToTradeWindowMsgHandler extends AbstractClientMsgHandler { source.charItemManager.modifyCommitToTrade(); dispatch = Dispatch.borrow(source, utwm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); dispatch = Dispatch.borrow(source, ugm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); dispatch = Dispatch.borrow(other, utwmOther); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/AddItemToTradeWindowMsgHandler.java b/src/engine/net/client/handlers/AddItemToTradeWindowMsgHandler.java index 40d09e5a..c5969a09 100644 --- a/src/engine/net/client/handlers/AddItemToTradeWindowMsgHandler.java +++ b/src/engine/net/client/handlers/AddItemToTradeWindowMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -81,7 +81,7 @@ public class AddItemToTradeWindowMsgHandler extends AbstractClientMsgHandler { if (!tradingWith.hasRoomTrade(item.template.item_wt)) { dispatch = Dispatch.borrow(source, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); return false; } @@ -93,12 +93,12 @@ public class AddItemToTradeWindowMsgHandler extends AbstractClientMsgHandler { source.charItemManager.addItemToTrade(item); dispatch = Dispatch.borrow(other, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); source.charItemManager.modifyCommitToTrade(); dispatch = Dispatch.borrow(other, utwm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); return true; } diff --git a/src/engine/net/client/handlers/AllianceChangeMsgHandler.java b/src/engine/net/client/handlers/AllianceChangeMsgHandler.java index f56b8849..1089b95c 100644 --- a/src/engine/net/client/handlers/AllianceChangeMsgHandler.java +++ b/src/engine/net/client/handlers/AllianceChangeMsgHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.AllianceType; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.AllianceType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -40,20 +40,20 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler { if (!Guild.sameGuild(origin.getPlayerCharacter().getGuild(), fromGuild)) { msg.setMsgType(AllianceChangeMsg.ERROR_NOT_SAME_GUILD); dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return; } if (!GuildStatusController.isInnerCouncil(origin.getPlayerCharacter().getGuildStatus()) && !GuildStatusController.isGuildLeader(origin.getPlayerCharacter().getGuildStatus())) { msg.setMsgType(AllianceChangeMsg.ERROR_NOT_AUTHORIZED); dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return; } dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @@ -72,7 +72,7 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler { return; dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @@ -91,7 +91,7 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler { return; dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @@ -142,7 +142,7 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler { } msg.setMsgType(AllianceChangeMsg.INFO_SUCCESS); Dispatch dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; diff --git a/src/engine/net/client/handlers/AllyEnemyListMsgHandler.java b/src/engine/net/client/handlers/AllyEnemyListMsgHandler.java index 18fc7b48..85ee8fac 100644 --- a/src/engine/net/client/handlers/AllyEnemyListMsgHandler.java +++ b/src/engine/net/client/handlers/AllyEnemyListMsgHandler.java @@ -1,8 +1,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -35,7 +35,7 @@ public class AllyEnemyListMsgHandler extends AbstractClientMsgHandler { if (toGuild == null) return; dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); // UpdateClientAlliancesMsg ucam = new UpdateClientAlliancesMsg(); // diff --git a/src/engine/net/client/handlers/AppointGroupLeaderHandler.java b/src/engine/net/client/handlers/AppointGroupLeaderHandler.java index b7e1f42f..8f5fa51b 100644 --- a/src/engine/net/client/handlers/AppointGroupLeaderHandler.java +++ b/src/engine/net/client/handlers/AppointGroupLeaderHandler.java @@ -13,6 +13,7 @@ import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.GroupManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -51,7 +52,7 @@ public class AppointGroupLeaderHandler extends AbstractClientMsgHandler { AppointGroupLeaderMsg reply = new AppointGroupLeaderMsg(); reply.setResponse(1); Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), reply); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } diff --git a/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java b/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java index 5b82b08e..47b94d47 100644 --- a/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java +++ b/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java @@ -1,10 +1,10 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.*; import engine.job.JobScheduler; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -136,7 +136,7 @@ public class ArcLoginNotifyMsgHandler extends AbstractClientMsgHandler { //Send current hotzone if (ZoneManager.hotZone != null) { - HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID()); + HotzoneChangeMsg hcm = new HotzoneChangeMsg(mbEnums.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID()); Dispatch dispatch = Dispatch.borrow(player, hcm); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); } diff --git a/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java b/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java index a915ab07..ca12c32d 100644 --- a/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java @@ -1,8 +1,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -51,7 +51,7 @@ public class ArcMineChangeProductionMsgHandler extends AbstractClientMsgHandler //make sure valid resource - Enum.ResourceType resource = Enum.ResourceType.hashLookup.get(changeProductionMsg.getResourceHash()); + mbEnums.ResourceType resource = mbEnums.ResourceType.hashLookup.get(changeProductionMsg.getResourceHash()); if (resource == null) return true; diff --git a/src/engine/net/client/handlers/ArcMineWindowAvailableTimeHandler.java b/src/engine/net/client/handlers/ArcMineWindowAvailableTimeHandler.java index 6b2bd0ee..fa580286 100644 --- a/src/engine/net/client/handlers/ArcMineWindowAvailableTimeHandler.java +++ b/src/engine/net/client/handlers/ArcMineWindowAvailableTimeHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -40,7 +40,7 @@ public class ArcMineWindowAvailableTimeHandler extends AbstractClientMsgHandler if (treeOfLife.getBlueprintUUID() == 0) return true; - if (treeOfLife.getBlueprint().getBuildingGroup() != Enum.BuildingGroup.TOL) + if (treeOfLife.getBlueprint().getBuildingGroup() != mbEnums.BuildingGroup.TOL) return true; if (playerCharacter == null) diff --git a/src/engine/net/client/handlers/ArcOwnedMinesListHandler.java b/src/engine/net/client/handlers/ArcOwnedMinesListHandler.java index 10f7f802..629d7a13 100644 --- a/src/engine/net/client/handlers/ArcOwnedMinesListHandler.java +++ b/src/engine/net/client/handlers/ArcOwnedMinesListHandler.java @@ -1,7 +1,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/ArcSiegeSpireMsgHandler.java b/src/engine/net/client/handlers/ArcSiegeSpireMsgHandler.java index 322981ad..cd77faae 100644 --- a/src/engine/net/client/handlers/ArcSiegeSpireMsgHandler.java +++ b/src/engine/net/client/handlers/ArcSiegeSpireMsgHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums.GameObjectType; import engine.net.client.ClientConnection; import engine.net.client.msg.ArcSiegeSpireMsg; import engine.net.client.msg.ClientNetMsg; diff --git a/src/engine/net/client/handlers/ArcViewAssetTransactionsMsgHandler.java b/src/engine/net/client/handlers/ArcViewAssetTransactionsMsgHandler.java index a0861e08..bf8b85c8 100644 --- a/src/engine/net/client/handlers/ArcViewAssetTransactionsMsgHandler.java +++ b/src/engine/net/client/handlers/ArcViewAssetTransactionsMsgHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -55,7 +55,7 @@ public class ArcViewAssetTransactionsMsgHandler extends AbstractClientMsgHandler newMsg.configure(); dispatch = Dispatch.borrow(player, newMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/AssetSupportMsgHandler.java b/src/engine/net/client/handlers/AssetSupportMsgHandler.java index 1627b0ac..24d9a028 100644 --- a/src/engine/net/client/handlers/AssetSupportMsgHandler.java +++ b/src/engine/net/client/handlers/AssetSupportMsgHandler.java @@ -1,12 +1,12 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.SupportMsgType; -import engine.Enum.TaxType; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.NPCManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.SupportMsgType; +import engine.mbEnums.TaxType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -83,20 +83,20 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { ErrorPopupMsg.sendErrorMsg(origin.getPlayerCharacter(), "Failed to add taxes to building."); return; } - targetBuilding.setProtectionState(Enum.ProtectionState.PENDING); + targetBuilding.setProtectionState(mbEnums.ProtectionState.PENDING); } else if (msg.getProfitTax() != 0) { if (!serverCity.getTOL().addProtectionTax(targetBuilding, origin.getPlayerCharacter(), TaxType.PROFIT, msg.getProfitTax(), msg.getEnforceKOS() == 1 ? true : false)) { ErrorPopupMsg.sendErrorMsg(origin.getPlayerCharacter(), "Failed to add taxes to building."); return; } - targetBuilding.setProtectionState(Enum.ProtectionState.PENDING); + targetBuilding.setProtectionState(mbEnums.ProtectionState.PENDING); } else - targetBuilding.setProtectionState(Enum.ProtectionState.CONTRACT); + targetBuilding.setProtectionState(mbEnums.ProtectionState.CONTRACT); outMsg = new ManageNPCMsg(vendor); dispatch = Dispatch.borrow(origin.getPlayerCharacter(), outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } private static void unprotectAsset(Building targetBuilding, NPC vendor, ClientConnection origin) { @@ -106,11 +106,11 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { // Early exit if UUID < the last database derived building UUID. - if (targetBuilding.getProtectionState() == Enum.ProtectionState.NPC) { + if (targetBuilding.getProtectionState() == mbEnums.ProtectionState.NPC) { return; } - if (targetBuilding.getProtectionState() == engine.Enum.ProtectionState.NONE) + if (targetBuilding.getProtectionState() == mbEnums.ProtectionState.NONE) return; if (GuildStatusController.isInnerCouncil(origin.getPlayerCharacter().getGuildStatus()) == false) @@ -118,7 +118,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { targetBuilding.removeTaxes(); - targetBuilding.setProtectionState(engine.Enum.ProtectionState.NONE); + targetBuilding.setProtectionState(mbEnums.ProtectionState.NONE); } @@ -160,7 +160,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { SupportMsgType supportType = SupportMsgType.typeLookup.get(msg.getMessageType()); if (supportType == null) { - supportType = Enum.SupportMsgType.NONE; + supportType = mbEnums.SupportMsgType.NONE; Logger.error("No enumeration for support type" + msg.getMessageType()); } switch (supportType) { @@ -179,7 +179,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { outMsg.configure(); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case REMOVETAX: @@ -202,7 +202,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { mca.setAssetName1(targetBuilding.getName()); mca.setUnknown54(1); dispatch = Dispatch.borrow(player, mca); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; case ACCEPTTAX: //AcceptTax @@ -226,12 +226,12 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler { mca.setUnknown54(1); dispatch = Dispatch.borrow(player, mca); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } dispatch = Dispatch.borrow(player, baseMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; diff --git a/src/engine/net/client/handlers/AttackCmdMsgHandler.java b/src/engine/net/client/handlers/AttackCmdMsgHandler.java index fa371473..afaaf22d 100644 --- a/src/engine/net/client/handlers/AttackCmdMsgHandler.java +++ b/src/engine/net/client/handlers/AttackCmdMsgHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.CombatManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.AttackCmdMsg; import engine.net.client.msg.ClientNetMsg; @@ -45,9 +45,9 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler { return true; AbstractWorldObject target = null; - Enum.GameObjectType targetType; + mbEnums.GameObjectType targetType; - targetType = Enum.GameObjectType.values()[msg.getTargetType()]; + targetType = mbEnums.GameObjectType.values()[msg.getTargetType()]; switch (targetType) { case Mob: diff --git a/src/engine/net/client/handlers/BanishUnbanishHandler.java b/src/engine/net/client/handlers/BanishUnbanishHandler.java index e2a88482..f25fbd5d 100644 --- a/src/engine/net/client/handlers/BanishUnbanishHandler.java +++ b/src/engine/net/client/handlers/BanishUnbanishHandler.java @@ -9,12 +9,12 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GuildHistoryType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GuildHistoryType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -115,7 +115,7 @@ public class BanishUnbanishHandler extends AbstractClientMsgHandler { targetName + " has been banished from " + guild.getName() + '.'); GuildListMsg guildListMsg = new GuildListMsg(guild); dispatch = Dispatch.borrow(source, guildListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else { ErrorPopupMsg.sendErrorPopup(source, 103); // You may not banish this char } diff --git a/src/engine/net/client/handlers/BreakFealtyHandler.java b/src/engine/net/client/handlers/BreakFealtyHandler.java index c713d7d6..260ec640 100644 --- a/src/engine/net/client/handlers/BreakFealtyHandler.java +++ b/src/engine/net/client/handlers/BreakFealtyHandler.java @@ -9,13 +9,13 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.GuildManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -97,7 +97,7 @@ public class BreakFealtyHandler extends AbstractClientMsgHandler { SendGuildEntryMsg msg = new SendGuildEntryMsg(player); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //Update Map. @@ -164,7 +164,7 @@ public class BreakFealtyHandler extends AbstractClientMsgHandler { SendGuildEntryMsg msg = new SendGuildEntryMsg(player); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //Update Map. diff --git a/src/engine/net/client/handlers/ChangeAltitudeHandler.java b/src/engine/net/client/handlers/ChangeAltitudeHandler.java index cdc2ea99..cf526e06 100644 --- a/src/engine/net/client/handlers/ChangeAltitudeHandler.java +++ b/src/engine/net/client/handlers/ChangeAltitudeHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; +import engine.mbEnums.DispatchChannel; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; import engine.net.client.msg.ChangeAltitudeMsg; diff --git a/src/engine/net/client/handlers/ChangeGuildLeaderHandler.java b/src/engine/net/client/handlers/ChangeGuildLeaderHandler.java index 2fa29725..d0e5f2f6 100644 --- a/src/engine/net/client/handlers/ChangeGuildLeaderHandler.java +++ b/src/engine/net/client/handlers/ChangeGuildLeaderHandler.java @@ -9,11 +9,11 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -76,7 +76,7 @@ public class ChangeGuildLeaderHandler extends AbstractClientMsgHandler { boolean isMale = true; boolean updateTarget; - Enum.GuildCharterType t = Enum.GuildCharterType.getGuildTypeFromInt(sourcePlayer.getGuild().getCharter()); + mbEnums.GuildCharterType t = mbEnums.GuildCharterType.getGuildTypeFromInt(sourcePlayer.getGuild().getCharter()); if (!DbManager.GuildQueries.SET_GUILD_LEADER(targetPlayer.getObjectUUID(), glGuild.getObjectUUID())) { @@ -120,12 +120,12 @@ public class ChangeGuildLeaderHandler extends AbstractClientMsgHandler { GuildInfoMsg guildInfoMsg = new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 2); Dispatch dispatch = Dispatch.borrow(sourcePlayer, guildInfoMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); GuildListMsg guildListMsg = new GuildListMsg(sourcePlayer.getGuild()); dispatch = Dispatch.borrow(sourcePlayer, guildListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); if (targetPlayer != null) { diff --git a/src/engine/net/client/handlers/ChangeRankHandler.java b/src/engine/net/client/handlers/ChangeRankHandler.java index db3e48be..202bace2 100644 --- a/src/engine/net/client/handlers/ChangeRankHandler.java +++ b/src/engine/net/client/handlers/ChangeRankHandler.java @@ -9,11 +9,11 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -60,13 +60,13 @@ public class ChangeRankHandler extends AbstractClientMsgHandler { boolean isMale; if (msg.getPreviousRank() != msg.getNewRank()) { - Enum.GuildCharterType t = Enum.GuildCharterType.getGuildTypeFromInt(sourcePlayer.getGuild().getCharter()); + mbEnums.GuildCharterType t = mbEnums.GuildCharterType.getGuildTypeFromInt(sourcePlayer.getGuild().getCharter()); if (targetPlayer != null) { targetPlayer.setGuildTitle(msg.getNewRank()); targetName = targetPlayer.getFirstName(); - isMale = targetPlayer.race.getRaceType().getCharacterSex().equals(Enum.CharacterSex.MALE); + isMale = targetPlayer.race.getRaceType().getCharacterSex().equals(mbEnums.CharacterSex.MALE); } else { DbManager.GuildQueries.UPDATE_GUILD_RANK_OFFLINE(msg.getPlayerUUID(), msg.getNewRank(), sourcePlayer.getGuild().getObjectUUID()); @@ -150,10 +150,10 @@ public class ChangeRankHandler extends AbstractClientMsgHandler { if (updateSource) { Dispatch dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 2)); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); dispatch = Dispatch.borrow(sourcePlayer, new GuildListMsg(sourcePlayer.getGuild())); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } diff --git a/src/engine/net/client/handlers/ChannelMuteMsgHandler.java b/src/engine/net/client/handlers/ChannelMuteMsgHandler.java index 1e71fe89..bd70d6f8 100644 --- a/src/engine/net/client/handlers/ChannelMuteMsgHandler.java +++ b/src/engine/net/client/handlers/ChannelMuteMsgHandler.java @@ -1,12 +1,12 @@ package engine.net.client.handlers; -import engine.Enum.BuildingGroup; -import engine.Enum.GuildState; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.GuildManager; import engine.gameManager.ZoneManager; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GuildState; import engine.net.client.ClientConnection; import engine.net.client.msg.ChatFilterMsg; import engine.net.client.msg.ClientNetMsg; diff --git a/src/engine/net/client/handlers/CityChoiceMsgHandler.java b/src/engine/net/client/handlers/CityChoiceMsgHandler.java index 32b5686c..64a7fdf9 100644 --- a/src/engine/net/client/handlers/CityChoiceMsgHandler.java +++ b/src/engine/net/client/handlers/CityChoiceMsgHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.GuildManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -60,7 +60,7 @@ public class CityChoiceMsgHandler extends AbstractClientMsgHandler { //if repledge, reguild the player but set his building now. - GuildManager.joinGuild(player, cityGuild, city.getObjectUUID(), Enum.GuildHistoryType.JOIN); + GuildManager.joinGuild(player, cityGuild, city.getObjectUUID(), mbEnums.GuildHistoryType.JOIN); break; } diff --git a/src/engine/net/client/handlers/CityDataHandler.java b/src/engine/net/client/handlers/CityDataHandler.java index e35ab28b..1766d74a 100644 --- a/src/engine/net/client/handlers/CityDataHandler.java +++ b/src/engine/net/client/handlers/CityDataHandler.java @@ -1,10 +1,10 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.gameManager.ZoneManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -67,7 +67,7 @@ public class CityDataHandler extends AbstractClientMsgHandler { // If the hotZone has changed then update the client's map accordingly. if (playerCharacter.getTimeStamp("hotzoneupdate") <= ZoneManager.hotZoneLastUpdate.toEpochMilli() && ZoneManager.hotZone != null) { - HotzoneChangeMsg hotzoneChangeMsg = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID()); + HotzoneChangeMsg hotzoneChangeMsg = new HotzoneChangeMsg(mbEnums.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID()); dispatch = Dispatch.borrow(playerCharacter, hotzoneChangeMsg); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); playerCharacter.setTimeStamp("hotzoneupdate", System.currentTimeMillis() - 100); diff --git a/src/engine/net/client/handlers/ClaimAssetMsgHandler.java b/src/engine/net/client/handlers/ClaimAssetMsgHandler.java index 4d1cd6d0..460172a7 100644 --- a/src/engine/net/client/handlers/ClaimAssetMsgHandler.java +++ b/src/engine/net/client/handlers/ClaimAssetMsgHandler.java @@ -9,12 +9,12 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.BuildingGroup; import engine.db.archive.CityRecord; import engine.db.archive.DataWarehouse; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; import engine.net.client.ClientConnection; import engine.net.client.msg.ClaimAssetMsg; import engine.net.client.msg.ClientNetMsg; @@ -81,7 +81,7 @@ public class ClaimAssetMsgHandler extends AbstractClientMsgHandler { // Early exit if UUID < the last database derived building UUID. - if (targetBuilding.getProtectionState() == Enum.ProtectionState.NPC) { + if (targetBuilding.getProtectionState() == mbEnums.ProtectionState.NPC) { return true; } @@ -122,7 +122,7 @@ public class ClaimAssetMsgHandler extends AbstractClientMsgHandler { targetBuilding.getCity().claim(sourcePlayer); // Push transfer of city to data warehouse - CityRecord cityRecord = CityRecord.borrow(targetBuilding.getCity(), Enum.RecordEventType.TRANSFER); + CityRecord cityRecord = CityRecord.borrow(targetBuilding.getCity(), mbEnums.RecordEventType.TRANSFER); DataWarehouse.pushToWarehouse(cityRecord); } else diff --git a/src/engine/net/client/handlers/ClaimGuildTreeMsgHandler.java b/src/engine/net/client/handlers/ClaimGuildTreeMsgHandler.java index 82aa5d83..6b777c3c 100644 --- a/src/engine/net/client/handlers/ClaimGuildTreeMsgHandler.java +++ b/src/engine/net/client/handlers/ClaimGuildTreeMsgHandler.java @@ -9,11 +9,11 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.BuildingGroup; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.ChatManager; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -115,9 +115,9 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler { GuildTreeStatusMsg gtsm = new GuildTreeStatusMsg(building, sourcePlayer); gtsm.configure(); dispatch = Dispatch.borrow(sourcePlayer, gtsm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); - CityZoneMsg czm = new CityZoneMsg(2, playerZone.getLoc().x, playerZone.getLoc().y, playerZone.getLoc().z, playerCity.getCityName(), playerZone, Enum.CityBoundsType.ZONE.halfExtents, Enum.CityBoundsType.ZONE.halfExtents); + CityZoneMsg czm = new CityZoneMsg(2, playerZone.getLoc().x, playerZone.getLoc().y, playerZone.getLoc().z, playerCity.getCityName(), playerZone, mbEnums.CityBoundsType.ZONE.halfExtents, mbEnums.CityBoundsType.ZONE.halfExtents); DispatchMessage.dispatchMsgToAll(czm); break; @@ -152,7 +152,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler { sourcePlayer.setBindBuildingID(building.getObjectUUID()); dispatch = Dispatch.borrow(sourcePlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case OPEN_CITY: case CLOSE_CITY: @@ -171,7 +171,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler { } dispatch = Dispatch.borrow(sourcePlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; default: break; diff --git a/src/engine/net/client/handlers/ClientAdminCommandMsgHandler.java b/src/engine/net/client/handlers/ClientAdminCommandMsgHandler.java index 1e3500cf..efb4a0cb 100644 --- a/src/engine/net/client/handlers/ClientAdminCommandMsgHandler.java +++ b/src/engine/net/client/handlers/ClientAdminCommandMsgHandler.java @@ -8,10 +8,10 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.DevCmdManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.commands.ClientAdminCommandMsg; @@ -30,7 +30,7 @@ public class ClientAdminCommandMsgHandler extends AbstractClientMsgHandler { public static boolean processDevCommand(AbstractWorldObject sender, String text) { - if (sender.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (sender.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter pcSender = (PlayerCharacter) sender; @@ -80,7 +80,7 @@ public class ClientAdminCommandMsgHandler extends AbstractClientMsgHandler { // require minimal access to continue // specific accessLevel checks performed by the DevCmdManager - if (acct.status.equals(Enum.AccountStatus.ADMIN) == false) { + if (acct.status.equals(mbEnums.AccountStatus.ADMIN) == false) { Logger.warn(player.getFirstName() + " Attempted to use a client admin command"); //wtf? ChatManager.chatSystemInfo(pcSender, "CHEATER!!!!!!!!!!!!!"); return true; diff --git a/src/engine/net/client/handlers/ClientLoginInfoMsgHandler.java b/src/engine/net/client/handlers/ClientLoginInfoMsgHandler.java index ca4cc92f..53cb1779 100644 --- a/src/engine/net/client/handlers/ClientLoginInfoMsgHandler.java +++ b/src/engine/net/client/handlers/ClientLoginInfoMsgHandler.java @@ -8,11 +8,11 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.login.ClientLoginInfoMsg; @@ -120,7 +120,7 @@ public class ClientLoginInfoMsgHandler extends AbstractClientMsgHandler { // Account deactivated - if (account.status.equals(Enum.AccountStatus.BANNED)) { + if (account.status.equals(mbEnums.AccountStatus.BANNED)) { LoginServer.KickToLogin(MBServerStatics.LOGINERROR_NO_MORE_PLAYTIME_ON_ACCOUNT, "", origin); return true; } diff --git a/src/engine/net/client/handlers/CloseTradeWindowMsgHandler.java b/src/engine/net/client/handlers/CloseTradeWindowMsgHandler.java index 7f3f34d2..8252ff47 100644 --- a/src/engine/net/client/handlers/CloseTradeWindowMsgHandler.java +++ b/src/engine/net/client/handlers/CloseTradeWindowMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -51,7 +51,7 @@ public class CloseTradeWindowMsgHandler extends AbstractClientMsgHandler { CloseTradeWindowMsg closeMsg = new CloseTradeWindowMsg(source, tradeID); dispatch = Dispatch.borrow(source, closeMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); ClientConnection cc2 = sourceItemMan.getTradingWith(); diff --git a/src/engine/net/client/handlers/DeleteItemMsgHandler.java b/src/engine/net/client/handlers/DeleteItemMsgHandler.java index 2dfcc210..a9beb6db 100644 --- a/src/engine/net/client/handlers/DeleteItemMsgHandler.java +++ b/src/engine/net/client/handlers/DeleteItemMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.Dispatch; import engine.net.DispatchMessage; diff --git a/src/engine/net/client/handlers/DestroyBuildingHandler.java b/src/engine/net/client/handlers/DestroyBuildingHandler.java index b1b90bf4..ddebbd07 100644 --- a/src/engine/net/client/handlers/DestroyBuildingHandler.java +++ b/src/engine/net/client/handlers/DestroyBuildingHandler.java @@ -1,7 +1,7 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.BuildingGroup; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; import engine.InterestManagement.WorldGrid; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; @@ -50,7 +50,7 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler { // Cannot destroy Oblivion database derived buildings. - if (building.getProtectionState() == Enum.ProtectionState.NPC) { + if (building.getProtectionState() == mbEnums.ProtectionState.NPC) { return true; } @@ -62,7 +62,7 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler { if (city != null) bane = city.getBane(); - if (bane != null && bane.getSiegePhase() == Enum.SiegePhase.WAR) { + if (bane != null && bane.getSiegePhase() == mbEnums.SiegePhase.WAR) { ErrorPopupMsg.sendErrorPopup(pc, 171); return true; } diff --git a/src/engine/net/client/handlers/DisbandGuildHandler.java b/src/engine/net/client/handlers/DisbandGuildHandler.java index 15e1fbd8..44eea1ef 100644 --- a/src/engine/net/client/handlers/DisbandGuildHandler.java +++ b/src/engine/net/client/handlers/DisbandGuildHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GuildHistoryType; +import engine.mbEnums; +import engine.mbEnums.GuildHistoryType; import engine.InterestManagement.WorldGrid; import engine.db.archive.DataWarehouse; import engine.db.archive.GuildRecord; @@ -81,7 +81,7 @@ public class DisbandGuildHandler extends AbstractClientMsgHandler { // Log event to data warehous - GuildRecord guildRecord = GuildRecord.borrow(guild, Enum.RecordEventType.DISBAND); + GuildRecord guildRecord = GuildRecord.borrow(guild, mbEnums.RecordEventType.DISBAND); DataWarehouse.pushToWarehouse(guildRecord); // Remove us as a subguild of our nation @@ -113,7 +113,7 @@ public class DisbandGuildHandler extends AbstractClientMsgHandler { LeaveGuildMsg leaveGuildMsg = new LeaveGuildMsg(); leaveGuildMsg.setMessage("You guild has been disbanded!"); dispatch = Dispatch.borrow(player, leaveGuildMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/DismissGuildHandler.java b/src/engine/net/client/handlers/DismissGuildHandler.java index a07054bf..eae7167b 100644 --- a/src/engine/net/client/handlers/DismissGuildHandler.java +++ b/src/engine/net/client/handlers/DismissGuildHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; @@ -122,7 +122,7 @@ public class DismissGuildHandler extends AbstractClientMsgHandler { SendGuildEntryMsg msg = new SendGuildEntryMsg(player); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); final Session s = SessionManager.getSession(player); diff --git a/src/engine/net/client/handlers/DoorTryOpenMsgHandler.java b/src/engine/net/client/handlers/DoorTryOpenMsgHandler.java index 990e974d..c3403913 100644 --- a/src/engine/net/client/handlers/DoorTryOpenMsgHandler.java +++ b/src/engine/net/client/handlers/DoorTryOpenMsgHandler.java @@ -1,7 +1,7 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DoorState; +import engine.mbEnums; +import engine.mbEnums.DoorState; import engine.InterestManagement.WorldGrid; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; @@ -62,7 +62,7 @@ public class DoorTryOpenMsgHandler extends AbstractClientMsgHandler { if ((targetBuilding.isDoorLocked(doorNumber) == true) && msg.getToggle() == 0x01) { msg.setUnk1(2); Dispatch dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; //don't open a locked door } @@ -79,7 +79,7 @@ public class DoorTryOpenMsgHandler extends AbstractClientMsgHandler { for (AbstractWorldObject awo : container) { PlayerCharacter playerCharacter = (PlayerCharacter) awo; Dispatch dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } return true; diff --git a/src/engine/net/client/handlers/FriendAcceptHandler.java b/src/engine/net/client/handlers/FriendAcceptHandler.java index 4212f2ea..175e368f 100644 --- a/src/engine/net/client/handlers/FriendAcceptHandler.java +++ b/src/engine/net/client/handlers/FriendAcceptHandler.java @@ -9,7 +9,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.SessionManager; diff --git a/src/engine/net/client/handlers/FriendDeclineHandler.java b/src/engine/net/client/handlers/FriendDeclineHandler.java index eb57b3f4..35494d6f 100644 --- a/src/engine/net/client/handlers/FriendDeclineHandler.java +++ b/src/engine/net/client/handlers/FriendDeclineHandler.java @@ -9,7 +9,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.Dispatch; diff --git a/src/engine/net/client/handlers/FriendRequestHandler.java b/src/engine/net/client/handlers/FriendRequestHandler.java index 48c5725a..ad99abf1 100644 --- a/src/engine/net/client/handlers/FriendRequestHandler.java +++ b/src/engine/net/client/handlers/FriendRequestHandler.java @@ -9,7 +9,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.SessionManager; diff --git a/src/engine/net/client/handlers/FurnitureHandler.java b/src/engine/net/client/handlers/FurnitureHandler.java index e7dc902d..a916dcb6 100644 --- a/src/engine/net/client/handlers/FurnitureHandler.java +++ b/src/engine/net/client/handlers/FurnitureHandler.java @@ -9,7 +9,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.Dispatch; import engine.net.DispatchMessage; diff --git a/src/engine/net/client/handlers/GroupInviteHandler.java b/src/engine/net/client/handlers/GroupInviteHandler.java index c2f0f0c4..014ac22a 100644 --- a/src/engine/net/client/handlers/GroupInviteHandler.java +++ b/src/engine/net/client/handlers/GroupInviteHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.ConfigManager; import engine.gameManager.GroupManager; @@ -47,7 +47,7 @@ public class GroupInviteHandler extends AbstractClientMsgHandler { msg.setPlayer(pc); msg.setMessageType(1); Dispatch dispatch = Dispatch.borrow(pc, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); group.addUpdateGroupJob(); @@ -128,7 +128,7 @@ public class GroupInviteHandler extends AbstractClientMsgHandler { msg.setName(source.getFirstName()); Dispatch dispatch = Dispatch.borrow(target, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/GroupInviteResponseHandler.java b/src/engine/net/client/handlers/GroupInviteResponseHandler.java index a0706f06..baaf1fcf 100644 --- a/src/engine/net/client/handlers/GroupInviteResponseHandler.java +++ b/src/engine/net/client/handlers/GroupInviteResponseHandler.java @@ -9,7 +9,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.GroupManager; @@ -86,7 +86,7 @@ public class GroupInviteResponseHandler extends AbstractClientMsgHandler { groupUpdateMsg.setPlayer(groupMember); Dispatch dispatch = Dispatch.borrow(player, groupUpdateMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } diff --git a/src/engine/net/client/handlers/GuildControlHandler.java b/src/engine/net/client/handlers/GuildControlHandler.java index 1654dbae..d0f2621b 100644 --- a/src/engine/net/client/handlers/GuildControlHandler.java +++ b/src/engine/net/client/handlers/GuildControlHandler.java @@ -9,7 +9,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.Dispatch; @@ -47,11 +47,11 @@ public class GuildControlHandler extends AbstractClientMsgHandler { msg.setGM((byte) (GuildStatusController.isGuildLeader(player.getGuildStatus()) ? 1 : 0)); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); if (GuildStatusController.isInnerCouncil(player.getGuildStatus()) || GuildStatusController.isGuildLeader(player.getGuildStatus())) { dispatch = Dispatch.borrow(player, new GuildListMsg(player.getGuild())); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else ErrorPopupMsg.sendErrorMsg(player, "Only guild leader and inner council have such authority!"); @@ -64,7 +64,7 @@ public class GuildControlHandler extends AbstractClientMsgHandler { if (pc != null) { dispatch = Dispatch.borrow(player, new GuildListMsg(pc)); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } diff --git a/src/engine/net/client/handlers/GuildCreationFinalizeHandler.java b/src/engine/net/client/handlers/GuildCreationFinalizeHandler.java index 21c30f33..c9295663 100644 --- a/src/engine/net/client/handlers/GuildCreationFinalizeHandler.java +++ b/src/engine/net/client/handlers/GuildCreationFinalizeHandler.java @@ -9,16 +9,16 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; -import engine.Enum.GuildHistoryType; -import engine.Enum.ItemType; -import engine.Enum.OwnerType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.GuildManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.GuildHistoryType; +import engine.mbEnums.ItemType; +import engine.mbEnums.OwnerType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -42,7 +42,7 @@ public class GuildCreationFinalizeHandler extends AbstractClientMsgHandler { PlayerCharacter player; GuildCreationFinalizeMsg msg; - Enum.GuildCharterType charterType; + mbEnums.GuildCharterType charterType; Guild newGuild; Guild playerGuild; @@ -75,7 +75,7 @@ public class GuildCreationFinalizeHandler extends AbstractClientMsgHandler { return true; } - charterType = Enum.GuildCharterType.getGuildTypeFromCharter(charter); + charterType = mbEnums.GuildCharterType.getGuildTypeFromCharter(charter); if (charterType == null) { ErrorPopupMsg.sendErrorPopup(player, GuildManager.NO_CHARTER_FOUND); diff --git a/src/engine/net/client/handlers/GuildCreationOptionsHandler.java b/src/engine/net/client/handlers/GuildCreationOptionsHandler.java index 8b957be1..986604e9 100644 --- a/src/engine/net/client/handlers/GuildCreationOptionsHandler.java +++ b/src/engine/net/client/handlers/GuildCreationOptionsHandler.java @@ -10,6 +10,7 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -39,7 +40,7 @@ public class GuildCreationOptionsHandler extends AbstractClientMsgHandler { return true; dispatch = Dispatch.borrow(sourcePlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/GuildInfoHandler.java b/src/engine/net/client/handlers/GuildInfoHandler.java index 550cdd0a..3398f179 100644 --- a/src/engine/net/client/handlers/GuildInfoHandler.java +++ b/src/engine/net/client/handlers/GuildInfoHandler.java @@ -9,9 +9,10 @@ package engine.net.client.handlers; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -39,18 +40,18 @@ public class GuildInfoHandler extends AbstractClientMsgHandler { if (msg.getMsgType() == 1) { dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 4)); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else if (msg.getMsgType() == 5) { if (msg.getObjectType() == GameObjectType.PlayerCharacter.ordinal()) { PlayerCharacter pc = PlayerCharacter.getPlayerCharacter(msg.getObjectID()); dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(pc, pc.getGuild(), 5)); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else { //TODO Change this to a null object when we make a null object. dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 1)); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } diff --git a/src/engine/net/client/handlers/GuildTreeStatusMsgHandler.java b/src/engine/net/client/handlers/GuildTreeStatusMsgHandler.java index 120f3403..a0c0b37b 100644 --- a/src/engine/net/client/handlers/GuildTreeStatusMsgHandler.java +++ b/src/engine/net/client/handlers/GuildTreeStatusMsgHandler.java @@ -8,10 +8,10 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/HirelingServiceMsgHandler.java b/src/engine/net/client/handlers/HirelingServiceMsgHandler.java index 68ee899c..7e13a724 100644 --- a/src/engine/net/client/handlers/HirelingServiceMsgHandler.java +++ b/src/engine/net/client/handlers/HirelingServiceMsgHandler.java @@ -10,10 +10,10 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/InvalidTradeRequestMsgHandler.java b/src/engine/net/client/handlers/InvalidTradeRequestMsgHandler.java index ea6bcc9d..0951b8d4 100644 --- a/src/engine/net/client/handlers/InvalidTradeRequestMsgHandler.java +++ b/src/engine/net/client/handlers/InvalidTradeRequestMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -39,7 +39,7 @@ public class InvalidTradeRequestMsgHandler extends AbstractClientMsgHandler { Dispatch dispatch; dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/InviteToGuildHandler.java b/src/engine/net/client/handlers/InviteToGuildHandler.java index 8491939e..87540154 100644 --- a/src/engine/net/client/handlers/InviteToGuildHandler.java +++ b/src/engine/net/client/handlers/InviteToGuildHandler.java @@ -10,13 +10,13 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.ConfigManager; import engine.gameManager.GuildManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -85,7 +85,7 @@ public class InviteToGuildHandler extends AbstractClientMsgHandler { return true; } - Enum.GuildCharterType guildCharterType = Enum.GuildCharterType.values()[sourcePlayer.getGuild().getCharter()]; + mbEnums.GuildCharterType guildCharterType = mbEnums.GuildCharterType.values()[sourcePlayer.getGuild().getCharter()]; if (guildCharterType == null) { ErrorPopupMsg.sendErrorPopup(sourcePlayer, GuildManager.NO_CHARTER_FOUND); @@ -147,7 +147,7 @@ public class InviteToGuildHandler extends AbstractClientMsgHandler { msg.setTargetName(""); dispatch = Dispatch.borrow(targetPlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/InviteToSubHandler.java b/src/engine/net/client/handlers/InviteToSubHandler.java index 280aae16..0efd1390 100644 --- a/src/engine/net/client/handlers/InviteToSubHandler.java +++ b/src/engine/net/client/handlers/InviteToSubHandler.java @@ -9,13 +9,13 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -127,7 +127,7 @@ public class InviteToSubHandler extends AbstractClientMsgHandler { msg.setUnknown02(1); dispatch = Dispatch.borrow(target, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else { sendChat(source, "Failed to send sub invite to target."); diff --git a/src/engine/net/client/handlers/ItemFromVaultMsgHandler.java b/src/engine/net/client/handlers/ItemFromVaultMsgHandler.java index ccbfa3a2..3dbe99c3 100644 --- a/src/engine/net/client/handlers/ItemFromVaultMsgHandler.java +++ b/src/engine/net/client/handlers/ItemFromVaultMsgHandler.java @@ -8,9 +8,9 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -36,7 +36,7 @@ public class ItemFromVaultMsgHandler extends AbstractClientMsgHandler { ItemToVaultMsg back = new ItemToVaultMsg(msg); dispatch = Dispatch.borrow(player, back); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); ChatManager.chatInfoError(player, "Can't transfer to inventory: " + reason); } diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index ca88fbc4..e54001f0 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -10,12 +10,12 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.ItemType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ItemType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -79,11 +79,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { targetItem.setValue(itemPrice); outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, ACTION_DEPOSIT, true); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, ACTION_SETPRICE, true); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else if (targetItem.getObjectType() == GameObjectType.MobLoot) { MobLoot mobLoot = (MobLoot) targetItem; if (!DbManager.NPCQueries.UPDATE_ITEM_PRICE(mobLoot.getObjectUUID(), vendor.getObjectUUID(), itemPrice)) { @@ -93,11 +93,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { targetItem.setValue(itemPrice); outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, ACTION_DEPOSIT, true); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, ACTION_SETPRICE, true); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } // Set item's price @@ -160,11 +160,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, ACTION_DEPOSIT, true); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, ACTION_CONFIRM_DEPOSIT, true); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); origin.getPlayerCharacter().charItemManager.updateInventory(); } catch (Exception e) { @@ -211,7 +211,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { return; } - targetItem.containerType = Enum.ItemContainerType.INVENTORY; + targetItem.containerType = mbEnums.ItemContainerType.INVENTORY; targetItem.setOwner(vendor); vendor.charItemManager.addItemToInventory(targetItem); @@ -220,7 +220,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { outMsg = new ManageNPCMsg(vendor); outMsg.setMessageType(ACTION_PRODUCE); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } finally { origin.buyLock.unlock(); } @@ -302,7 +302,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, ACTION_TAKE, true); dispatch = Dispatch.borrow(origin.getPlayerCharacter(), outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } // Refund a portion of the gold @@ -365,7 +365,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { outMsg = new ManageNPCMsg(vendor); outMsg.setMessageType(1); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); ; } finally { origin.sellLock.unlock(); @@ -443,7 +443,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { // Grab reference to vendor we are interacting with - vendorNPC = (NPC) DbManager.getObject(engine.Enum.GameObjectType.NPC, msg.getNpcUUID()); + vendorNPC = (NPC) DbManager.getObject(mbEnums.GameObjectType.NPC, msg.getNpcUUID()); // Oops? @@ -476,7 +476,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { recycleItem(msg.getItemIDtoTypeMap(), vendorNPC, origin); msg.setActionType(7); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case ACTION_COMPLETE: @@ -499,7 +499,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { case ACTION_TAKE: takeItem(msg.getItemIDtoTypeMap(), vendorNPC, origin); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; } diff --git a/src/engine/net/client/handlers/ItemToVaultMsgHandler.java b/src/engine/net/client/handlers/ItemToVaultMsgHandler.java index e7e70d1d..3ea4a657 100644 --- a/src/engine/net/client/handlers/ItemToVaultMsgHandler.java +++ b/src/engine/net/client/handlers/ItemToVaultMsgHandler.java @@ -8,9 +8,9 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -36,7 +36,7 @@ public class ItemToVaultMsgHandler extends AbstractClientMsgHandler { ItemFromVaultMsg back = new ItemFromVaultMsg(msg); dispatch = Dispatch.borrow(player, back); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); ChatManager.chatInfoError(player, "Can't transfer to vault: " + reason); } diff --git a/src/engine/net/client/handlers/KeepAliveServerClientHandler.java b/src/engine/net/client/handlers/KeepAliveServerClientHandler.java index 8a9b2b81..6f6c3568 100644 --- a/src/engine/net/client/handlers/KeepAliveServerClientHandler.java +++ b/src/engine/net/client/handlers/KeepAliveServerClientHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/LeaveGuildHandler.java b/src/engine/net/client/handlers/LeaveGuildHandler.java index 4abf6b68..7fcbaa2f 100644 --- a/src/engine/net/client/handlers/LeaveGuildHandler.java +++ b/src/engine/net/client/handlers/LeaveGuildHandler.java @@ -9,12 +9,13 @@ package engine.net.client.handlers; -import engine.Enum.GuildHistoryType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.ConfigManager; import engine.gameManager.GroupManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GuildHistoryType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -48,7 +49,7 @@ public class LeaveGuildHandler extends AbstractClientMsgHandler { if (GuildStatusController.isGuildLeader(playerCharacter.getGuildStatus())) { msg.setMessage("You must switch leadership of your guild before leaving!"); dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } @@ -74,7 +75,7 @@ public class LeaveGuildHandler extends AbstractClientMsgHandler { // Send message back to client msg.setMessage("You have left the guild."); dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/LockUnlockDoorMsgHandler.java b/src/engine/net/client/handlers/LockUnlockDoorMsgHandler.java index 9269fda6..afa03d2c 100644 --- a/src/engine/net/client/handlers/LockUnlockDoorMsgHandler.java +++ b/src/engine/net/client/handlers/LockUnlockDoorMsgHandler.java @@ -3,6 +3,7 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -65,9 +66,9 @@ public class LockUnlockDoorMsgHandler extends AbstractClientMsgHandler { boolean stateChanged; if (targetBuilding.isDoorLocked(doorNum)) { - stateChanged = targetBuilding.setDoorState(doorNum, engine.Enum.DoorState.UNLOCKED); + stateChanged = targetBuilding.setDoorState(doorNum, mbEnums.DoorState.UNLOCKED); } else { - stateChanged = targetBuilding.setDoorState(doorNum, engine.Enum.DoorState.LOCKED); + stateChanged = targetBuilding.setDoorState(doorNum, mbEnums.DoorState.LOCKED); } if (stateChanged == false) { @@ -81,7 +82,7 @@ public class LockUnlockDoorMsgHandler extends AbstractClientMsgHandler { } Dispatch dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java b/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java index 7413ceb4..13144c86 100644 --- a/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java +++ b/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java @@ -1,10 +1,10 @@ package engine.net.client.handlers; -import engine.Enum; import engine.InterestManagement.WorldGrid; import engine.exception.MsgSendException; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.LoginToGameServerMsg; @@ -66,7 +66,7 @@ public class LoginToGameServerMsgHandler extends AbstractClientMsgHandler { // If account is suspended, kick - if (acc.status.equals(Enum.AccountStatus.BANNED)) { + if (acc.status.equals(mbEnums.AccountStatus.BANNED)) { origin.kickToLogin(MBServerStatics.LOGINERROR_NO_MORE_PLAYTIME_ON_ACCOUNT, "Account banned."); return true; } @@ -114,7 +114,7 @@ public class LoginToGameServerMsgHandler extends AbstractClientMsgHandler { // Log Admin Login Event - if (pc.getAccount().status.equals(Enum.AccountStatus.ADMIN)) + if (pc.getAccount().status.equals(mbEnums.AccountStatus.ADMIN)) DbManager.AccountQueries.WRITE_ADMIN_LOG(pc.getCombinedName(), "ADMIN LOGIN"); DbManager.AccountQueries.SET_ACCOUNT_LOGIN(sessionInfo.getAccount(), sessionInfo.getPlayerCharacter().getName(), origin.getClientIpAddress(), sessionInfo.getMachineID()); diff --git a/src/engine/net/client/handlers/LootMsgHandler.java b/src/engine/net/client/handlers/LootMsgHandler.java index b727b1af..44882c2d 100644 --- a/src/engine/net/client/handlers/LootMsgHandler.java +++ b/src/engine/net/client/handlers/LootMsgHandler.java @@ -8,11 +8,11 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.GroupManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -60,7 +60,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { int targetType = msg.getTargetType(); int targetID = msg.getTargetID(); - if (targetType == Enum.GameObjectType.PlayerCharacter.ordinal() || targetType == Enum.GameObjectType.Mob.ordinal() || targetType == Enum.GameObjectType.Corpse.ordinal()) { + if (targetType == mbEnums.GameObjectType.PlayerCharacter.ordinal() || targetType == mbEnums.GameObjectType.Mob.ordinal() || targetType == mbEnums.GameObjectType.Corpse.ordinal()) { } else { //needed for getting contracts for some reason targetType = msg.getSourceID2(); targetID = msg.getUnknown01(); @@ -73,9 +73,9 @@ public class LootMsgHandler extends AbstractClientMsgHandler { AbstractCharacter tar = null; Corpse corpse = null; - if (targetType == Enum.GameObjectType.PlayerCharacter.ordinal() || targetType == Enum.GameObjectType.Mob.ordinal()) { + if (targetType == mbEnums.GameObjectType.PlayerCharacter.ordinal() || targetType == mbEnums.GameObjectType.Mob.ordinal()) { - if (targetType == Enum.GameObjectType.PlayerCharacter.ordinal()) { + if (targetType == mbEnums.GameObjectType.PlayerCharacter.ordinal()) { tar = PlayerCharacter.getFromCache(targetID); if (tar == null) @@ -84,9 +84,9 @@ public class LootMsgHandler extends AbstractClientMsgHandler { if (player.getObjectUUID() != tar.getObjectUUID() && ((PlayerCharacter) tar).isInSafeZone()) return true; - } else if (targetType == Enum.GameObjectType.NPC.ordinal()) + } else if (targetType == mbEnums.GameObjectType.NPC.ordinal()) tar = NPC.getFromCache(targetID); - else if (targetType == Enum.GameObjectType.Mob.ordinal()) + else if (targetType == mbEnums.GameObjectType.Mob.ordinal()) tar = Mob.getFromCache(targetID); if (tar == null) @@ -117,10 +117,10 @@ public class LootMsgHandler extends AbstractClientMsgHandler { itemRet = tar.charItemManager.lootItemFromMe(item, player, origin); //Take equipment off mob - if (tar.getObjectType() == Enum.GameObjectType.Mob && itemRet != null) { + if (tar.getObjectType() == mbEnums.GameObjectType.Mob && itemRet != null) { Mob mobTarget = (Mob) tar; - if (item != null && item.getObjectType() == Enum.GameObjectType.MobLoot) { + if (item != null && item.getObjectType() == mbEnums.GameObjectType.MobLoot) { for (Item equip : mobTarget.charItemManager.equipped.values()) { @@ -137,7 +137,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { } } - } else if (targetType == Enum.GameObjectType.Corpse.ordinal()) { + } else if (targetType == mbEnums.GameObjectType.Corpse.ordinal()) { corpse = Corpse.getCorpse(targetID); if (corpse == null) @@ -150,7 +150,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { } //can't loot other players in safe zone. - if (corpse.getBelongsToType() == Enum.GameObjectType.PlayerCharacter.ordinal()) { + if (corpse.getBelongsToType() == mbEnums.GameObjectType.PlayerCharacter.ordinal()) { if (player.getObjectUUID() == corpse.getBelongsToID()) itemRet = corpse.lootItem(item, player); @@ -162,7 +162,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { if (itemRet == null) return true; - if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) { + if (item.template.item_type.equals(mbEnums.ItemType.GOLD)) { // this is done to prevent the temporary goldItem item // (from the mob) from appearing in player's inventory. // It also updates the goldItem quantity display @@ -188,7 +188,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { //TODO send group loot message if player is grouped and visible Group group = GroupManager.getGroup(player); - if (group != null && group.getSplitGold() && (item.template.item_type.equals(engine.Enum.ItemType.GOLD) == false)) { + if (group != null && group.getSplitGold() && (item.template.item_type.equals(mbEnums.ItemType.GOLD) == false)) { String name = item.getName(); String text = player.getFirstName() + " has looted " + name + '.'; ChatManager.chatGroupInfoCanSee(player, text); @@ -203,7 +203,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { if (itemRet == null) return true; - if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) { + if (item.template.item_type.equals(mbEnums.ItemType.GOLD)) { // this is done to prevent the temporary goldItem item // (from the mob) from appearing in player's inventory. // It also updates the goldItem quantity display @@ -232,7 +232,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { Dispatch dispatch = Dispatch.borrow(player, msg); //DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY); DispatchMessage.dispatchMsgToInterestArea(tar, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, true); - LootMsg newItemMsg = new LootMsg(Enum.GameObjectType.PlayerCharacter.ordinal(), player.getObjectUUID(), 0, 0, itemRet); + LootMsg newItemMsg = new LootMsg(mbEnums.GameObjectType.PlayerCharacter.ordinal(), player.getObjectUUID(), 0, 0, itemRet); dispatch = Dispatch.borrow(player, newItemMsg); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY); @@ -242,7 +242,7 @@ public class LootMsgHandler extends AbstractClientMsgHandler { //TODO send group loot message if player is grouped and visible Group group = GroupManager.getGroup(player); - if (group != null && group.getSplitGold() && (item.template.item_type.equals(engine.Enum.ItemType.GOLD) == false)) { + if (group != null && group.getSplitGold() && (item.template.item_type.equals(mbEnums.ItemType.GOLD) == false)) { String name = item.getName(); String text = player.getFirstName() + " has looted " + name + '.'; ChatManager.chatGroupInfoCanSee(player, text); diff --git a/src/engine/net/client/handlers/LootWindowRequestMsgHandler.java b/src/engine/net/client/handlers/LootWindowRequestMsgHandler.java index fa23c31f..2f3d1247 100644 --- a/src/engine/net/client/handlers/LootWindowRequestMsgHandler.java +++ b/src/engine/net/client/handlers/LootWindowRequestMsgHandler.java @@ -8,10 +8,10 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.InterestManagement.WorldGrid; import engine.exception.MsgSendException; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -63,7 +63,7 @@ public class LootWindowRequestMsgHandler extends AbstractClientMsgHandler { return true; LootWindowResponseMsg lwrm = null; - Enum.GameObjectType targetType = Enum.GameObjectType.values()[msg.getTargetType()]; + mbEnums.GameObjectType targetType = mbEnums.GameObjectType.values()[msg.getTargetType()]; AbstractCharacter characterTarget = null; Corpse corpseTarget; diff --git a/src/engine/net/client/handlers/MOTDCommitHandler.java b/src/engine/net/client/handlers/MOTDCommitHandler.java index fba1e435..ee509cb8 100644 --- a/src/engine/net/client/handlers/MOTDCommitHandler.java +++ b/src/engine/net/client/handlers/MOTDCommitHandler.java @@ -12,6 +12,7 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -73,7 +74,7 @@ public class MOTDCommitHandler extends AbstractClientMsgHandler { } } dispatch = Dispatch.borrow(sourcePlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } return true; diff --git a/src/engine/net/client/handlers/MOTDEditHandler.java b/src/engine/net/client/handlers/MOTDEditHandler.java index a9309021..a5ee07e4 100644 --- a/src/engine/net/client/handlers/MOTDEditHandler.java +++ b/src/engine/net/client/handlers/MOTDEditHandler.java @@ -9,9 +9,9 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -57,7 +57,7 @@ public class MOTDEditHandler extends AbstractClientMsgHandler { LeaveGuildMsg leaveGuildMsg = new LeaveGuildMsg(); leaveGuildMsg.setMessage("You do not belong to a guild!"); dispatch = Dispatch.borrow(playerCharacter, leaveGuildMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } @@ -75,7 +75,7 @@ public class MOTDEditHandler extends AbstractClientMsgHandler { msg.setMessage(nation.getMOTD()); } dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } return true; diff --git a/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java b/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java index 1ae22679..739deab5 100644 --- a/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java +++ b/src/engine/net/client/handlers/ManageCityAssetMsgHandler.java @@ -1,13 +1,13 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; import engine.gameManager.ZoneManager; import engine.math.Bounds; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -118,7 +118,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler { if (msg.actionType == 2 || msg.actionType == 22) { - if (building.getBlueprint() != null && building.getBlueprint().getBuildingGroup() == engine.Enum.BuildingGroup.BANESTONE) { + if (building.getBlueprint() != null && building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.BANESTONE) { outMsg.actionType = 18; outMsg.setTargetType(building.getObjectType().ordinal()); @@ -308,12 +308,12 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler { manageCityAssetsMsg.buttonTransfer = 0; manageCityAssetsMsg.buttonAbandon = 0; manageCityAssetsMsg.buttonUpgrade = 0; - } else if (building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.TOL) { + } else if (building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.TOL) { manageCityAssetsMsg.buttonDestroy = 0; manageCityAssetsMsg.buttonTransfer = 0; manageCityAssetsMsg.buttonAbandon = 1; manageCityAssetsMsg.buttonUpgrade = 1; - } else if (building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.MINE) { + } else if (building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.MINE) { manageCityAssetsMsg.buttonDestroy = 0; manageCityAssetsMsg.buttonTransfer = 0; manageCityAssetsMsg.buttonAbandon = 0; diff --git a/src/engine/net/client/handlers/MerchantMsgHandler.java b/src/engine/net/client/handlers/MerchantMsgHandler.java index ad2a0fd2..143240c3 100644 --- a/src/engine/net/client/handlers/MerchantMsgHandler.java +++ b/src/engine/net/client/handlers/MerchantMsgHandler.java @@ -1,13 +1,13 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GuildHistoryType; import engine.InterestManagement.RealmMap; import engine.exception.MsgSendException; import engine.gameManager.*; import engine.job.JobScheduler; import engine.jobs.TeleportJob; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.GuildHistoryType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -155,7 +155,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler { if (shrineBuilding == null) return; - if (shrineBuilding.getBlueprint() != null && shrineBuilding.getBlueprint().getBuildingGroup() != engine.Enum.BuildingGroup.SHRINE) + if (shrineBuilding.getBlueprint() != null && shrineBuilding.getBlueprint().getBuildingGroup() != mbEnums.BuildingGroup.SHRINE) return; if (shrineBuilding.getRank() == -1) @@ -230,7 +230,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler { trlm.configure(); dispatch = Dispatch.borrow(pc, trlm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } private static void teleportRepledge(MerchantMsg msg, ClientConnection origin, PlayerCharacter player, boolean isTeleport, NPC npc) { @@ -294,7 +294,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler { if ((!isTeleport && joinedGuild) || (isTeleport)) { dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } //teleport player to city @@ -401,7 +401,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler { case 5: dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); requestSwearAsSubGuild(msg, origin, player, npc); break; case 10: @@ -425,7 +425,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler { case 15: LeaderboardMessage lbm = new LeaderboardMessage(); dispatch = Dispatch.borrow(player, lbm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case 16: ViewResourcesMsg vrm = new ViewResourcesMsg(player); @@ -434,7 +434,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler { vrm.setWarehouseBuilding(warehouse); vrm.configure(); dispatch = Dispatch.borrow(player, vrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case 17: Warehouse.warehouseWithdraw(msg, player, npc); diff --git a/src/engine/net/client/handlers/MineWindowChangeHandler.java b/src/engine/net/client/handlers/MineWindowChangeHandler.java index 5118088c..c708ec53 100644 --- a/src/engine/net/client/handlers/MineWindowChangeHandler.java +++ b/src/engine/net/client/handlers/MineWindowChangeHandler.java @@ -8,12 +8,12 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.ArcMineWindowChangeMsg; import engine.net.client.msg.ClientNetMsg; @@ -56,7 +56,7 @@ public class MineWindowChangeHandler extends AbstractClientMsgHandler { if (treeOfLife.getBlueprintUUID() == 0) return true; - if (treeOfLife.getBlueprint().getBuildingGroup() != Enum.BuildingGroup.TOL) + if (treeOfLife.getBlueprint().getBuildingGroup() != mbEnums.BuildingGroup.TOL) return true; Guild mineGuild = treeOfLife.getGuild(); diff --git a/src/engine/net/client/handlers/MinionTrainingMsgHandler.java b/src/engine/net/client/handlers/MinionTrainingMsgHandler.java index 30f01604..fa92c5f0 100644 --- a/src/engine/net/client/handlers/MinionTrainingMsgHandler.java +++ b/src/engine/net/client/handlers/MinionTrainingMsgHandler.java @@ -1,13 +1,13 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.InterestManagement.WorldGrid; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.NPCManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -37,7 +37,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { if (playerCharacter == null) return true; - if (minionMsg.getNpcType() == Enum.GameObjectType.NPC.ordinal()) { + if (minionMsg.getNpcType() == mbEnums.GameObjectType.NPC.ordinal()) { NPC npc = NPC.getFromCache(minionMsg.getNpcID()); @@ -70,7 +70,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { DbManager.removeFromCache(toRemove); - if (toRemove.guardCaptain.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (toRemove.guardCaptain.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter petOwner = (PlayerCharacter) toRemove.guardCaptain; if (petOwner != null) { @@ -159,7 +159,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { } } - } else if (minionMsg.getNpcType() == Enum.GameObjectType.Mob.ordinal()) { + } else if (minionMsg.getNpcType() == mbEnums.GameObjectType.Mob.ordinal()) { Mob npc = Mob.getFromCache(minionMsg.getNpcID()); @@ -194,7 +194,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { DbManager.removeFromCache(toRemove); - if (toRemove.agentType.equals(Enum.AIAgentType.SIEGEENGINE)) { + if (toRemove.agentType.equals(mbEnums.AIAgentType.SIEGEENGINE)) { PlayerCharacter trebOwner = (PlayerCharacter) toRemove.guardCaptain; diff --git a/src/engine/net/client/handlers/ObjectActionMsgHandler.java b/src/engine/net/client/handlers/ObjectActionMsgHandler.java index e4ec2742..17033af2 100644 --- a/src/engine/net/client/handlers/ObjectActionMsgHandler.java +++ b/src/engine/net/client/handlers/ObjectActionMsgHandler.java @@ -1,10 +1,10 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.*; import engine.math.Bounds; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -104,7 +104,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { pam.addPlacementInfo(item.template.deed_structure_id); dispatch = Dispatch.borrow(player, pam); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //itemMan.consume(item); //temporary fix for dupe.. TODO Make Item Unusable after This message is sent. break; @@ -117,7 +117,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { if (shrineBuilding == null) { return true; } - if (shrineBuilding.getBlueprint() != null && shrineBuilding.getBlueprint().getBuildingGroup() != engine.Enum.BuildingGroup.SHRINE) { + if (shrineBuilding.getBlueprint() != null && shrineBuilding.getBlueprint().getBuildingGroup() != mbEnums.BuildingGroup.SHRINE) { return true; } @@ -159,7 +159,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { int objectType = AbstractWorldObject.extractTypeID(compID).ordinal(); Mob toCommand; - if (objectType == engine.Enum.GameObjectType.Mob.ordinal()) { + if (objectType == mbEnums.GameObjectType.Mob.ordinal()) { toCommand = Mob.getFromCache((int) compID); } //Only Command Mob Types. else { @@ -250,10 +250,10 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { // test character targeted - if (item.template.item_type.equals(Enum.ItemType.BUCKET)) { + if (item.template.item_type.equals(mbEnums.ItemType.BUCKET)) { // test for valid target type - if (target.getObjectType() == Enum.GameObjectType.PlayerCharacter) + if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter) waterbucketBypass = true; else { // test distance to structure @@ -285,12 +285,12 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { itemMan.consume(item); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); player.cancelOnSpell(); break; default: //shouldn't be here, consume item dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); // itemMan.consume(item); } } else { diff --git a/src/engine/net/client/handlers/OpenFriendsCondemnListMsgHandler.java b/src/engine/net/client/handlers/OpenFriendsCondemnListMsgHandler.java index 6d70d4a2..123d2390 100644 --- a/src/engine/net/client/handlers/OpenFriendsCondemnListMsgHandler.java +++ b/src/engine/net/client/handlers/OpenFriendsCondemnListMsgHandler.java @@ -1,12 +1,12 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; -import engine.Enum.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -37,7 +37,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { Building sourceBuilding; OpenFriendsCondemnListMsg msg; OpenFriendsCondemnListMsg openFriendsCondemnListMsg; - Enum.FriendListType friendListType; + mbEnums.FriendListType friendListType; Dispatch dispatch; if (player == null) @@ -45,7 +45,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { msg = (OpenFriendsCondemnListMsg) baseMsg; openFriendsCondemnListMsg = new OpenFriendsCondemnListMsg(msg); - friendListType = Enum.FriendListType.getListTypeByID(msg.getMessageType()); + friendListType = mbEnums.FriendListType.getListTypeByID(msg.getMessageType()); if (friendListType == null) { Logger.error("Invalid FriendListType for messageType " + msg.getMessageType()); @@ -112,13 +112,13 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { case DEALTHS: // Death List openFriendsCondemnListMsg.updateMsg(8, new ArrayList<>(player.pvpDeaths)); dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case KILLS: // Kill List openFriendsCondemnListMsg.updateMsg(10, new ArrayList<>(player.pvpKills)); dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case VIEWCONDEMN: @@ -131,7 +131,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { openFriendsCondemnListMsg = new OpenFriendsCondemnListMsg(12, sourceBuilding.getCondemned(), sourceBuilding.reverseKOS); openFriendsCondemnListMsg.configure(); dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //msg.updateMsg(12, DbManager.GuildQueries.) break; @@ -156,7 +156,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { sourceBuilding.getCondemned().remove(msg.getRemoveFriendID()); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case TOGGLEACTIVE: @@ -177,7 +177,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { condemn.setActive(msg.isReverseKOS()); openFriendsCondemnListMsg.setReverseKOS(condemn.active); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; case REVERSEKOS: @@ -276,7 +276,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { openFriendsCondemnListMsg = new OpenFriendsCondemnListMsg(12, sourceBuilding.getCondemned(), sourceBuilding.reverseKOS); openFriendsCondemnListMsg.configure(); dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; //ADD FRIEND BUILDING @@ -337,7 +337,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { openFriendsCondemnListMsg.configure(); dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; //REMOVE from friends list. case REMOVEFRIEND: @@ -363,7 +363,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { openFriendsCondemnListMsg = new OpenFriendsCondemnListMsg(26, sourceBuilding.getFriends()); openFriendsCondemnListMsg.configure(); dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; //view Friends @@ -384,7 +384,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler { dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; default: diff --git a/src/engine/net/client/handlers/OrderNPCMsgHandler.java b/src/engine/net/client/handlers/OrderNPCMsgHandler.java index 30c7c3c5..7f798082 100644 --- a/src/engine/net/client/handlers/OrderNPCMsgHandler.java +++ b/src/engine/net/client/handlers/OrderNPCMsgHandler.java @@ -1,15 +1,15 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; -import engine.Enum.GameObjectType; -import engine.Enum.ProfitType; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; import engine.math.FastMath; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ProfitType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -62,9 +62,9 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { item = new Item(contract.getContractID()); item.ownerID = player.getObjectUUID(); - item.ownerType = Enum.OwnerType.PlayerCharacter; + item.ownerType = mbEnums.OwnerType.PlayerCharacter; item.chargesRemaining = (byte) hireling.getRank() - 1; - item.containerType = Enum.ItemContainerType.INVENTORY; + item.containerType = mbEnums.ItemContainerType.INVENTORY; try { item = DbManager.ItemQueries.PERSIST(item); diff --git a/src/engine/net/client/handlers/PetAttackMsgHandler.java b/src/engine/net/client/handlers/PetAttackMsgHandler.java index 04253fee..b980e8fd 100644 --- a/src/engine/net/client/handlers/PetAttackMsgHandler.java +++ b/src/engine/net/client/handlers/PetAttackMsgHandler.java @@ -8,9 +8,9 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.PetAttackMsg; @@ -51,10 +51,10 @@ public class PetAttackMsgHandler extends AbstractClientMsgHandler { return true; if ((playerCharacter.inSafeZone()) - && (msg.getTargetType() == Enum.GameObjectType.PlayerCharacter.ordinal())) + && (msg.getTargetType() == mbEnums.GameObjectType.PlayerCharacter.ordinal())) return true; - if (msg.getTargetType() == Enum.GameObjectType.Building.ordinal()) + if (msg.getTargetType() == mbEnums.GameObjectType.Building.ordinal()) pet.setCombatTarget(PlayerCharacter.getPlayerCharacter(msg.getTargetID())); switch (msg.getTargetType()) { diff --git a/src/engine/net/client/handlers/PetitionReceivedMsgHandler.java b/src/engine/net/client/handlers/PetitionReceivedMsgHandler.java index 45d7ebfc..602ee265 100644 --- a/src/engine/net/client/handlers/PetitionReceivedMsgHandler.java +++ b/src/engine/net/client/handlers/PetitionReceivedMsgHandler.java @@ -1,8 +1,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -53,7 +53,7 @@ public class PetitionReceivedMsgHandler extends AbstractClientMsgHandler { petitionReceivedMsg.unknown04 = 0; Dispatch dispatch = Dispatch.borrow(playerCharacter, petitionReceivedMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/PlaceAssetMsgHandler.java b/src/engine/net/client/handlers/PlaceAssetMsgHandler.java index e4511c40..d6b0ad59 100644 --- a/src/engine/net/client/handlers/PlaceAssetMsgHandler.java +++ b/src/engine/net/client/handlers/PlaceAssetMsgHandler.java @@ -1,7 +1,5 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.*; import engine.InterestManagement.InterestManager; import engine.InterestManagement.RealmMap; import engine.InterestManagement.WorldGrid; @@ -11,6 +9,8 @@ import engine.exception.MsgSendException; import engine.gameManager.*; import engine.math.Bounds; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -786,7 +786,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { //load the new city on the clients - CityZoneMsg czm = new CityZoneMsg(1, treeObject.getLoc().x, treeObject.getLoc().y, treeObject.getLoc().z, cityObject.getCityName(), zoneObject, Enum.CityBoundsType.ZONE.halfExtents, Enum.CityBoundsType.ZONE.halfExtents); + CityZoneMsg czm = new CityZoneMsg(1, treeObject.getLoc().x, treeObject.getLoc().y, treeObject.getLoc().z, cityObject.getCityName(), zoneObject, mbEnums.CityBoundsType.ZONE.halfExtents, mbEnums.CityBoundsType.ZONE.halfExtents); DispatchMessage.dispatchMsgToAll(czm); // Set maintenance date diff --git a/src/engine/net/client/handlers/RandomMsgHandler.java b/src/engine/net/client/handlers/RandomMsgHandler.java index 522860fe..87c4beb8 100644 --- a/src/engine/net/client/handlers/RandomMsgHandler.java +++ b/src/engine/net/client/handlers/RandomMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; +import engine.mbEnums.DispatchChannel; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; diff --git a/src/engine/net/client/handlers/RecommendNationMsgHandler.java b/src/engine/net/client/handlers/RecommendNationMsgHandler.java index 395bde19..3b169cc5 100644 --- a/src/engine/net/client/handlers/RecommendNationMsgHandler.java +++ b/src/engine/net/client/handlers/RecommendNationMsgHandler.java @@ -1,9 +1,9 @@ package engine.net.client.handlers; -import engine.Enum.AllianceType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.SessionManager; +import engine.mbEnums.AllianceType; import engine.net.Dispatch; import engine.net.client.ClientConnection; import engine.net.client.msg.AllianceChangeMsg; diff --git a/src/engine/net/client/handlers/RecvSummonsMsgHandler.java b/src/engine/net/client/handlers/RecvSummonsMsgHandler.java index 60be7e9c..e1f6e303 100644 --- a/src/engine/net/client/handlers/RecvSummonsMsgHandler.java +++ b/src/engine/net/client/handlers/RecvSummonsMsgHandler.java @@ -8,12 +8,12 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.job.JobContainer; import engine.job.JobScheduler; import engine.jobs.FinishSummonsJob; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.ErrorPopupMsg; @@ -59,7 +59,7 @@ public class RecvSummonsMsgHandler extends AbstractClientMsgHandler { return true; } - if (playerCharacter.getBonuses() != null && playerCharacter.getBonuses().getBool(Enum.ModType.BlockedPowerType, Enum.SourceType.SUMMON)) { + if (playerCharacter.getBonuses() != null && playerCharacter.getBonuses().getBool(mbEnums.ModType.BlockedPowerType, mbEnums.SourceType.SUMMON)) { ErrorPopupMsg.sendErrorMsg(playerCharacter, "You have been blocked from receiving summons!"); ErrorPopupMsg.sendErrorMsg(source, "Target is blocked from receiving summons!"); playerCharacter.removeSummoner(source.getObjectUUID()); diff --git a/src/engine/net/client/handlers/RefineMsgHandler.java b/src/engine/net/client/handlers/RefineMsgHandler.java index b53e90fe..c1cdda76 100644 --- a/src/engine/net/client/handlers/RefineMsgHandler.java +++ b/src/engine/net/client/handlers/RefineMsgHandler.java @@ -9,6 +9,7 @@ package engine.net.client.handlers; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -68,7 +69,7 @@ public class RefineMsgHandler extends AbstractClientMsgHandler { //echo refine message back Dispatch dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); // if (type == 0 && token == 1488335491){ // dispatch = Dispatch.borrow(pc, msg); @@ -79,7 +80,7 @@ public class RefineMsgHandler extends AbstractClientMsgHandler { RefinerScreenMsg refinerScreenMsg = new RefinerScreenMsg(skillPower, npc.getSellPercent(playerCharacter)); //TODO set npc cost dispatch = Dispatch.borrow(playerCharacter, refinerScreenMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); playerCharacter.recalculate(); } return true; diff --git a/src/engine/net/client/handlers/RefinerScreenMsgHandler.java b/src/engine/net/client/handlers/RefinerScreenMsgHandler.java index 2e905fe9..74bd90d9 100644 --- a/src/engine/net/client/handlers/RefinerScreenMsgHandler.java +++ b/src/engine/net/client/handlers/RefinerScreenMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -43,7 +43,7 @@ public class RefinerScreenMsgHandler extends AbstractClientMsgHandler { msg.setUnknown02(0); //cost to refine? Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/RemoveFriendHandler.java b/src/engine/net/client/handlers/RemoveFriendHandler.java index 85223ded..4a59e7fb 100644 --- a/src/engine/net/client/handlers/RemoveFriendHandler.java +++ b/src/engine/net/client/handlers/RemoveFriendHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/RemoveFromGroupHandler.java b/src/engine/net/client/handlers/RemoveFromGroupHandler.java index a7e7ede8..784239c6 100644 --- a/src/engine/net/client/handlers/RemoveFromGroupHandler.java +++ b/src/engine/net/client/handlers/RemoveFromGroupHandler.java @@ -9,11 +9,11 @@ package engine.net.client.handlers; -import engine.Enum; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.GroupManager; import engine.gameManager.SessionManager; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -71,7 +71,7 @@ public class RemoveFromGroupHandler extends AbstractClientMsgHandler { RemoveFromGroupMsg reply = new RemoveFromGroupMsg(); reply.setResponse(1); Dispatch dispatch = Dispatch.borrow(source, reply); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -94,7 +94,7 @@ public class RemoveFromGroupHandler extends AbstractClientMsgHandler { gim.setMessageType(3); gim.setPlayer(groupMember); Dispatch dispatch = Dispatch.borrow(target, gim); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } diff --git a/src/engine/net/client/handlers/RepairBuildingMsgHandler.java b/src/engine/net/client/handlers/RepairBuildingMsgHandler.java index 62373432..b1271bb8 100644 --- a/src/engine/net/client/handlers/RepairBuildingMsgHandler.java +++ b/src/engine/net/client/handlers/RepairBuildingMsgHandler.java @@ -1,11 +1,11 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.BuildingGroup; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; import engine.gameManager.ZoneManager; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -70,14 +70,14 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler { UpdateObjectMsg uom = new UpdateObjectMsg(targetBuilding, 3); dispatch = Dispatch.borrow(origin.getPlayerCharacter(), uom); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); RepairBuildingMsg rbm = new RepairBuildingMsg(targetBuilding.getObjectUUID(), maxHP, missingHealth, repairCost, targetBuilding.getStrongboxValue()); dispatch = Dispatch.borrow(origin.getPlayerCharacter(), rbm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @Override diff --git a/src/engine/net/client/handlers/RepairMsgHandler.java b/src/engine/net/client/handlers/RepairMsgHandler.java index 709dc335..ffdcbb77 100644 --- a/src/engine/net/client/handlers/RepairMsgHandler.java +++ b/src/engine/net/client/handlers/RepairMsgHandler.java @@ -8,11 +8,11 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -90,7 +90,7 @@ public class RepairMsgHandler extends AbstractClientMsgHandler { //account for durability modifications - float durMod = toRepair.getBonusPercent(Enum.ModType.Durability, Enum.SourceType.None); + float durMod = toRepair.getBonusPercent(mbEnums.ModType.Durability, mbEnums.SourceType.None); max *= (1 + (durMod * 0.01f)); if (dur >= max || dur < 1) { @@ -107,7 +107,7 @@ public class RepairMsgHandler extends AbstractClientMsgHandler { Building building = (!npc.isStatic()) ? npc.getBuilding() : null; if (building != null) - if (building.getProtectionState().equals(Enum.ProtectionState.NPC)) + if (building.getProtectionState().equals(mbEnums.ProtectionState.NPC)) building = null; diff --git a/src/engine/net/client/handlers/RequestEnterWorldHandler.java b/src/engine/net/client/handlers/RequestEnterWorldHandler.java index 46413afa..0ce43a3a 100644 --- a/src/engine/net/client/handlers/RequestEnterWorldHandler.java +++ b/src/engine/net/client/handlers/RequestEnterWorldHandler.java @@ -1,7 +1,7 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.InterestManagement.InterestManager; import engine.InterestManagement.WorldGrid; import engine.db.archive.CharacterRecord; @@ -136,7 +136,7 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler { if (player.getHash() == null) { - if (DataWarehouse.recordExists(Enum.DataRecordType.CHARACTER, player.getObjectUUID()) == false) { + if (DataWarehouse.recordExists(mbEnums.DataRecordType.CHARACTER, player.getObjectUUID()) == false) { CharacterRecord characterRecord = CharacterRecord.borrow(player); DataWarehouse.pushToWarehouse(characterRecord); } @@ -148,8 +148,8 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler { // to characters actually logged into the game. // - player.pvpKills = PvpRecord.getCharacterPvPHistory(player.getObjectUUID(), Enum.PvpHistoryType.KILLS); - player.pvpDeaths = PvpRecord.getCharacterPvPHistory(player.getObjectUUID(), Enum.PvpHistoryType.DEATHS); + player.pvpKills = PvpRecord.getCharacterPvPHistory(player.getObjectUUID(), mbEnums.PvpHistoryType.KILLS); + player.pvpDeaths = PvpRecord.getCharacterPvPHistory(player.getObjectUUID(), mbEnums.PvpHistoryType.DEATHS); SendOwnPlayerMsg sopm = new SendOwnPlayerMsg(SessionManager.getSession(origin)); dispatch = Dispatch.borrow(player, sopm); diff --git a/src/engine/net/client/handlers/RequestGuildListHandler.java b/src/engine/net/client/handlers/RequestGuildListHandler.java index a559ef5c..4fdee87d 100644 --- a/src/engine/net/client/handlers/RequestGuildListHandler.java +++ b/src/engine/net/client/handlers/RequestGuildListHandler.java @@ -10,7 +10,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.Dispatch; @@ -47,7 +47,7 @@ public class RequestGuildListHandler extends AbstractClientMsgHandler { dispatch = Dispatch.borrow(pc, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/RespawnMsgHandler.java b/src/engine/net/client/handlers/RespawnMsgHandler.java index 6708aab1..1e4f0d57 100644 --- a/src/engine/net/client/handlers/RespawnMsgHandler.java +++ b/src/engine/net/client/handlers/RespawnMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.MovementManager; import engine.job.JobScheduler; diff --git a/src/engine/net/client/handlers/SetCombatModeMsgHandler.java b/src/engine/net/client/handlers/SetCombatModeMsgHandler.java index 193156b9..a9c4855a 100644 --- a/src/engine/net/client/handlers/SetCombatModeMsgHandler.java +++ b/src/engine/net/client/handlers/SetCombatModeMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -49,7 +49,7 @@ public class SetCombatModeMsgHandler extends AbstractClientMsgHandler { UpdateStateMsg rwss = new UpdateStateMsg(); rwss.setPlayer(playerCharacter); - DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); + DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); return true; } diff --git a/src/engine/net/client/handlers/ShowMsgHandler.java b/src/engine/net/client/handlers/ShowMsgHandler.java index 97b221bc..63ae67f2 100644 --- a/src/engine/net/client/handlers/ShowMsgHandler.java +++ b/src/engine/net/client/handlers/ShowMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -46,11 +46,11 @@ public class ShowMsgHandler extends AbstractClientMsgHandler { int targetType = msg.getTargetType(); AbstractCharacter tar = null; - if (targetType == Enum.GameObjectType.PlayerCharacter.ordinal()) + if (targetType == mbEnums.GameObjectType.PlayerCharacter.ordinal()) tar = PlayerCharacter.getFromCache(msg.getTargetID()); - else if (targetType == Enum.GameObjectType.NPC.ordinal()) + else if (targetType == mbEnums.GameObjectType.NPC.ordinal()) tar = NPC.getFromCache(msg.getTargetID()); - else if (targetType == Enum.GameObjectType.Mob.ordinal()) + else if (targetType == mbEnums.GameObjectType.Mob.ordinal()) tar = Mob.getFromCache(msg.getTargetID()); if (tar == null || !tar.isAlive() || !tar.isActive()) diff --git a/src/engine/net/client/handlers/SocialMsgHandler.java b/src/engine/net/client/handlers/SocialMsgHandler.java index 4a0bca1b..4b8adf96 100644 --- a/src/engine/net/client/handlers/SocialMsgHandler.java +++ b/src/engine/net/client/handlers/SocialMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/SwearInGuildHandler.java b/src/engine/net/client/handlers/SwearInGuildHandler.java index 8c5c6414..4ee13c72 100644 --- a/src/engine/net/client/handlers/SwearInGuildHandler.java +++ b/src/engine/net/client/handlers/SwearInGuildHandler.java @@ -9,9 +9,9 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.GuildState; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.GuildState; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; @@ -112,7 +112,7 @@ public class SwearInGuildHandler extends AbstractClientMsgHandler { SendGuildEntryMsg msg = new SendGuildEntryMsg(player); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); City.lastCityUpdate = System.currentTimeMillis(); diff --git a/src/engine/net/client/handlers/SwearInHandler.java b/src/engine/net/client/handlers/SwearInHandler.java index 2796bbaa..e9f26523 100644 --- a/src/engine/net/client/handlers/SwearInHandler.java +++ b/src/engine/net/client/handlers/SwearInHandler.java @@ -9,7 +9,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.SessionManager; @@ -69,7 +69,7 @@ public class SwearInHandler extends AbstractClientMsgHandler { ChatManager.chatGuildInfo(source, target.getFirstName() + " has been sworn in as a full member!"); dispatch = Dispatch.borrow(source, new GuildListMsg(source.getGuild())); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); DispatchMessage.sendToAllInRange(target, new GuildInfoMsg(target, target.getGuild(), 2)); return true; diff --git a/src/engine/net/client/handlers/TargetObjectMsgHandler.java b/src/engine/net/client/handlers/TargetObjectMsgHandler.java index 7024ff8c..c2591992 100644 --- a/src/engine/net/client/handlers/TargetObjectMsgHandler.java +++ b/src/engine/net/client/handlers/TargetObjectMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.client.ClientConnection; @@ -38,7 +38,7 @@ public class TargetObjectMsgHandler extends AbstractClientMsgHandler { if (!player.isActive()) player.setActive(true); - player.setLastTarget(Enum.GameObjectType.values()[msg.getTargetType()], msg.getTargetID()); + player.setLastTarget(mbEnums.GameObjectType.values()[msg.getTargetType()], msg.getTargetID()); return true; } diff --git a/src/engine/net/client/handlers/TaxCityMsgHandler.java b/src/engine/net/client/handlers/TaxCityMsgHandler.java index 0f0265e5..5cdf9241 100644 --- a/src/engine/net/client/handlers/TaxCityMsgHandler.java +++ b/src/engine/net/client/handlers/TaxCityMsgHandler.java @@ -1,6 +1,6 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.InterestManagement.RealmMap; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; @@ -114,9 +114,9 @@ public class TaxCityMsgHandler extends AbstractClientMsgHandler { vrm.setWarehouseBuilding(BuildingManager.getBuildingFromCache(building.getCity().warehouse.building.getObjectUUID())); vrm.configure(); Dispatch dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); dispatch = Dispatch.borrow(player, vrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; diff --git a/src/engine/net/client/handlers/ToggleCombatMsgHandler.java b/src/engine/net/client/handlers/ToggleCombatMsgHandler.java index c00c189e..0c71a8ce 100644 --- a/src/engine/net/client/handlers/ToggleCombatMsgHandler.java +++ b/src/engine/net/client/handlers/ToggleCombatMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -49,7 +49,7 @@ public class ToggleCombatMsgHandler extends AbstractClientMsgHandler { UpdateStateMsg rwss = new UpdateStateMsg(); rwss.setPlayer(playerCharacter); - DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); + DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); return true; } diff --git a/src/engine/net/client/handlers/ToggleLfgRecruitingMsgHandler.java b/src/engine/net/client/handlers/ToggleLfgRecruitingMsgHandler.java index b2a1dc04..d5b2e401 100644 --- a/src/engine/net/client/handlers/ToggleLfgRecruitingMsgHandler.java +++ b/src/engine/net/client/handlers/ToggleLfgRecruitingMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/ToggleSitStandMsgHandler.java b/src/engine/net/client/handlers/ToggleSitStandMsgHandler.java index 2ec21a0a..4d00f3bd 100644 --- a/src/engine/net/client/handlers/ToggleSitStandMsgHandler.java +++ b/src/engine/net/client/handlers/ToggleSitStandMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/net/client/handlers/TrackWindowMsgHandler.java b/src/engine/net/client/handlers/TrackWindowMsgHandler.java index a5e0a288..57bf287b 100644 --- a/src/engine/net/client/handlers/TrackWindowMsgHandler.java +++ b/src/engine/net/client/handlers/TrackWindowMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.InterestManagement.WorldGrid; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; @@ -146,10 +146,10 @@ public class TrackWindowMsgHandler extends AbstractClientMsgHandler { else if (!awo.isAlive()) it.remove(); - else if (awo.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + else if (awo.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerBonuses bonus = ((PlayerCharacter) awo).getBonuses(); - if (bonus != null && bonus.getBool(Enum.ModType.CannotTrack, Enum.SourceType.None)) + if (bonus != null && bonus.getBool(mbEnums.ModType.CannotTrack, mbEnums.SourceType.None)) it.remove(); } } diff --git a/src/engine/net/client/handlers/TradeRequestMsgHandler.java b/src/engine/net/client/handlers/TradeRequestMsgHandler.java index 37b4c22b..16c85abf 100644 --- a/src/engine/net/client/handlers/TradeRequestMsgHandler.java +++ b/src/engine/net/client/handlers/TradeRequestMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.net.Dispatch; @@ -51,7 +51,7 @@ public class TradeRequestMsgHandler extends AbstractClientMsgHandler { return false; dispatch = Dispatch.borrow(target, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/TrainMsgHandler.java b/src/engine/net/client/handlers/TrainMsgHandler.java index d8adf6de..44725d55 100644 --- a/src/engine/net/client/handlers/TrainMsgHandler.java +++ b/src/engine/net/client/handlers/TrainMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; @@ -176,7 +176,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler { Building building = npc.getBuilding(); - if (building != null && building.getProtectionState().equals(Enum.ProtectionState.NPC)) + if (building != null && building.getProtectionState().equals(mbEnums.ProtectionState.NPC)) building = null; if (building != null && building.getStrongboxValue() + (profitCost - cost) > building.getMaxGold()) { @@ -196,7 +196,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler { playerCharacter.charItemManager.buyFromNPC(building, (int) profitCost, (int) (profitCost - cost)); dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //update trainer window @@ -204,7 +204,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler { TrainerInfoMsg tim = new TrainerInfoMsg(msg.npcType, msg.npcID, npc.getSellPercent(playerCharacter)); tim.setTrainPercent(npc.getSellPercent(playerCharacter)); dispatch = Dispatch.borrow(playerCharacter, tim); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } @@ -247,7 +247,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler { Building building = npc.getBuilding(); - if (building != null && building.getProtectionState().equals(Enum.ProtectionState.NPC)) + if (building != null && building.getProtectionState().equals(mbEnums.ProtectionState.NPC)) building = null; if (building != null && building.getStrongboxValue() + (profitCost - cost) > building.getMaxGold()) { @@ -263,7 +263,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler { //train succeeded dispatch = Dispatch.borrow(playerCharacter, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //update trainer window @@ -271,7 +271,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler { TrainerInfoMsg tim = new TrainerInfoMsg(msg.npcType, msg.npcID, npc.getSellPercent(playerCharacter)); tim.setTrainPercent(npc.getSellPercent(playerCharacter)); dispatch = Dispatch.borrow(playerCharacter, tim); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } } diff --git a/src/engine/net/client/handlers/TrainerInfoMsgHandler.java b/src/engine/net/client/handlers/TrainerInfoMsgHandler.java index 0d205354..90df1819 100644 --- a/src/engine/net/client/handlers/TrainerInfoMsgHandler.java +++ b/src/engine/net/client/handlers/TrainerInfoMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -51,7 +51,7 @@ public class TrainerInfoMsgHandler extends AbstractClientMsgHandler { } Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/net/client/handlers/TransferAssetMsgHandler.java b/src/engine/net/client/handlers/TransferAssetMsgHandler.java index a9ccdc4e..81a843f1 100644 --- a/src/engine/net/client/handlers/TransferAssetMsgHandler.java +++ b/src/engine/net/client/handlers/TransferAssetMsgHandler.java @@ -1,6 +1,6 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.ChatManager; @@ -46,14 +46,14 @@ public class TransferAssetMsgHandler extends AbstractClientMsgHandler { if (blueprint == null) return true; - if (building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.MINE) { + if (building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.MINE) { ErrorPopupMsg.sendErrorMsg(player, "You cannot transfer a mine!"); return true; } // Players cannot transfer shrines - if ((building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.SHRINE)) { + if ((building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.SHRINE)) { ErrorPopupMsg.sendErrorMsg(player, "Cannot for to transfer shrine!"); return true; } @@ -63,22 +63,22 @@ public class TransferAssetMsgHandler extends AbstractClientMsgHandler { return true; } - if ((building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.BARRACK)) { + if ((building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.BARRACK)) { ErrorPopupMsg.sendErrorMsg(player, "Cannot for to transfer fortress asset!"); return true; } - if ((building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.BULWARK)) { + if ((building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.BULWARK)) { ErrorPopupMsg.sendErrorMsg(player, "Cannot for to transfer siege asset!"); return true; } - if ((building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.SIEGETENT)) { + if ((building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.SIEGETENT)) { ErrorPopupMsg.sendErrorMsg(player, "Cannot for to transfer siege asset!"); return true; } - if ((building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.BANESTONE)) { + if ((building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.BANESTONE)) { ErrorPopupMsg.sendErrorMsg(player, "Cannot for to transfer banestone!"); return true; } diff --git a/src/engine/net/client/handlers/TransferGoldToFromBuildingMsgHandler.java b/src/engine/net/client/handlers/TransferGoldToFromBuildingMsgHandler.java index cbb53a05..ae1bd894 100644 --- a/src/engine/net/client/handlers/TransferGoldToFromBuildingMsgHandler.java +++ b/src/engine/net/client/handlers/TransferGoldToFromBuildingMsgHandler.java @@ -1,7 +1,7 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.SessionManager; @@ -94,7 +94,7 @@ public class TransferGoldToFromBuildingMsgHandler extends AbstractClientMsgHandl UpdateGoldMsg ugm = new UpdateGoldMsg(player); ugm.configure(); dispatch = Dispatch.borrow(player, ugm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); // Refresh the player's inventory if it's currently open @@ -103,7 +103,7 @@ public class TransferGoldToFromBuildingMsgHandler extends AbstractClientMsgHandl msg.setAmount(building.getStrongboxValue()); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } catch (Exception e) { PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "A Serious error has occurred. Please post details for to ensure transaction integrity"); diff --git a/src/engine/net/client/handlers/TransferItemFromBankMsgHandler.java b/src/engine/net/client/handlers/TransferItemFromBankMsgHandler.java index 5189600a..5f653ea4 100644 --- a/src/engine/net/client/handlers/TransferItemFromBankMsgHandler.java +++ b/src/engine/net/client/handlers/TransferItemFromBankMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.NPCManager; import engine.net.Dispatch; @@ -65,11 +65,11 @@ public class TransferItemFromBankMsgHandler extends AbstractClientMsgHandler { return true; ; - if (item.containerType == Enum.ItemContainerType.BANK && itemManager.isBankOpen() == false) + if (item.containerType == mbEnums.ItemContainerType.BANK && itemManager.isBankOpen() == false) return true; ; - if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) { + if (item.template.item_type.equals(mbEnums.ItemType.GOLD)) { if (!itemManager.moveGoldToInventory(item, msg.getNumItems())) return true; diff --git a/src/engine/net/client/handlers/TransferItemFromEquipToInventoryHandler.java b/src/engine/net/client/handlers/TransferItemFromEquipToInventoryHandler.java index dbc852c0..ecc7f0f5 100644 --- a/src/engine/net/client/handlers/TransferItemFromEquipToInventoryHandler.java +++ b/src/engine/net/client/handlers/TransferItemFromEquipToInventoryHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -43,7 +43,7 @@ public class TransferItemFromEquipToInventoryHandler extends AbstractClientMsgHa if (itemManager == null) return true; - Enum.EquipSlotType slot = msg.slot; + mbEnums.EquipSlotType slot = msg.slot; Item item = itemManager.getItemFromEquipped(slot); @@ -58,7 +58,7 @@ public class TransferItemFromEquipToInventoryHandler extends AbstractClientMsgHa if (!item.validForEquip(origin, player, itemManager)) return true; - if (item.containerType == Enum.ItemContainerType.EQUIPPED) + if (item.containerType == mbEnums.ItemContainerType.EQUIPPED) itemManager.moveItemToInventory(item); int ItemType = item.getObjectType().ordinal(); diff --git a/src/engine/net/client/handlers/TransferItemFromInventoryToEquipHandler.java b/src/engine/net/client/handlers/TransferItemFromInventoryToEquipHandler.java index bbe84a15..4b9882af 100644 --- a/src/engine/net/client/handlers/TransferItemFromInventoryToEquipHandler.java +++ b/src/engine/net/client/handlers/TransferItemFromInventoryToEquipHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; import engine.net.Dispatch; @@ -44,7 +44,7 @@ public class TransferItemFromInventoryToEquipHandler extends AbstractClientMsgHa } int itemUUID = transferMsg.getUUID(); - Enum.EquipSlotType equipSlot = transferMsg.slot; + mbEnums.EquipSlotType equipSlot = transferMsg.slot; Item item = itemManager.getItemByUUID(itemUUID); @@ -62,7 +62,7 @@ public class TransferItemFromInventoryToEquipHandler extends AbstractClientMsgHa if (!item.validForInventory(origin, playerCharacter, itemManager)) return true; - if (item.containerType == Enum.ItemContainerType.INVENTORY) { + if (item.containerType == mbEnums.ItemContainerType.INVENTORY) { if (!itemManager.equipItem(item, equipSlot)) { forceTransferFromEquipToInventory(transferMsg, origin, "Failed to transfer item."); return true; diff --git a/src/engine/net/client/handlers/TransferItemToBankMsgHandler.java b/src/engine/net/client/handlers/TransferItemToBankMsgHandler.java index 46b3ccef..3a67d8d8 100644 --- a/src/engine/net/client/handlers/TransferItemToBankMsgHandler.java +++ b/src/engine/net/client/handlers/TransferItemToBankMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.NPCManager; import engine.net.Dispatch; @@ -65,8 +65,8 @@ public class TransferItemToBankMsgHandler extends AbstractClientMsgHandler { if (!item.validForInventory(origin, player, itemManager)) return true; - if (item.containerType == Enum.ItemContainerType.INVENTORY && itemManager.isBankOpen()) - if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) { + if (item.containerType == mbEnums.ItemContainerType.INVENTORY && itemManager.isBankOpen()) + if (item.template.item_type.equals(mbEnums.ItemType.GOLD)) { if (!itemManager.moveGoldToBank(item, msg.getNumItems())) return true; UpdateGoldMsg goldMes = new UpdateGoldMsg(player); diff --git a/src/engine/net/client/handlers/UpdateFriendStatusHandler.java b/src/engine/net/client/handlers/UpdateFriendStatusHandler.java index 90ae49f4..166be1db 100644 --- a/src/engine/net/client/handlers/UpdateFriendStatusHandler.java +++ b/src/engine/net/client/handlers/UpdateFriendStatusHandler.java @@ -9,8 +9,8 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; -import engine.Enum.FriendStatus; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.FriendStatus; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.Dispatch; diff --git a/src/engine/net/client/handlers/UpdateStateMsgHandler.java b/src/engine/net/client/handlers/UpdateStateMsgHandler.java index 5e78c27b..b6d29d8f 100644 --- a/src/engine/net/client/handlers/UpdateStateMsgHandler.java +++ b/src/engine/net/client/handlers/UpdateStateMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.DispatchMessage; diff --git a/src/engine/net/client/handlers/UpgradeAssetMsgHandler.java b/src/engine/net/client/handlers/UpgradeAssetMsgHandler.java index 3638c2ec..fac09f74 100644 --- a/src/engine/net/client/handlers/UpgradeAssetMsgHandler.java +++ b/src/engine/net/client/handlers/UpgradeAssetMsgHandler.java @@ -1,7 +1,7 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.GameObjectType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; @@ -142,7 +142,7 @@ public class UpgradeAssetMsgHandler extends AbstractClientMsgHandler { outMsg.setUnknown54(1); dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } catch (Exception e) { PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "A Serious error has occurred. Please post details for to ensure transaction integrity"); diff --git a/src/engine/net/client/handlers/UseCharterMsgHandler.java b/src/engine/net/client/handlers/UseCharterMsgHandler.java index f7588a23..567c45cb 100644 --- a/src/engine/net/client/handlers/UseCharterMsgHandler.java +++ b/src/engine/net/client/handlers/UseCharterMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.net.Dispatch; import engine.net.DispatchMessage; diff --git a/src/engine/net/client/handlers/VendorBuyMsgHandler.java b/src/engine/net/client/handlers/VendorBuyMsgHandler.java index 3f3389dd..df6eeeac 100644 --- a/src/engine/net/client/handlers/VendorBuyMsgHandler.java +++ b/src/engine/net/client/handlers/VendorBuyMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum; +import engine.mbEnums; import engine.exception.MsgSendException; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; @@ -31,8 +31,8 @@ public class VendorBuyMsgHandler extends AbstractClientMsgHandler { Item item = new Item(templateID); item.ownerID = pc.getObjectUUID(); - item.ownerType = Enum.OwnerType.PlayerCharacter; - item.containerType = Enum.ItemContainerType.INVENTORY; + item.ownerType = mbEnums.OwnerType.PlayerCharacter; + item.containerType = mbEnums.ItemContainerType.INVENTORY; try { item = DbManager.ItemQueries.PERSIST(item); @@ -109,7 +109,7 @@ public class VendorBuyMsgHandler extends AbstractClientMsgHandler { Building building = (!npc.isStatic()) ? npc.getBuilding() : null; - if (building != null && building.getProtectionState().equals(Enum.ProtectionState.NPC)) + if (building != null && building.getProtectionState().equals(mbEnums.ProtectionState.NPC)) building = null; int buildingDeposit = cost - me.magicValue; @@ -154,7 +154,7 @@ public class VendorBuyMsgHandler extends AbstractClientMsgHandler { int cost = vendorItem.template.item_value; - if (vendorItem.flags.contains(Enum.ItemFlags.Identified) || vendorItem.isCustomValue()) + if (vendorItem.flags.contains(mbEnums.ItemFlags.Identified) || vendorItem.isCustomValue()) cost = vendorItem.magicValue; float bargain = sourcePlayer.getBargain(); @@ -177,7 +177,7 @@ public class VendorBuyMsgHandler extends AbstractClientMsgHandler { Building building = (!npc.isStatic()) ? npc.getBuilding() : null; if (building != null) - if (building.getProtectionState().equals(Enum.ProtectionState.NPC)) + if (building.getProtectionState().equals(mbEnums.ProtectionState.NPC)) building = null; int buildingDeposit = cost; diff --git a/src/engine/net/client/handlers/VendorBuyWindowMsgHandler.java b/src/engine/net/client/handlers/VendorBuyWindowMsgHandler.java index 02f98625..890b3d64 100644 --- a/src/engine/net/client/handlers/VendorBuyWindowMsgHandler.java +++ b/src/engine/net/client/handlers/VendorBuyWindowMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.Dispatch; diff --git a/src/engine/net/client/handlers/VendorDialogMsgHandler.java b/src/engine/net/client/handlers/VendorDialogMsgHandler.java index 3cda342f..1933abd1 100644 --- a/src/engine/net/client/handlers/VendorDialogMsgHandler.java +++ b/src/engine/net/client/handlers/VendorDialogMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; @@ -288,7 +288,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler { // Vector3f(0f, 0f, 0f), -1661758934, 40, false); // join guild - GuildManager.joinGuild(pc, guild, Enum.GuildHistoryType.JOIN); + GuildManager.joinGuild(pc, guild, mbEnums.GuildHistoryType.JOIN); pc.resetGuildStatuses(); diff --git a/src/engine/net/client/handlers/VendorSellMsgHandler.java b/src/engine/net/client/handlers/VendorSellMsgHandler.java index 2b1d8145..37d777bf 100644 --- a/src/engine/net/client/handlers/VendorSellMsgHandler.java +++ b/src/engine/net/client/handlers/VendorSellMsgHandler.java @@ -8,8 +8,8 @@ package engine.net.client.handlers; -import engine.Enum; -import engine.Enum.DispatchChannel; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.Dispatch; @@ -81,7 +81,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler { // Early exit sanity check - if (vendorSellMsg.getItemType() == Enum.GameObjectType.Item.ordinal() == false) + if (vendorSellMsg.getItemType() == mbEnums.GameObjectType.Item.ordinal() == false) return true; sell = Item.getFromCache(vendorSellMsg.getItemID()); @@ -133,7 +133,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler { Building building = (!npc.isStatic()) ? npc.getBuilding() : null; - if (building != null && building.getProtectionState().equals(Enum.ProtectionState.NPC)) + if (building != null && building.getProtectionState().equals(mbEnums.ProtectionState.NPC)) building = null; if (npc.getParentZone().playerCityUUID == 0) diff --git a/src/engine/net/client/handlers/VendorSellWindowMsgHandler.java b/src/engine/net/client/handlers/VendorSellWindowMsgHandler.java index 87cf382e..47e9b81f 100644 --- a/src/engine/net/client/handlers/VendorSellWindowMsgHandler.java +++ b/src/engine/net/client/handlers/VendorSellWindowMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.SessionManager; import engine.net.Dispatch; diff --git a/src/engine/net/client/handlers/ViewResourcesMsgHandler.java b/src/engine/net/client/handlers/ViewResourcesMsgHandler.java index 1d758a4a..731e47e2 100644 --- a/src/engine/net/client/handlers/ViewResourcesMsgHandler.java +++ b/src/engine/net/client/handlers/ViewResourcesMsgHandler.java @@ -8,7 +8,7 @@ package engine.net.client.handlers; -import engine.Enum.DispatchChannel; +import engine.mbEnums.DispatchChannel; import engine.exception.MsgSendException; import engine.gameManager.BuildingManager; import engine.net.Dispatch; diff --git a/src/engine/net/client/msg/AddFriendMessage.java b/src/engine/net/client/msg/AddFriendMessage.java index f84010b5..0ed159fb 100644 --- a/src/engine/net/client/msg/AddFriendMessage.java +++ b/src/engine/net/client/msg/AddFriendMessage.java @@ -6,7 +6,7 @@ HashSet playerFriendSet = PlayerFriendsMap.get(playerUID); package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/AllianceChangeMsg.java b/src/engine/net/client/msg/AllianceChangeMsg.java index cab833c4..97ff500b 100644 --- a/src/engine/net/client/msg/AllianceChangeMsg.java +++ b/src/engine/net/client/msg/AllianceChangeMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.exception.SerializationException; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/AllyEnemyListMsg.java b/src/engine/net/client/msg/AllyEnemyListMsg.java index 7e335049..95f5b756 100644 --- a/src/engine/net/client/msg/AllyEnemyListMsg.java +++ b/src/engine/net/client/msg/AllyEnemyListMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.exception.SerializationException; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/ApplyRuneMsg.java b/src/engine/net/client/msg/ApplyRuneMsg.java index 6c6b893f..22b88fab 100644 --- a/src/engine/net/client/msg/ApplyRuneMsg.java +++ b/src/engine/net/client/msg/ApplyRuneMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.net.*; import engine.net.client.ClientConnection; import engine.net.client.Protocol; @@ -308,13 +308,13 @@ public class ApplyRuneMsg extends ClientNetMsg { if (cost > 0) { ModifyStatMsg msm = new ModifyStatMsg((0 - cost), 0, 3); dispatch = Dispatch.borrow(playerCharacter, msm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } //send apply rune message to client ApplyRuneMsg arm = new ApplyRuneMsg(playerCharacter.getObjectType().ordinal(), playerCharacter.getObjectUUID(), runeID, cr.getObjectType().ordinal(), cr.getObjectUUID(), false); dispatch = Dispatch.borrow(playerCharacter, arm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //alert them of success diff --git a/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java b/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java index d88b462b..f9ab6df8 100644 --- a/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java +++ b/src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java @@ -9,10 +9,10 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; -import engine.Enum.TransactionType; import engine.exception.SerializationException; import engine.gameManager.BuildingManager; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.TransactionType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/AssetSupportMsg.java b/src/engine/net/client/msg/AssetSupportMsg.java index 540c1464..7c92a009 100644 --- a/src/engine/net/client/msg/AssetSupportMsg.java +++ b/src/engine/net/client/msg/AssetSupportMsg.java @@ -10,8 +10,8 @@ package engine.net.client.msg; -import engine.Enum; import engine.exception.SerializationException; +import engine.mbEnums; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -35,7 +35,7 @@ public class AssetSupportMsg extends ClientNetMsg { private int profitTax; private int weeklyTax; private byte enforceKOS; - private Enum.SupportMsgType supportMsgType; + private mbEnums.SupportMsgType supportMsgType; /** @@ -55,10 +55,10 @@ public class AssetSupportMsg extends ClientNetMsg { protected void _deserialize(ByteBufferReader reader) { this.messageType = reader.getInt(); - this.supportMsgType = Enum.SupportMsgType.typeLookup.get(this.messageType); + this.supportMsgType = mbEnums.SupportMsgType.typeLookup.get(this.messageType); if (this.supportMsgType == null) { - this.supportMsgType = Enum.SupportMsgType.NONE; + this.supportMsgType = mbEnums.SupportMsgType.NONE; Logger.error("No enumeration for support type" + this.messageType); } @@ -155,10 +155,10 @@ public class AssetSupportMsg extends ClientNetMsg { protected void _serialize(ByteBufferWriter writer) throws SerializationException { writer.putInt(this.messageType); - this.supportMsgType = Enum.SupportMsgType.typeLookup.get(this.messageType); + this.supportMsgType = mbEnums.SupportMsgType.typeLookup.get(this.messageType); if (this.supportMsgType == null) { - this.supportMsgType = Enum.SupportMsgType.NONE; + this.supportMsgType = mbEnums.SupportMsgType.NONE; Logger.error("No enumeration for support type" + this.messageType); } diff --git a/src/engine/net/client/msg/ChangeGuildLeaderMsg.java b/src/engine/net/client/msg/ChangeGuildLeaderMsg.java index 38423144..6443ad86 100644 --- a/src/engine/net/client/msg/ChangeGuildLeaderMsg.java +++ b/src/engine/net/client/msg/ChangeGuildLeaderMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.exception.SerializationException; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/CityAssetMsg.java b/src/engine/net/client/msg/CityAssetMsg.java index 6d3dc207..5000ba92 100644 --- a/src/engine/net/client/msg/CityAssetMsg.java +++ b/src/engine/net/client/msg/CityAssetMsg.java @@ -9,11 +9,11 @@ package engine.net.client.msg; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.ProtectionState; import engine.exception.SerializationException; import engine.gameManager.BuildingManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ProtectionState; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -119,13 +119,13 @@ public class CityAssetMsg extends ClientNetMsg { if (building.getBlueprint().isWallPiece()) continue; - if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL)) + if (building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.TOL)) continue; - if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.BANESTONE)) + if (building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.BANESTONE)) continue; - if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.SHRINE)) + if (building.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.SHRINE)) continue; if (!city.isLocationOnCityGrid(building.getLoc())) diff --git a/src/engine/net/client/msg/CityDataMsg.java b/src/engine/net/client/msg/CityDataMsg.java index f5f679e7..673a2dfc 100644 --- a/src/engine/net/client/msg/CityDataMsg.java +++ b/src/engine/net/client/msg/CityDataMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -78,10 +78,10 @@ public class CityDataMsg extends ClientNetMsg { ArrayList cityList = new ArrayList<>(); - ConcurrentHashMap map = DbManager.getMap(Enum.GameObjectType.City); + ConcurrentHashMap map = DbManager.getMap(mbEnums.GameObjectType.City); for (AbstractGameObject ago : map.values()) - if (ago.getObjectType().equals(Enum.GameObjectType.City)) + if (ago.getObjectType().equals(mbEnums.GameObjectType.City)) cityList.add((City) ago); temp.putInt(cityList.size()); @@ -137,10 +137,10 @@ public class CityDataMsg extends ClientNetMsg { if (this.updateCities) { writer.put((byte) 0); ArrayList cityList = new ArrayList<>(); - ConcurrentHashMap map = DbManager.getMap(Enum.GameObjectType.City); + ConcurrentHashMap map = DbManager.getMap(mbEnums.GameObjectType.City); if (map != null) { for (AbstractGameObject ago : map.values()) - if (ago.getObjectType().equals(Enum.GameObjectType.City)) + if (ago.getObjectType().equals(mbEnums.GameObjectType.City)) cityList.add((City) ago); writer.putInt(cityList.size()); diff --git a/src/engine/net/client/msg/CityZoneMsg.java b/src/engine/net/client/msg/CityZoneMsg.java index 80736b50..b5e19696 100644 --- a/src/engine/net/client/msg/CityZoneMsg.java +++ b/src/engine/net/client/msg/CityZoneMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/DoorTryOpenMsg.java b/src/engine/net/client/msg/DoorTryOpenMsg.java index 17c6116a..d9766b7f 100644 --- a/src/engine/net/client/msg/DoorTryOpenMsg.java +++ b/src/engine/net/client/msg/DoorTryOpenMsg.java @@ -18,7 +18,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/ErrorPopupMsg.java b/src/engine/net/client/msg/ErrorPopupMsg.java index e56a2536..d01204f3 100644 --- a/src/engine/net/client/msg/ErrorPopupMsg.java +++ b/src/engine/net/client/msg/ErrorPopupMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum; +import engine.mbEnums; import engine.net.*; import engine.net.client.Protocol; import engine.objects.PlayerCharacter; @@ -275,7 +275,7 @@ public class ErrorPopupMsg extends ClientNetMsg { popupMessage = new ErrorPopupMsg(300, errorMessage); errorDispatch = Dispatch.borrow(player, popupMessage); - DispatchMessage.dispatchMsgDispatch(errorDispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(errorDispatch, mbEnums.DispatchChannel.SECONDARY); } @@ -290,7 +290,7 @@ public class ErrorPopupMsg extends ClientNetMsg { errorPopup = new ErrorPopupMsg(popupID); errorDispatch = Dispatch.borrow(player, errorPopup); - DispatchMessage.dispatchMsgDispatch(errorDispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(errorDispatch, mbEnums.DispatchChannel.SECONDARY); } /** diff --git a/src/engine/net/client/msg/FurnitureMsg.java b/src/engine/net/client/msg/FurnitureMsg.java index b68e42b0..202db069 100644 --- a/src/engine/net/client/msg/FurnitureMsg.java +++ b/src/engine/net/client/msg/FurnitureMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.exception.SerializationException; import engine.math.Vector3fImmutable; import engine.net.AbstractConnection; diff --git a/src/engine/net/client/msg/GoldToVaultMsg.java b/src/engine/net/client/msg/GoldToVaultMsg.java index 09231b11..b927ba63 100644 --- a/src/engine/net/client/msg/GoldToVaultMsg.java +++ b/src/engine/net/client/msg/GoldToVaultMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/HirelingServiceMsg.java b/src/engine/net/client/msg/HirelingServiceMsg.java index 38202702..8a428dab 100644 --- a/src/engine/net/client/msg/HirelingServiceMsg.java +++ b/src/engine/net/client/msg/HirelingServiceMsg.java @@ -10,7 +10,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/ItemProductionMsg.java b/src/engine/net/client/msg/ItemProductionMsg.java index dd792e37..08d3abda 100644 --- a/src/engine/net/client/msg/ItemProductionMsg.java +++ b/src/engine/net/client/msg/ItemProductionMsg.java @@ -9,9 +9,9 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.gameManager.BuildingManager; import engine.gameManager.PowersManager; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.AbstractNetMsg; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/LeaderboardMessage.java b/src/engine/net/client/msg/LeaderboardMessage.java index 3e2bc9ce..b5179f64 100644 --- a/src/engine/net/client/msg/LeaderboardMessage.java +++ b/src/engine/net/client/msg/LeaderboardMessage.java @@ -9,9 +9,9 @@ package engine.net.client.msg; -import engine.Enum.ShrineType; import engine.exception.SerializationException; import engine.gameManager.BuildingManager; +import engine.mbEnums.ShrineType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/ManageCityAssetsMsg.java b/src/engine/net/client/msg/ManageCityAssetsMsg.java index 1c32d841..5f640f05 100644 --- a/src/engine/net/client/msg/ManageCityAssetsMsg.java +++ b/src/engine/net/client/msg/ManageCityAssetsMsg.java @@ -9,10 +9,10 @@ package engine.net.client.msg; -import engine.Enum.*; import engine.gameManager.BuildingManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.*; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/ManageNPCMsg.java b/src/engine/net/client/msg/ManageNPCMsg.java index 733d3f0b..a13620b9 100644 --- a/src/engine/net/client/msg/ManageNPCMsg.java +++ b/src/engine/net/client/msg/ManageNPCMsg.java @@ -9,11 +9,11 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; -import engine.Enum.MinionType; -import engine.Enum.ProtectionState; import engine.gameManager.NPCManager; import engine.gameManager.PowersManager; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.MinionType; +import engine.mbEnums.ProtectionState; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; import engine.net.client.Protocol; diff --git a/src/engine/net/client/msg/MoveToPointMsg.java b/src/engine/net/client/msg/MoveToPointMsg.java index 9c2ede1f..e9f83de7 100644 --- a/src/engine/net/client/msg/MoveToPointMsg.java +++ b/src/engine/net/client/msg/MoveToPointMsg.java @@ -9,9 +9,9 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/OpenFriendsCondemnListMsg.java b/src/engine/net/client/msg/OpenFriendsCondemnListMsg.java index c014a95f..4082d469 100644 --- a/src/engine/net/client/msg/OpenFriendsCondemnListMsg.java +++ b/src/engine/net/client/msg/OpenFriendsCondemnListMsg.java @@ -9,8 +9,9 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -515,7 +516,7 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg { switch (condemned.friendType) { case 2: - PlayerCharacter playerCharacter = (PlayerCharacter) DbManager.getObject(engine.Enum.GameObjectType.PlayerCharacter, condemned.playerUID); + PlayerCharacter playerCharacter = (PlayerCharacter) DbManager.getObject(mbEnums.GameObjectType.PlayerCharacter, condemned.playerUID); guild = playerCharacter.getGuild(); diff --git a/src/engine/net/client/msg/OrderNPCMsg.java b/src/engine/net/client/msg/OrderNPCMsg.java index ad933cc7..dac9ea5b 100644 --- a/src/engine/net/client/msg/OrderNPCMsg.java +++ b/src/engine/net/client/msg/OrderNPCMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/PlaceAssetMsg.java b/src/engine/net/client/msg/PlaceAssetMsg.java index c59bd23f..9991590f 100644 --- a/src/engine/net/client/msg/PlaceAssetMsg.java +++ b/src/engine/net/client/msg/PlaceAssetMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.*; import engine.net.client.ClientConnection; import engine.net.client.Protocol; @@ -349,7 +349,7 @@ public class PlaceAssetMsg extends ClientNetMsg { outMsg.msg = stringData; Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } public static void sendPlaceAssetConfirmWall(ClientConnection origin, Zone zone) { @@ -364,7 +364,7 @@ public class PlaceAssetMsg extends ClientNetMsg { Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } /** diff --git a/src/engine/net/client/msg/RecommendNationMsg.java b/src/engine/net/client/msg/RecommendNationMsg.java index f24ea4c1..d5b86184 100644 --- a/src/engine/net/client/msg/RecommendNationMsg.java +++ b/src/engine/net/client/msg/RecommendNationMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.exception.SerializationException; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/RemoveFriendMessage.java b/src/engine/net/client/msg/RemoveFriendMessage.java index 47c30e02..be34be10 100644 --- a/src/engine/net/client/msg/RemoveFriendMessage.java +++ b/src/engine/net/client/msg/RemoveFriendMessage.java @@ -6,7 +6,7 @@ HashSet playerFriendSet = PlayerFriendsMap.get(playerUID); package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/RepairBuildingMsg.java b/src/engine/net/client/msg/RepairBuildingMsg.java index 0cb99a56..fdf86960 100644 --- a/src/engine/net/client/msg/RepairBuildingMsg.java +++ b/src/engine/net/client/msg/RepairBuildingMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; import engine.exception.SerializationException; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/RequestBallListMessage.java b/src/engine/net/client/msg/RequestBallListMessage.java index bbdd4365..3e4a689e 100644 --- a/src/engine/net/client/msg/RequestBallListMessage.java +++ b/src/engine/net/client/msg/RequestBallListMessage.java @@ -6,7 +6,7 @@ HashSet playerFriendSet = PlayerFriendsMap.get(playerUID); package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/TaxCityMsg.java b/src/engine/net/client/msg/TaxCityMsg.java index a00a4041..e2e80e22 100644 --- a/src/engine/net/client/msg/TaxCityMsg.java +++ b/src/engine/net/client/msg/TaxCityMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.exception.SerializationException; import engine.gameManager.BuildingManager; import engine.net.AbstractConnection; diff --git a/src/engine/net/client/msg/TaxResourcesMsg.java b/src/engine/net/client/msg/TaxResourcesMsg.java index dd8ea199..a14639f8 100644 --- a/src/engine/net/client/msg/TaxResourcesMsg.java +++ b/src/engine/net/client/msg/TaxResourcesMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/TeleportToPointMsg.java b/src/engine/net/client/msg/TeleportToPointMsg.java index 07b4a1fe..61fcd6a6 100644 --- a/src/engine/net/client/msg/TeleportToPointMsg.java +++ b/src/engine/net/client/msg/TeleportToPointMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/TrackWindowMsg.java b/src/engine/net/client/msg/TrackWindowMsg.java index 7b647ee9..61256bfb 100644 --- a/src/engine/net/client/msg/TrackWindowMsg.java +++ b/src/engine/net/client/msg/TrackWindowMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.AbstractNetMsg; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java b/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java index a9e5b580..48ba28c2 100644 --- a/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java +++ b/src/engine/net/client/msg/TransferItemFromEquipToInventoryMsg.java @@ -10,7 +10,7 @@ package engine.net.client.msg; -import engine.Enum; +import engine.mbEnums; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -22,12 +22,12 @@ public class TransferItemFromEquipToInventoryMsg extends ClientNetMsg { private int playerType; private int playerUUID; - public Enum.EquipSlotType slot; + public mbEnums.EquipSlotType slot; /** * This is the general purpose constructor. */ - public TransferItemFromEquipToInventoryMsg(AbstractGameObject ago, Enum.EquipSlotType slot) { + public TransferItemFromEquipToInventoryMsg(AbstractGameObject ago, mbEnums.EquipSlotType slot) { super(Protocol.UNEQUIP); this.playerType = ago.getObjectType().ordinal(); this.playerUUID = ago.getObjectUUID(); @@ -51,7 +51,7 @@ public class TransferItemFromEquipToInventoryMsg extends ClientNetMsg { protected void _deserialize(ByteBufferReader reader) { this.playerType = reader.getInt(); this.playerUUID = reader.getInt(); - this.slot = Enum.EquipSlotType.values()[reader.getInt()]; + this.slot = mbEnums.EquipSlotType.values()[reader.getInt()]; } /** diff --git a/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java b/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java index 230e0095..9aeb8ff3 100644 --- a/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java +++ b/src/engine/net/client/msg/TransferItemFromInventoryToEquipMsg.java @@ -10,7 +10,7 @@ package engine.net.client.msg; -import engine.Enum; +import engine.mbEnums; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -27,7 +27,7 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { private int type; private int objectUUID; - public Enum.EquipSlotType slot; + public mbEnums.EquipSlotType slot; private int pad2; private float unknown1, unknown2; @@ -38,7 +38,7 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { super(Protocol.EQUIP); } - public TransferItemFromInventoryToEquipMsg(AbstractCharacter source, Enum.EquipSlotType slot, int templateID) { + public TransferItemFromInventoryToEquipMsg(AbstractCharacter source, mbEnums.EquipSlotType slot, int templateID) { super(Protocol.EQUIP); this.sourceType = source.getObjectType().ordinal(); this.sourceID = source.getObjectUUID(); @@ -67,7 +67,7 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { templateID = reader.getInt(); type = reader.getInt(); objectUUID = reader.getInt(); - slot = Enum.EquipSlotType.values()[reader.getInt()]; + slot = mbEnums.EquipSlotType.values()[reader.getInt()]; pad2 = reader.getInt(); unknown1 = reader.getFloat(); unknown2 = reader.getFloat(); diff --git a/src/engine/net/client/msg/UpdateClientAlliancesMsg.java b/src/engine/net/client/msg/UpdateClientAlliancesMsg.java index dfd0d19f..a872c431 100644 --- a/src/engine/net/client/msg/UpdateClientAlliancesMsg.java +++ b/src/engine/net/client/msg/UpdateClientAlliancesMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/UpdateFriendStatusMessage.java b/src/engine/net/client/msg/UpdateFriendStatusMessage.java index 2da0f7c4..ecb34248 100644 --- a/src/engine/net/client/msg/UpdateFriendStatusMessage.java +++ b/src/engine/net/client/msg/UpdateFriendStatusMessage.java @@ -6,7 +6,7 @@ HashSet playerFriendSet = PlayerFriendsMap.get(playerUID); package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.gameManager.SessionManager; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/UpdateGoldMsg.java b/src/engine/net/client/msg/UpdateGoldMsg.java index 90389f2c..604014fa 100644 --- a/src/engine/net/client/msg/UpdateGoldMsg.java +++ b/src/engine/net/client/msg/UpdateGoldMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/UpdateInventoryMsg.java b/src/engine/net/client/msg/UpdateInventoryMsg.java index da54bc71..2e458f9e 100644 --- a/src/engine/net/client/msg/UpdateInventoryMsg.java +++ b/src/engine/net/client/msg/UpdateInventoryMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.ItemType; +import engine.mbEnums.ItemType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/UpdateStateMsg.java b/src/engine/net/client/msg/UpdateStateMsg.java index 7ac64a2c..775fcafc 100644 --- a/src/engine/net/client/msg/UpdateStateMsg.java +++ b/src/engine/net/client/msg/UpdateStateMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/UseCharterMsg.java b/src/engine/net/client/msg/UseCharterMsg.java index d2c1e193..8b80ca23 100644 --- a/src/engine/net/client/msg/UseCharterMsg.java +++ b/src/engine/net/client/msg/UseCharterMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.ItemType; +import engine.mbEnums.ItemType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/VendorBuyWindowMsg.java b/src/engine/net/client/msg/VendorBuyWindowMsg.java index 133588b7..acbb835d 100644 --- a/src/engine/net/client/msg/VendorBuyWindowMsg.java +++ b/src/engine/net/client/msg/VendorBuyWindowMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum.ItemType; +import engine.mbEnums.ItemType; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.AbstractNetMsg; diff --git a/src/engine/net/client/msg/ViewResourcesMsg.java b/src/engine/net/client/msg/ViewResourcesMsg.java index 6ad85be3..cbaaaa94 100644 --- a/src/engine/net/client/msg/ViewResourcesMsg.java +++ b/src/engine/net/client/msg/ViewResourcesMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; @@ -73,7 +73,7 @@ public class ViewResourcesMsg extends ClientNetMsg { if (this.warehouseBuilding.getParentZone() == null) return false; - this.city = (City) DbManager.getObject(Enum.GameObjectType.City, this.warehouseBuilding.getParentZone().playerCityUUID); + this.city = (City) DbManager.getObject(mbEnums.GameObjectType.City, this.warehouseBuilding.getParentZone().playerCityUUID); if (this.city == null) return false; @@ -91,7 +91,7 @@ public class ViewResourcesMsg extends ClientNetMsg { writer.putInt(warehouseObject.resources.size()); - for (Enum.ResourceType resourceType : (warehouseObject.resources.keySet())) { + for (mbEnums.ResourceType resourceType : (warehouseObject.resources.keySet())) { writer.putInt(resourceType.hash); writer.putInt((warehouseObject.resources.get(resourceType))); @@ -105,7 +105,7 @@ public class ViewResourcesMsg extends ClientNetMsg { writer.putInt(warehouseObject.resources.size()); - for (Enum.ResourceType resourceType : warehouseObject.resources.keySet()) { + for (mbEnums.ResourceType resourceType : warehouseObject.resources.keySet()) { writer.putInt(resourceType.hash); writer.putInt(0); //available? diff --git a/src/engine/net/client/msg/VisualUpdateMessage.java b/src/engine/net/client/msg/VisualUpdateMessage.java index 5a5e8035..94e79894 100644 --- a/src/engine/net/client/msg/VisualUpdateMessage.java +++ b/src/engine/net/client/msg/VisualUpdateMessage.java @@ -10,7 +10,7 @@ package engine.net.client.msg; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.exception.SerializationException; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/WhoResponseMsg.java b/src/engine/net/client/msg/WhoResponseMsg.java index 43609d50..02cb59db 100644 --- a/src/engine/net/client/msg/WhoResponseMsg.java +++ b/src/engine/net/client/msg/WhoResponseMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.SessionManager; import engine.net.*; import engine.net.client.ClientConnection; @@ -175,7 +175,7 @@ public class WhoResponseMsg extends ClientNetMsg { } Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } diff --git a/src/engine/net/client/msg/WorldDataMsg.java b/src/engine/net/client/msg/WorldDataMsg.java index 6826d6f6..025a30fe 100644 --- a/src/engine/net/client/msg/WorldDataMsg.java +++ b/src/engine/net/client/msg/WorldDataMsg.java @@ -10,7 +10,7 @@ package engine.net.client.msg; -import engine.Enum; +import engine.mbEnums; import engine.exception.SerializationException; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; @@ -48,7 +48,7 @@ public class WorldDataMsg extends ClientNetMsg { private static int getTotalMapSize() { - return DbManager.getList(Enum.GameObjectType.Zone).size(); + return DbManager.getList(mbEnums.GameObjectType.Zone).size(); } /** diff --git a/src/engine/net/client/msg/chat/ChatCityMsg.java b/src/engine/net/client/msg/chat/ChatCityMsg.java index b39bef3c..20956c9a 100644 --- a/src/engine/net/client/msg/chat/ChatCityMsg.java +++ b/src/engine/net/client/msg/chat/ChatCityMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg.chat; -import engine.Enum.GameObjectType; import engine.gameManager.SessionManager; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/chat/ChatSayMsg.java b/src/engine/net/client/msg/chat/ChatSayMsg.java index a50e93d0..03826d7c 100644 --- a/src/engine/net/client/msg/chat/ChatSayMsg.java +++ b/src/engine/net/client/msg/chat/ChatSayMsg.java @@ -9,8 +9,8 @@ package engine.net.client.msg.chat; -import engine.Enum.GameObjectType; import engine.gameManager.SessionManager; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/chat/GuildEnterWorldMsg.java b/src/engine/net/client/msg/chat/GuildEnterWorldMsg.java index 586cfad3..6b6b5918 100644 --- a/src/engine/net/client/msg/chat/GuildEnterWorldMsg.java +++ b/src/engine/net/client/msg/chat/GuildEnterWorldMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg.chat; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/commands/ClientAdminCommandMsg.java b/src/engine/net/client/msg/commands/ClientAdminCommandMsg.java index 3eb3025c..a24be476 100644 --- a/src/engine/net/client/msg/commands/ClientAdminCommandMsg.java +++ b/src/engine/net/client/msg/commands/ClientAdminCommandMsg.java @@ -9,9 +9,9 @@ package engine.net.client.msg.commands; -import engine.Enum.GameObjectType; import engine.gameManager.DbManager; import engine.math.Vector3f; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/group/GroupUpdateMsg.java b/src/engine/net/client/msg/group/GroupUpdateMsg.java index 6b9393dc..f09f063c 100644 --- a/src/engine/net/client/msg/group/GroupUpdateMsg.java +++ b/src/engine/net/client/msg/group/GroupUpdateMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg.group; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.gameManager.GroupManager; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; diff --git a/src/engine/net/client/msg/guild/AcceptInviteToGuildMsg.java b/src/engine/net/client/msg/guild/AcceptInviteToGuildMsg.java index 4e16f6ef..d8ef71d0 100644 --- a/src/engine/net/client/msg/guild/AcceptInviteToGuildMsg.java +++ b/src/engine/net/client/msg/guild/AcceptInviteToGuildMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg.guild; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/guild/AcceptSubInviteMsg.java b/src/engine/net/client/msg/guild/AcceptSubInviteMsg.java index 4ff7c8f8..42f99620 100644 --- a/src/engine/net/client/msg/guild/AcceptSubInviteMsg.java +++ b/src/engine/net/client/msg/guild/AcceptSubInviteMsg.java @@ -18,7 +18,7 @@ package engine.net.client.msg.guild; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/guild/ChangeRankMsg.java b/src/engine/net/client/msg/guild/ChangeRankMsg.java index e6be2350..f3a9c46d 100644 --- a/src/engine/net/client/msg/guild/ChangeRankMsg.java +++ b/src/engine/net/client/msg/guild/ChangeRankMsg.java @@ -18,7 +18,7 @@ package engine.net.client.msg.guild; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/guild/GuildCreationFinalizeMsg.java b/src/engine/net/client/msg/guild/GuildCreationFinalizeMsg.java index 53f71710..acfe60a9 100644 --- a/src/engine/net/client/msg/guild/GuildCreationFinalizeMsg.java +++ b/src/engine/net/client/msg/guild/GuildCreationFinalizeMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg.guild; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/guild/GuildInfoMsg.java b/src/engine/net/client/msg/guild/GuildInfoMsg.java index aea3c464..938c2732 100644 --- a/src/engine/net/client/msg/guild/GuildInfoMsg.java +++ b/src/engine/net/client/msg/guild/GuildInfoMsg.java @@ -10,7 +10,7 @@ package engine.net.client.msg.guild; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/guild/GuildListMsg.java b/src/engine/net/client/msg/guild/GuildListMsg.java index 80cc6cef..1a225cb5 100644 --- a/src/engine/net/client/msg/guild/GuildListMsg.java +++ b/src/engine/net/client/msg/guild/GuildListMsg.java @@ -9,9 +9,9 @@ package engine.net.client.msg.guild; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; @@ -125,7 +125,7 @@ class GuildListMessageType1 extends GuildListMessageType { @Override void _serialize(ByteBufferWriter writer) { - Enum.GuildCharterType gt = Enum.GuildCharterType.getGuildTypeFromInt(g.getCharter()); + mbEnums.GuildCharterType gt = mbEnums.GuildCharterType.getGuildTypeFromInt(g.getCharter()); writer.putInt(1); writer.putInt(gt.ordinal()); //Charter Type @@ -142,7 +142,7 @@ class GuildListMessageType1 extends GuildListMessageType { for (PlayerCharacter player : guildRoster) { byte isActive = SessionManager.getPlayerCharacterByID(player.getObjectUUID()) != null ? (byte) 1 : (byte) 0; - writer.putInt(Enum.GameObjectType.PlayerCharacter.ordinal()); + writer.putInt(mbEnums.GameObjectType.PlayerCharacter.ordinal()); writer.putInt(player.getObjectUUID()); writer.putString(player.getCombinedName()); writer.put(isActive); //Active? @@ -158,7 +158,7 @@ class GuildListMessageType1 extends GuildListMessageType { for (PlayerCharacter banished : g.getBanishList()) { byte isActive = SessionManager.getPlayerCharacterByID(banished.getObjectUUID()) != null ? (byte) 1 : (byte) 0; - writer.putInt(Enum.GameObjectType.PlayerCharacter.ordinal()); + writer.putInt(mbEnums.GameObjectType.PlayerCharacter.ordinal()); writer.putInt(banished.getObjectUUID()); writer.putString(banished.getCombinedName()); writer.put(isActive); //Active? diff --git a/src/engine/net/client/msg/guild/InviteToSubMsg.java b/src/engine/net/client/msg/guild/InviteToSubMsg.java index 4fa7b078..d9c325e7 100644 --- a/src/engine/net/client/msg/guild/InviteToSubMsg.java +++ b/src/engine/net/client/msg/guild/InviteToSubMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg.guild; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/login/DeleteCharacterMsg.java b/src/engine/net/client/msg/login/DeleteCharacterMsg.java index ddcf300b..0763c989 100644 --- a/src/engine/net/client/msg/login/DeleteCharacterMsg.java +++ b/src/engine/net/client/msg/login/DeleteCharacterMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg.login; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/net/client/msg/login/GameServerIPRequestMsg.java b/src/engine/net/client/msg/login/GameServerIPRequestMsg.java index cbacdb32..19798412 100644 --- a/src/engine/net/client/msg/login/GameServerIPRequestMsg.java +++ b/src/engine/net/client/msg/login/GameServerIPRequestMsg.java @@ -9,7 +9,7 @@ package engine.net.client.msg.login; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.net.AbstractConnection; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index bf999b14..02b8a1ae 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -9,8 +9,6 @@ package engine.objects; -import engine.Enum; -import engine.Enum.*; import engine.InterestManagement.InterestManager; import engine.InterestManagement.Terrain; import engine.InterestManagement.WorldGrid; @@ -25,6 +23,8 @@ import engine.jobs.TrackJob; import engine.math.AtomicFloat; import engine.math.Bounds; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -130,10 +130,10 @@ public abstract class AbstractCharacter extends AbstractWorldObject { public ArrayList runes; - public Enum.MonsterType absRace; + public mbEnums.MonsterType absRace; public ClassType absBaseClass = null; public ClassType absPromotionClass = null; - public Enum.SexType absGender = null; + public mbEnums.SexType absGender = null; public EnumSet absDisciplines; // Modifiers @@ -355,7 +355,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { this.bindLoc = new Vector3fImmutable(rs.getFloat("spawnX"), rs.getFloat("spawnY"), rs.getFloat("spawnZ")); - if (ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER)) + if (ConfigManager.serverType.equals(mbEnums.ServerType.WORLDSERVER)) this.setLoc(this.bindLoc); this.endLoc = Vector3fImmutable.ZERO; diff --git a/src/engine/objects/AbstractGameObject.java b/src/engine/objects/AbstractGameObject.java index ad321d57..a67c9e64 100644 --- a/src/engine/objects/AbstractGameObject.java +++ b/src/engine/objects/AbstractGameObject.java @@ -9,12 +9,12 @@ package engine.objects; -import engine.Enum.GameObjectType; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.job.JobContainer; import engine.job.JobScheduler; import engine.jobs.DatabaseUpdateJob; +import engine.mbEnums.GameObjectType; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; diff --git a/src/engine/objects/AbstractIntelligenceAgent.java b/src/engine/objects/AbstractIntelligenceAgent.java index 783029cc..c9431ee1 100644 --- a/src/engine/objects/AbstractIntelligenceAgent.java +++ b/src/engine/objects/AbstractIntelligenceAgent.java @@ -10,13 +10,13 @@ package engine.objects; import ch.claude_martin.enumbitset.EnumBitSet; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.InterestManagement.WorldGrid; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.mobileAI.Threads.MobAIThread; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -31,13 +31,13 @@ import java.util.ArrayList; public abstract class AbstractIntelligenceAgent extends AbstractCharacter { protected Vector3fImmutable lastBindLoc; public boolean assist = false; - public Enum.AIAgentType agentType = Enum.AIAgentType.MOBILE; + public mbEnums.AIAgentType agentType = mbEnums.AIAgentType.MOBILE; public AbstractCharacter guardCaptain; - public EnumBitSet notEnemy = EnumBitSet.noneOf(Enum.MonsterType.class); - public EnumBitSet enemy = EnumBitSet.noneOf(Enum.MonsterType.class); + public EnumBitSet notEnemy = EnumBitSet.noneOf(mbEnums.MonsterType.class); + public EnumBitSet enemy = EnumBitSet.noneOf(mbEnums.MonsterType.class); ; - public Enum.MobBehaviourType behaviourType; + public mbEnums.MobBehaviourType behaviourType; public ArrayList patrolPoints; public int lastPatrolPointIndex = 0; public long stopPatrolTime = 0; @@ -96,9 +96,9 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { public void setPet(PlayerCharacter owner, boolean summoned) { if (summoned) - this.agentType = Enum.AIAgentType.PET; //summoned + this.agentType = mbEnums.AIAgentType.PET; //summoned else - this.agentType = Enum.AIAgentType.CHARMED; + this.agentType = mbEnums.AIAgentType.CHARMED; if (this.getObjectType().equals(GameObjectType.Mob)) { @@ -109,8 +109,8 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { public boolean isPet() { - return (this.agentType.equals(Enum.AIAgentType.PET) || - this.agentType.equals(Enum.AIAgentType.CHARMED)); + return (this.agentType.equals(mbEnums.AIAgentType.PET) || + this.agentType.equals(mbEnums.AIAgentType.CHARMED)); } public void toggleAssist() { @@ -150,7 +150,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { if (this.isPet()) { - if ((this.agentType.equals(Enum.AIAgentType.PET))) { //delete summoned pet + if ((this.agentType.equals(mbEnums.AIAgentType.PET))) { //delete summoned pet WorldGrid.RemoveWorldObject(this); @@ -159,7 +159,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { ((Mob) this).getParentZone().zoneMobSet.remove(this); } else { //revert charmed pet - this.agentType = Enum.AIAgentType.MOBILE; + this.agentType = mbEnums.AIAgentType.MOBILE; this.setCombatTarget(null); } @@ -177,7 +177,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { PetMsg petMsg = new PetMsg(5, null); Dispatch dispatch = Dispatch.borrow(owner, petMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); if (pet != null && pet.getObjectUUID() == this.getObjectUUID()) owner.setPet(null); diff --git a/src/engine/objects/AbstractWorldObject.java b/src/engine/objects/AbstractWorldObject.java index 8f783507..b93bfe2a 100644 --- a/src/engine/objects/AbstractWorldObject.java +++ b/src/engine/objects/AbstractWorldObject.java @@ -9,10 +9,6 @@ package engine.objects; -import engine.Enum.DispatchChannel; -import engine.Enum.EffectSourceType; -import engine.Enum.GameObjectType; -import engine.Enum.GridObjectType; import engine.InterestManagement.Terrain; import engine.InterestManagement.WorldGrid; import engine.job.AbstractScheduleJob; @@ -23,6 +19,10 @@ import engine.math.AtomicFloat; import engine.math.Bounds; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.EffectSourceType; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.GridObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; diff --git a/src/engine/objects/Account.java b/src/engine/objects/Account.java index 5e8f4a85..417bd3c4 100644 --- a/src/engine/objects/Account.java +++ b/src/engine/objects/Account.java @@ -9,13 +9,13 @@ package engine.objects; -import engine.Enum; -import engine.Enum.DispatchChannel; -import engine.Enum.ItemContainerType; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; import engine.gameManager.NPCManager; import engine.gameManager.SessionManager; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.ItemContainerType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -42,7 +42,7 @@ public class Account extends AbstractGameObject { public HashMap characterMap = new HashMap<>(); public Item vaultGold = null; public long lastPasswordCheck = 0; - public Enum.AccountStatus status; + public mbEnums.AccountStatus status; private String passwd; private int lastCharIDUsed; private String salt; @@ -58,7 +58,7 @@ public class Account extends AbstractGameObject { this.lastCharIDUsed = resultSet.getInt("acct_lastCharUID"); this.salt = resultSet.getString("acct_salt"); this.discordAccount = resultSet.getString("discordAccount"); - this.status = Enum.AccountStatus.valueOf(resultSet.getString("status")); + this.status = mbEnums.AccountStatus.valueOf(resultSet.getString("status")); } public ArrayList getVault() { @@ -161,7 +161,7 @@ public class Account extends AbstractGameObject { try { - if (ConfigManager.serverType.equals(Enum.ServerType.LOGINSERVER)) { + if (ConfigManager.serverType.equals(mbEnums.ServerType.LOGINSERVER)) { ArrayList playerList = DbManager.PlayerCharacterQueries.GET_CHARACTERS_FOR_ACCOUNT(this.getObjectUUID()); for (PlayerCharacter player : playerList) { @@ -172,11 +172,11 @@ public class Account extends AbstractGameObject { playerList.clear(); } - if (ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER)) { + if (ConfigManager.serverType.equals(mbEnums.ServerType.WORLDSERVER)) { this.vault = DbManager.ItemQueries.GET_ITEMS_FOR_ACCOUNT(this.getObjectUUID()); for (Item item : this.vault) { - if (item.template.item_type.equals(Enum.ItemType.GOLD)) { + if (item.template.item_type.equals(mbEnums.ItemType.GOLD)) { this.vaultGold = item; } } @@ -219,7 +219,7 @@ public class Account extends AbstractGameObject { if (!item.validForInventory(origin, player, player.charItemManager)) return; - if (item.containerType == Enum.ItemContainerType.INVENTORY && player.charItemManager.isVaultOpen()) { + if (item.containerType == mbEnums.ItemContainerType.INVENTORY && player.charItemManager.isVaultOpen()) { if (!player.charItemManager.hasRoomVault(item.template.item_wt)) { ItemToVaultMsgHandler.forceTransferFromVaultToInventory(msg, origin, "There is no room in your vault."); return; @@ -265,7 +265,7 @@ public class Account extends AbstractGameObject { if (!item.validForVault(origin, player, itemManager)) return; - if (item.containerType == Enum.ItemContainerType.VAULT && itemManager.isVaultOpen()) { + if (item.containerType == mbEnums.ItemContainerType.VAULT && itemManager.isVaultOpen()) { if (!itemManager.hasRoomInventory(item.template.item_wt)) { ItemFromVaultMsgHandler.forceTransferFromInventoryToVault(msg, origin, "There is no room in your inventory."); return; diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index 61c9cfb7..0cebc002 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -9,10 +9,6 @@ package engine.objects; -import engine.Enum; -import engine.Enum.ProtectionState; -import engine.Enum.SiegePhase; -import engine.Enum.SiegeResult; import engine.InterestManagement.WorldGrid; import engine.db.archive.BaneRecord; import engine.db.archive.DataWarehouse; @@ -24,6 +20,10 @@ import engine.job.JobScheduler; import engine.jobs.ActivateBaneJob; import engine.jobs.BaneDefaultTimeJob; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.ProtectionState; +import engine.mbEnums.SiegePhase; +import engine.mbEnums.SiegeResult; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; import engine.net.client.msg.PlaceAssetMsg; @@ -256,13 +256,13 @@ public final class Bane { ChatSystemMsg chatMsg = new ChatSystemMsg(null, "[Bane Channel] " + targetCity.getCityName() + " has been baned by " + baningGuild.getName() + ". Standoff phase has begun!"); chatMsg.setMessageType(4); - chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + chatMsg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID()); DispatchMessage.dispatchMsgToAll(chatMsg); // Push this event to the DataWarehouse - BaneRecord baneRecord = BaneRecord.borrow(bane, Enum.RecordEventType.PENDING); + BaneRecord baneRecord = BaneRecord.borrow(bane, mbEnums.RecordEventType.PENDING); DataWarehouse.pushToWarehouse(baneRecord); return true; @@ -403,7 +403,7 @@ public final class Bane { } public PlayerCharacter getOwner() { - return (PlayerCharacter) DbManager.getObject(Enum.GameObjectType.PlayerCharacter, ownerUUID); + return (PlayerCharacter) DbManager.getObject(mbEnums.GameObjectType.PlayerCharacter, ownerUUID); } public boolean remove() { @@ -538,7 +538,7 @@ public final class Bane { // Push event to warehouse - BaneRecord.updateResolution(this, Enum.RecordEventType.DEFEND); + BaneRecord.updateResolution(this, mbEnums.RecordEventType.DEFEND); baneRemoved = remove(); @@ -552,7 +552,7 @@ public final class Bane { ChatSystemMsg msg = new ChatSystemMsg(null, "[Bane Channel]" + this.getCity().getGuild().getName() + " has rallied against " + this.getOwner().getGuild().getName() + ". The siege on " + this.getCity().getCityName() + " has been broken!"); msg.setMessageType(4); - msg.setChannel(engine.Enum.ChatChannelType.SYSTEM.getChannelID()); + msg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID()); DispatchMessage.dispatchMsgToAll(msg); @@ -563,7 +563,7 @@ public final class Bane { // Push event to warehouse - BaneRecord.updateResolution(this, Enum.RecordEventType.CAPTURE); + BaneRecord.updateResolution(this, mbEnums.RecordEventType.CAPTURE); baneRemoved = this.remove(); @@ -571,7 +571,7 @@ public final class Bane { ChatSystemMsg msg = new ChatSystemMsg(null, "[Bane Channel]" + this.getOwner().getGuild().getName() + " have defeated " + this.getCity().getGuild().getName() + " and captured " + this.getCity().getCityName() + '!'); msg.setMessageType(4); - msg.setChannel(engine.Enum.ChatChannelType.SYSTEM.getChannelID()); + msg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID()); DispatchMessage.dispatchMsgToAll(msg); } @@ -580,7 +580,7 @@ public final class Bane { // Push event to warehouse - BaneRecord.updateResolution(this, Enum.RecordEventType.DESTROY); + BaneRecord.updateResolution(this, mbEnums.RecordEventType.DESTROY); baneRemoved = this.remove(); @@ -588,7 +588,7 @@ public final class Bane { ChatSystemMsg msg = new ChatSystemMsg(null, "[Bane Channel]" + this.getOwner().getGuild().getName() + " have defeated " + this.getCity().getGuild().getName() + " and razed " + this.getCity().getCityName() + '!'); msg.setMessageType(4); - msg.setChannel(engine.Enum.ChatChannelType.SYSTEM.getChannelID()); + msg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID()); DispatchMessage.dispatchMsgToAll(msg); } diff --git a/src/engine/objects/Blueprint.java b/src/engine/objects/Blueprint.java index 15777c27..3f5a76e1 100644 --- a/src/engine/objects/Blueprint.java +++ b/src/engine/objects/Blueprint.java @@ -9,9 +9,9 @@ package engine.objects; // www.magicbane.com -import engine.Enum.BuildingGroup; import engine.gameManager.DbManager; import engine.math.Vector2f; +import engine.mbEnums.BuildingGroup; import org.pmw.tinylog.Logger; import java.sql.ResultSet; diff --git a/src/engine/objects/Building.java b/src/engine/objects/Building.java index 985483fd..bb31eaf1 100644 --- a/src/engine/objects/Building.java +++ b/src/engine/objects/Building.java @@ -9,8 +9,6 @@ package engine.objects; -import engine.Enum; -import engine.Enum.*; import engine.InterestManagement.RealmMap; import engine.InterestManagement.Terrain; import engine.InterestManagement.WorldGrid; @@ -27,6 +25,8 @@ import engine.jobs.SiegeSpireWithdrawlJob; import engine.math.Bounds; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.DispatchMessage; import engine.net.client.msg.ApplyBuildingEffectMsg; @@ -1502,7 +1502,7 @@ public class Building extends AbstractWorldObject { if (!DbManager.BuildingQueries.acceptTaxes(this)) return false; - this.setProtectionState(Enum.ProtectionState.CONTRACT); + this.setProtectionState(mbEnums.ProtectionState.CONTRACT); this.taxDateTime = LocalDateTime.now().plusDays(7); return true; diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 99e4930b..4003ff5d 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -9,11 +9,11 @@ package engine.objects; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.ItemType; import engine.gameManager.*; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ItemType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -36,7 +36,7 @@ public class CharacterItemManager { private final ConcurrentHashMap itemIDtoType = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); // Mapping of all items equipped in this Manager // Key = Item Slot - public ConcurrentHashMap equipped = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); + public ConcurrentHashMap equipped = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); private final HashSet inventory = new HashSet<>(); private final HashSet bank = new HashSet<>(); private final HashSet vault = new HashSet<>(); @@ -73,7 +73,7 @@ public class CharacterItemManager { public void loadGoldItems() { - if (ConfigManager.serverType.equals(Enum.ServerType.LOGINSERVER)) { + if (ConfigManager.serverType.equals(mbEnums.ServerType.LOGINSERVER)) { //other server, just make generic this.goldInventory = new MobLoot(this.absCharacter, 0); this.goldBank = new MobLoot(this.absCharacter, 0); @@ -84,14 +84,14 @@ public class CharacterItemManager { //create inventory gold if needed if (this.goldInventory == null) if (this.absCharacter != null && (this.absCharacter.getObjectType().equals(GameObjectType.PlayerCharacter) || this.absCharacter.getObjectType().equals(GameObjectType.NPC))) - this.goldInventory = Item.newGoldItem(this.absCharacter, Enum.ItemContainerType.INVENTORY); + this.goldInventory = Item.newGoldItem(this.absCharacter, mbEnums.ItemContainerType.INVENTORY); else this.goldInventory = new MobLoot(this.absCharacter, 0); //create bank gold if needed if (this.goldBank == null) if (this.absCharacter != null && this.absCharacter.getObjectType().equals(GameObjectType.PlayerCharacter)) - this.goldBank = Item.newGoldItem(this.absCharacter, Enum.ItemContainerType.BANK); + this.goldBank = Item.newGoldItem(this.absCharacter, mbEnums.ItemContainerType.BANK); else this.goldBank = new MobLoot(this.absCharacter, 0); @@ -115,7 +115,7 @@ public class CharacterItemManager { this.account = ((PlayerCharacter) this.absCharacter).getAccount(); // Get Items for player and vault - if (ConfigManager.serverType.equals(Enum.ServerType.LOGINSERVER)) //login, only need equipped items + if (ConfigManager.serverType.equals(mbEnums.ServerType.LOGINSERVER)) //login, only need equipped items al = DbManager.ItemQueries.GET_EQUIPPED_ITEMS(this.absCharacter.getObjectUUID()); else al = DbManager.ItemQueries.GET_ITEMS_FOR_PC(this.absCharacter.getObjectUUID()); @@ -300,7 +300,7 @@ public class CharacterItemManager { return false; } } else { - if (!Warehouse.withdraw(warehouse, (PlayerCharacter) this.absCharacter, Enum.ResourceType.GOLD, amount * -1, true, true)) { + if (!Warehouse.withdraw(warehouse, (PlayerCharacter) this.absCharacter, mbEnums.ResourceType.GOLD, amount * -1, true, true)) { ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.absCharacter, 203); return false; @@ -365,7 +365,7 @@ public class CharacterItemManager { ugm.configure(); Dispatch dispatch = Dispatch.borrow(player, ugm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return success; } @@ -393,7 +393,7 @@ public class CharacterItemManager { return false; dispatch = Dispatch.borrow(target, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } @@ -403,7 +403,7 @@ public class CharacterItemManager { Dispatch dispatch; dispatch = Dispatch.borrow(requester, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } @@ -431,10 +431,10 @@ public class CharacterItemManager { if (playerA.lastBuildingAccessed != 0) { ManageCityAssetsMsg mca = new ManageCityAssetsMsg(); mca.actionType = 4; - mca.setTargetType(Enum.GameObjectType.Building.ordinal()); + mca.setTargetType(mbEnums.GameObjectType.Building.ordinal()); mca.setTargetID(playerA.lastBuildingAccessed); Dispatch dispatch = Dispatch.borrow(playerA, mca); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); playerA.lastBuildingAccessed = 0; } @@ -459,10 +459,10 @@ public class CharacterItemManager { man2.getTradeCommitted()); dispatch = Dispatch.borrow((PlayerCharacter) this.getOwner(), modify); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); dispatch = Dispatch.borrow((PlayerCharacter) man2.getOwner(), modify); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; @@ -486,7 +486,7 @@ public class CharacterItemManager { CloseTradeWindowMsg closeMsg = new CloseTradeWindowMsg(source, tradeID); dispatch = Dispatch.borrow(source, closeMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); if (!sourceTrade) { sourceItemMan.endTrade(); @@ -601,7 +601,7 @@ public class CharacterItemManager { return false; } - if (this.doesCharOwnThisItem(i.getObjectUUID()) == false && this.absCharacter.getObjectType() != GameObjectType.Mob && (i.containerType != Enum.ItemContainerType.FORGE)) + if (this.doesCharOwnThisItem(i.getObjectUUID()) == false && this.absCharacter.getObjectType() != GameObjectType.Mob && (i.containerType != mbEnums.ItemContainerType.FORGE)) return false; // remove it from other lists: @@ -632,7 +632,7 @@ public class CharacterItemManager { synchronized (this) { //Skip if NOT in vault. - if (item.containerType != Enum.ItemContainerType.VAULT) + if (item.containerType != mbEnums.ItemContainerType.VAULT) if (this.doesCharOwnThisItem(item.getObjectUUID()) == false) return false; @@ -907,7 +907,7 @@ public class CharacterItemManager { return false; } - public boolean equipItem(Item i, Enum.EquipSlotType slot) { + public boolean equipItem(Item i, mbEnums.EquipSlotType slot) { synchronized (this) { @@ -1369,7 +1369,7 @@ public class CharacterItemManager { return equipped.containsValue(i); } - public synchronized Item getItemFromEquipped(Enum.EquipSlotType slot) { + public synchronized Item getItemFromEquipped(mbEnums.EquipSlotType slot) { return equipped.get(slot); } @@ -1470,9 +1470,9 @@ public class CharacterItemManager { return false; - for (Enum.EquipSlotType slot : this.equipped.keySet()) { + for (mbEnums.EquipSlotType slot : this.equipped.keySet()) { - if (slot == Enum.EquipSlotType.HAIR || slot == Enum.EquipSlotType.BEARD) + if (slot == mbEnums.EquipSlotType.HAIR || slot == mbEnums.EquipSlotType.BEARD) continue; Item item = this.equipped.get(slot); @@ -1498,13 +1498,13 @@ public class CharacterItemManager { * * @return the equipped */ - public ConcurrentHashMap getEquipped() { + public ConcurrentHashMap getEquipped() { synchronized (this.equipped) { return new ConcurrentHashMap<>(this.equipped); } } - public Item getEquipped(Enum.EquipSlotType slot) { + public Item getEquipped(mbEnums.EquipSlotType slot) { synchronized (this.equipped) { return this.equipped.get(slot); } @@ -1600,7 +1600,7 @@ public class CharacterItemManager { //MobLoot item.zeroItem(); - item.containerType = Enum.ItemContainerType.INVENTORY; + item.containerType = mbEnums.ItemContainerType.INVENTORY; if (item.template.item_type.equals(ItemType.GOLD)) //only add gold item once @@ -1613,7 +1613,7 @@ public class CharacterItemManager { item.setNumOfItems(0); MobLoot ml = new MobLoot(this.absCharacter, amt); ml.zeroItem(); - ml.containerType = Enum.ItemContainerType.INVENTORY; + ml.containerType = mbEnums.ItemContainerType.INVENTORY; if (!corpse.hasGold()) { corpse.setHasGold(true); newInventory.add(ml); @@ -1829,11 +1829,11 @@ public class CharacterItemManager { UpdateInventoryMsg updateInventoryMsg = new UpdateInventoryMsg(inventory, this.getBank(), this.getGoldInventory(), add); Dispatch dispatch = Dispatch.borrow(pc, updateInventoryMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } - public void forceToInventory(Enum.EquipSlotType slot, Item item, PlayerCharacter player, boolean initialized) { + public void forceToInventory(mbEnums.EquipSlotType slot, Item item, PlayerCharacter player, boolean initialized) { if (item == null || player == null) return; @@ -1854,7 +1854,7 @@ public class CharacterItemManager { if (initialized) { TransferItemFromEquipToInventoryMsg back = new TransferItemFromEquipToInventoryMsg(player, slot); - DispatchMessage.dispatchMsgToInterestArea(player, back, engine.Enum.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + DispatchMessage.dispatchMsgToInterestArea(player, back, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); } } @@ -2005,7 +2005,7 @@ public class CharacterItemManager { return; //verify the item is equipped by this player - Enum.EquipSlotType slot = item.equipSlot; + mbEnums.EquipSlotType slot = item.equipSlot; if (!this.equipped.containsKey(slot)) return; @@ -2046,7 +2046,7 @@ public class CharacterItemManager { ItemHealthUpdateMsg itemHealthUpdateMsg = new ItemHealthUpdateMsg(slot.ordinal(), (float) dur); Dispatch dispatch = Dispatch.borrow(pc, itemHealthUpdateMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } diff --git a/src/engine/objects/CharacterPower.java b/src/engine/objects/CharacterPower.java index f6181c8a..1b1cc93b 100644 --- a/src/engine/objects/CharacterPower.java +++ b/src/engine/objects/CharacterPower.java @@ -9,9 +9,9 @@ package engine.objects; -import engine.Enum; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; +import engine.mbEnums; import engine.net.ByteBufferWriter; import engine.net.client.msg.ErrorPopupMsg; import engine.powers.PowersBase; @@ -99,7 +99,7 @@ public class CharacterPower extends AbstractGameObject { * Don't Call this directly. Instead call pc.calculateSkills(). */ public static void calculatePowers(AbstractCharacter absChar) { - if (absChar == null || absChar.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) == false) + if (absChar == null || absChar.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter) == false) return; PlayerCharacter pc = (PlayerCharacter) absChar; @@ -245,7 +245,7 @@ public class CharacterPower extends AbstractGameObject { } public static void grantTrains(AbstractCharacter absChar) { - if (absChar == null || absChar.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) == false) + if (absChar == null || absChar.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter) == false) return; PlayerCharacter pc = (PlayerCharacter) absChar; diff --git a/src/engine/objects/CharacterRune.java b/src/engine/objects/CharacterRune.java index c9e10e66..c5a3f3ff 100644 --- a/src/engine/objects/CharacterRune.java +++ b/src/engine/objects/CharacterRune.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.Enum.DispatchChannel; import engine.gameManager.DbManager; +import engine.mbEnums.DispatchChannel; import engine.net.ByteBufferWriter; import engine.net.DispatchMessage; import engine.net.client.msg.ApplyRuneMsg; diff --git a/src/engine/objects/CharacterSkill.java b/src/engine/objects/CharacterSkill.java index 89dbfc66..1b946802 100644 --- a/src/engine/objects/CharacterSkill.java +++ b/src/engine/objects/CharacterSkill.java @@ -9,10 +9,10 @@ package engine.objects; -import engine.Enum; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.net.ByteBufferWriter; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; @@ -260,7 +260,7 @@ public class CharacterSkill extends AbstractGameObject { this.numTrains.set(trains); this.ownerUID = mob.getObjectUUID(); this.isMobOwner = true; - boolean isGuard = mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN) || mob.agentType.equals(Enum.AIAgentType.GUARDMINION); + boolean isGuard = mob.agentType.equals(mbEnums.AIAgentType.GUARDCAPTAIN) || mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION); calculateMobBaseAmount(isGuard); calculateModifiedAmount(isGuard); @@ -388,8 +388,8 @@ public class CharacterSkill extends AbstractGameObject { int available = 0; //get racial bonus; - if (pc.race.getRaceType().equals(Enum.RaceType.HUMANMALE) || - pc.race.getRaceType().equals(Enum.RaceType.HUMANFEMALE)) + if (pc.race.getRaceType().equals(mbEnums.RaceType.HUMANMALE) || + pc.race.getRaceType().equals(mbEnums.RaceType.HUMANFEMALE)) raceBonus = 1; //Human racial bonus; //get base class trains @@ -481,7 +481,7 @@ public class CharacterSkill extends AbstractGameObject { * Don't Call this directly. Instead call pc.calculateSkills(). */ public static void calculateSkills(AbstractCharacter absChar) { - if (absChar == null && absChar.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) == false) + if (absChar == null && absChar.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter) == false) return; PlayerCharacter pc = (PlayerCharacter) absChar; diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index 4b55230e..92feb734 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -9,8 +9,6 @@ package engine.objects; -import engine.Enum; -import engine.Enum.*; import engine.InterestManagement.RealmMap; import engine.InterestManagement.WorldGrid; import engine.db.archive.CityRecord; @@ -20,6 +18,8 @@ import engine.math.Bounds; import engine.math.FastMath; import engine.math.Vector2f; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -287,7 +287,7 @@ public class City extends AbstractWorldObject { city = City.getCity(cityID); if (city == null) - return Enum.Ruins.getRandomRuin().getLocation(); + return mbEnums.Ruins.getRandomRuin().getLocation(); return city.getBindLoc(); } @@ -301,7 +301,7 @@ public class City extends AbstractWorldObject { Guild pcG = pc.getGuild(); - ConcurrentHashMap worldCities = DbManager.getMap(Enum.GameObjectType.City); + ConcurrentHashMap worldCities = DbManager.getMap(mbEnums.GameObjectType.City); //add npc cities @@ -375,7 +375,7 @@ public class City extends AbstractWorldObject { Guild pcG = playerCharacter.getGuild(); - ConcurrentHashMap worldCities = DbManager.getMap(Enum.GameObjectType.City); + ConcurrentHashMap worldCities = DbManager.getMap(mbEnums.GameObjectType.City); //add npc cities @@ -440,7 +440,7 @@ public class City extends AbstractWorldObject { if (cityId == 0) return null; - City city = (City) DbManager.getFromCache(Enum.GameObjectType.City, cityId); + City city = (City) DbManager.getFromCache(mbEnums.GameObjectType.City, cityId); if (city != null) return city; @@ -454,7 +454,7 @@ public class City extends AbstractWorldObject { if (cityId == 0) return null; - return (City) DbManager.getFromCache(Enum.GameObjectType.City, cityId); + return (City) DbManager.getFromCache(mbEnums.GameObjectType.City, cityId); } public boolean renameCity(String cityName) { @@ -723,7 +723,7 @@ public class City extends AbstractWorldObject { Bounds cityBounds = Bounds.borrow(); cityBounds.setBounds(new Vector2f(this.location.x + 64, this.location.z + 64), // location x and z are offset by 64 from the center of the city. - new Vector2f(Enum.CityBoundsType.GRID.halfExtents, Enum.CityBoundsType.GRID.halfExtents), + new Vector2f(mbEnums.CityBoundsType.GRID.halfExtents, mbEnums.CityBoundsType.GRID.halfExtents), 0.0f); this.setBounds(cityBounds); @@ -775,12 +775,12 @@ public class City extends AbstractWorldObject { // Add city entry to data warehouse if newly created - if ((ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER)) && (this.getHash() == null)) { + if ((ConfigManager.serverType.equals(mbEnums.ServerType.WORLDSERVER)) && (this.getHash() == null)) { this.setHash(); - if (DataWarehouse.recordExists(Enum.DataRecordType.CITY, this.getObjectUUID()) == false) { - CityRecord cityRecord = CityRecord.borrow(this, Enum.RecordEventType.CREATE); + if (DataWarehouse.recordExists(mbEnums.DataRecordType.CITY, this.getObjectUUID()) == false) { + CityRecord cityRecord = CityRecord.borrow(this, mbEnums.RecordEventType.CREATE); DataWarehouse.pushToWarehouse(cityRecord); } } @@ -1225,7 +1225,7 @@ public class City extends AbstractWorldObject { } this.setForceRename(true); - CityRecord cityRecord = CityRecord.borrow(this, Enum.RecordEventType.TRANSFER); + CityRecord cityRecord = CityRecord.borrow(this, mbEnums.RecordEventType.TRANSFER); DataWarehouse.pushToWarehouse(cityRecord); return true; @@ -1258,7 +1258,7 @@ public class City extends AbstractWorldObject { // Write hash to player character table - DataWarehouse.writeHash(Enum.DataRecordType.CITY, this.getObjectUUID()); + DataWarehouse.writeHash(mbEnums.DataRecordType.CITY, this.getObjectUUID()); } public boolean setRealmTaxDate(LocalDateTime realmTaxDate) { @@ -1392,9 +1392,9 @@ public class City extends AbstractWorldObject { vrm.setWarehouseBuilding(BuildingManager.getBuildingFromCache(building.getCity().warehouse.building.getObjectUUID())); vrm.configure(); Dispatch dispatch = Dispatch.borrow(player, vrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } } diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index bddaa620..004f7785 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -10,8 +10,8 @@ package engine.objects; import ch.claude_martin.enumbitset.EnumBitSet; -import engine.Enum; import engine.gameManager.DbManager; +import engine.mbEnums; import org.pmw.tinylog.Logger; import java.sql.ResultSet; @@ -36,7 +36,7 @@ public class Contract extends AbstractGameObject { private ArrayList npcModSuffixTable = new ArrayList<>(); private ArrayList itemModTable = new ArrayList<>(); private ArrayList sellInventory = new ArrayList<>(); - private EnumBitSet allowedBuildings; + private EnumBitSet allowedBuildings; private ArrayList buyItemType = new ArrayList<>(); private ArrayList buySkillToken = new ArrayList<>(); private ArrayList buyUnknownToken = new ArrayList<>(); @@ -85,7 +85,7 @@ public class Contract extends AbstractGameObject { this.vendorDialog = VendorDialog.getVendorDialog(rs.getInt("dialogID")); this.iconID = rs.getInt("iconID"); this.vendorID = rs.getInt("vendorID"); - this.allowedBuildings = EnumBitSet.asEnumBitSet(rs.getLong("allowedBuildingTypeID"), Enum.BuildingGroup.class); + this.allowedBuildings = EnumBitSet.asEnumBitSet(rs.getLong("allowedBuildingTypeID"), mbEnums.BuildingGroup.class); this.equipmentSet = rs.getInt("equipSetID"); this.inventorySet = rs.getInt("inventorySet"); @@ -220,7 +220,7 @@ public class Contract extends AbstractGameObject { DbManager.ContractQueries.updateDatabase(this); } - public EnumBitSet getAllowedBuildings() { + public EnumBitSet getAllowedBuildings() { return allowedBuildings; } diff --git a/src/engine/objects/Corpse.java b/src/engine/objects/Corpse.java index ad90cda6..65ac6fc1 100644 --- a/src/engine/objects/Corpse.java +++ b/src/engine/objects/Corpse.java @@ -9,9 +9,6 @@ package engine.objects; -import engine.Enum.GameObjectType; -import engine.Enum.GridObjectType; -import engine.Enum.ItemType; import engine.InterestManagement.WorldGrid; import engine.exception.SerializationException; import engine.gameManager.BuildingManager; @@ -19,6 +16,9 @@ import engine.gameManager.DbManager; import engine.job.JobContainer; import engine.job.JobScheduler; import engine.jobs.RemoveCorpseJob; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.GridObjectType; +import engine.mbEnums.ItemType; import engine.net.ByteBufferWriter; import engine.net.DispatchMessage; import engine.net.client.msg.UnloadObjectsMsg; diff --git a/src/engine/objects/Effect.java b/src/engine/objects/Effect.java index 50355d2a..0bd7c2f1 100644 --- a/src/engine/objects/Effect.java +++ b/src/engine/objects/Effect.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.Enum; -import engine.Enum.EffectSourceType; +import engine.mbEnums; +import engine.mbEnums.EffectSourceType; import engine.gameManager.PowersManager; import engine.job.AbstractJob; import engine.job.AbstractScheduleJob; @@ -592,7 +592,7 @@ public class Effect { } //Used for verifying when damage absorbers fails - public boolean cancelOnTakeDamage(Enum.DamageType type, float amount) { + public boolean cancelOnTakeDamage(mbEnums.DamageType type, float amount) { if (!this.eb.cancelOnTakeDamage()) return false; if (this.eb == null || amount < 0f) diff --git a/src/engine/objects/Experience.java b/src/engine/objects/Experience.java index 3d33c68d..e7c73a1e 100644 --- a/src/engine/objects/Experience.java +++ b/src/engine/objects/Experience.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum.TargetColor; +import engine.mbEnums.TargetColor; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; import engine.server.MBServerStatics; diff --git a/src/engine/objects/Group.java b/src/engine/objects/Group.java index 2dbf310a..b9594517 100644 --- a/src/engine/objects/Group.java +++ b/src/engine/objects/Group.java @@ -12,6 +12,7 @@ package engine.objects; import engine.gameManager.GroupManager; import engine.job.JobScheduler; import engine.jobs.UpdateGroupJob; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.msg.group.GroupUpdateMsg; @@ -132,7 +133,7 @@ public class Group extends AbstractWorldObject { for (PlayerCharacter pc : this.members) { Dispatch dispatch = Dispatch.borrow(pc, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } diff --git a/src/engine/objects/Guild.java b/src/engine/objects/Guild.java index b84f6def..2384d20d 100644 --- a/src/engine/objects/Guild.java +++ b/src/engine/objects/Guild.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.Enum; -import engine.Enum.*; +import engine.mbEnums; +import engine.mbEnums.*; import engine.db.archive.DataWarehouse; import engine.db.archive.GuildRecord; import engine.db.handlers.dbGuildHandler; @@ -326,7 +326,7 @@ public class Guild extends AbstractWorldObject { if (objectUUID == 0) return Guild.getErrantGuild(); - Guild guild = (Guild) DbManager.getFromCache(Enum.GameObjectType.Guild, objectUUID); + Guild guild = (Guild) DbManager.getFromCache(mbEnums.GameObjectType.Guild, objectUUID); if (guild != null) return guild; @@ -346,7 +346,7 @@ public class Guild extends AbstractWorldObject { if (Guild.sameGuild(player.getGuild(), toUpdate)) { Dispatch dispatch = Dispatch.borrow(player, ucam); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @@ -356,7 +356,7 @@ public class Guild extends AbstractWorldObject { public static void UpdateClientAlliancesForPlayer(PlayerCharacter toUpdate) { UpdateClientAlliancesMsg ucam = new UpdateClientAlliancesMsg(toUpdate.getGuild()); Dispatch dispatch = Dispatch.borrow(toUpdate, ucam); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @@ -806,8 +806,8 @@ public class Guild extends AbstractWorldObject { this.setHash(); - if (DataWarehouse.recordExists(Enum.DataRecordType.GUILD, this.getObjectUUID()) == false) { - GuildRecord guildRecord = GuildRecord.borrow(this, Enum.RecordEventType.CREATE); + if (DataWarehouse.recordExists(mbEnums.DataRecordType.GUILD, this.getObjectUUID()) == false) { + GuildRecord guildRecord = GuildRecord.borrow(this, mbEnums.RecordEventType.CREATE); DataWarehouse.pushToWarehouse(guildRecord); } @@ -962,7 +962,7 @@ public class Guild extends AbstractWorldObject { public void setHash() { this.hash = DataWarehouse.hasher.encrypt(this.getObjectUUID()); - DataWarehouse.writeHash(Enum.DataRecordType.GUILD, this.getObjectUUID()); + DataWarehouse.writeHash(mbEnums.DataRecordType.GUILD, this.getObjectUUID()); } public GuildCharterType getGuildType() { @@ -996,7 +996,7 @@ public class Guild extends AbstractWorldObject { if (!Guild.sameGuild(player.getGuild(), this)) { msg.setMsgType(AllianceChangeMsg.ERROR_NOT_SAME_GUILD); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1004,7 +1004,7 @@ public class Guild extends AbstractWorldObject { if (!GuildStatusController.isInnerCouncil(player.getGuildStatus()) && !GuildStatusController.isGuildLeader(player.getGuildStatus())) { msg.setMsgType(AllianceChangeMsg.ERROR_NOT_AUTHORIZED); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1012,7 +1012,7 @@ public class Guild extends AbstractWorldObject { if (!GuildStatusController.isFullMember(player.getGuildStatus())) { msg.setMsgType(AllianceChangeMsg.ERROR_NOT_AUTHORIZED); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } } @@ -1030,7 +1030,7 @@ public class Guild extends AbstractWorldObject { if (recommendList.size() == 10) { msg.setMsgType(AllianceChangeMsg.ERROR_TOO_MANY); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1038,7 +1038,7 @@ public class Guild extends AbstractWorldObject { ErrorPopupMsg.sendErrorMsg(player, "This guild is already recommonded!"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1061,7 +1061,7 @@ public class Guild extends AbstractWorldObject { if (recommendList.size() == 10) { msg.setMsgType(AllianceChangeMsg.ERROR_TOO_MANY); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1069,7 +1069,7 @@ public class Guild extends AbstractWorldObject { ErrorPopupMsg.sendErrorMsg(player, "This guild is already recommonded!"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1091,7 +1091,7 @@ public class Guild extends AbstractWorldObject { if (allyList.size() == 10) { msg.setMsgType(AllianceChangeMsg.ERROR_TOO_MANY); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1099,7 +1099,7 @@ public class Guild extends AbstractWorldObject { ErrorPopupMsg.sendErrorMsg(player, "This guild is already an Ally!"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1108,7 +1108,7 @@ public class Guild extends AbstractWorldObject { Logger.error(this.getObjectUUID() + " Could not find alliance Guild"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1118,7 +1118,7 @@ public class Guild extends AbstractWorldObject { Logger.error(this.getObjectUUID() + " failed to update alliance Database"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1135,7 +1135,7 @@ public class Guild extends AbstractWorldObject { if (enemyList.size() == 10) { msg.setMsgType(AllianceChangeMsg.ERROR_TOO_MANY); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1143,7 +1143,7 @@ public class Guild extends AbstractWorldObject { ErrorPopupMsg.sendErrorMsg(player, "This guild is already an Enemy!"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1152,7 +1152,7 @@ public class Guild extends AbstractWorldObject { Logger.error(this.getObjectUUID() + " Could not find alliance Guild"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1162,7 +1162,7 @@ public class Guild extends AbstractWorldObject { Logger.error(this.getObjectUUID() + " failed to update alliance Database"); msg.setMsgType((byte) 15); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1180,7 +1180,7 @@ public class Guild extends AbstractWorldObject { // once here everything passed, send successMsg; msg.setMsgType(AllianceChangeMsg.INFO_SUCCESS); dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return true; } diff --git a/src/engine/objects/GuildAlliances.java b/src/engine/objects/GuildAlliances.java index 7f43f1bb..21e94e1d 100644 --- a/src/engine/objects/GuildAlliances.java +++ b/src/engine/objects/GuildAlliances.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum.AllianceType; +import engine.mbEnums.AllianceType; import engine.gameManager.DbManager; import java.sql.ResultSet; diff --git a/src/engine/objects/GuildHistory.java b/src/engine/objects/GuildHistory.java index 6c29820a..16574652 100644 --- a/src/engine/objects/GuildHistory.java +++ b/src/engine/objects/GuildHistory.java @@ -10,8 +10,8 @@ package engine.objects; -import engine.Enum.GameObjectType; -import engine.Enum.GuildHistoryType; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.GuildHistoryType; import engine.net.ByteBufferWriter; import org.joda.time.DateTime; diff --git a/src/engine/objects/Heraldry.java b/src/engine/objects/Heraldry.java index b60fda8d..4215756d 100644 --- a/src/engine/objects/Heraldry.java +++ b/src/engine/objects/Heraldry.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.Enum.GameObjectType; import engine.gameManager.DbManager; +import engine.mbEnums.GameObjectType; import org.pmw.tinylog.Logger; import java.sql.ResultSet; diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index 4745dddf..134d9e7d 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -9,12 +9,12 @@ package engine.objects; -import engine.Enum; -import engine.Enum.*; import engine.exception.SerializationException; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.ByteBufferReader; import engine.net.ByteBufferWriter; import engine.net.Dispatch; @@ -41,15 +41,15 @@ public class Item extends AbstractWorldObject { private static ConcurrentHashMap enchantValues = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); private final ConcurrentHashMap bonuses = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); private final ArrayList effectNames = new ArrayList<>(); - public Enum.ItemContainerType containerType; + public mbEnums.ItemContainerType containerType; public ReentrantLock lootLock = new ReentrantLock(); public int ownerID; //may be character, account, npc, mob public float drop_chance; - public EnumSet flags = EnumSet.noneOf(ItemFlags.class); + public EnumSet flags = EnumSet.noneOf(ItemFlags.class); public int numberOfItems; public float combat_health_current; public int chargesRemaining; - public Enum.EquipSlotType equipSlot; + public mbEnums.EquipSlotType equipSlot; private boolean canDestroy; private boolean isRandom = false; public int value; @@ -105,19 +105,19 @@ public class Item extends AbstractWorldObject { switch (container) { case "inventory": - this.containerType = Enum.ItemContainerType.INVENTORY; + this.containerType = mbEnums.ItemContainerType.INVENTORY; break; case "bank": - this.containerType = Enum.ItemContainerType.BANK; + this.containerType = mbEnums.ItemContainerType.BANK; break; case "vault": - this.containerType = Enum.ItemContainerType.VAULT; + this.containerType = mbEnums.ItemContainerType.VAULT; break; case "equip": - this.containerType = Enum.ItemContainerType.EQUIPPED; + this.containerType = mbEnums.ItemContainerType.EQUIPPED; break; case "forge": - this.containerType = Enum.ItemContainerType.FORGE; + this.containerType = mbEnums.ItemContainerType.FORGE; break; case "warehouse": this.containerType = ItemContainerType.WAREHOUSE; @@ -160,7 +160,7 @@ public class Item extends AbstractWorldObject { if (flagString.isEmpty() == false) for (String itemFlag : flagString.split(";")) - this.flags.add(Enum.ItemFlags.valueOf(itemFlag)); + this.flags.add(mbEnums.ItemFlags.valueOf(itemFlag)); this.dateToUpgrade = rs.getLong("dateToUpgrade"); this.value = rs.getInt("value"); @@ -530,16 +530,16 @@ public class Item extends AbstractWorldObject { return (Item) DbManager.getFromCache(GameObjectType.Item, id); } - public static Item newGoldItem(AbstractWorldObject awo, Enum.ItemContainerType containerType) { + public static Item newGoldItem(AbstractWorldObject awo, mbEnums.ItemContainerType containerType) { return newGoldItem(awo, containerType, true); } //used for vault! - public static Item newGoldItem(int accountID, Enum.ItemContainerType containerType) { + public static Item newGoldItem(int accountID, mbEnums.ItemContainerType containerType) { return newGoldItem(accountID, containerType, true); } - private static Item newGoldItem(int accountID, Enum.ItemContainerType containerType, boolean persist) { + private static Item newGoldItem(int accountID, mbEnums.ItemContainerType containerType, boolean persist) { int ownerID; OwnerType ownerType; @@ -565,7 +565,7 @@ public class Item extends AbstractWorldObject { return newGold; } - private static Item newGoldItem(AbstractWorldObject awo, Enum.ItemContainerType containerType, boolean persist) { + private static Item newGoldItem(AbstractWorldObject awo, mbEnums.ItemContainerType containerType, boolean persist) { int ownerID; OwnerType ownerType; @@ -573,7 +573,7 @@ public class Item extends AbstractWorldObject { if (awo.getObjectType().equals(GameObjectType.Mob)) return null; - if (containerType == Enum.ItemContainerType.VAULT) { + if (containerType == mbEnums.ItemContainerType.VAULT) { if (!(awo.getObjectType().equals(GameObjectType.PlayerCharacter))) { Logger.error("AWO is not a PlayerCharacter"); return null; @@ -748,19 +748,19 @@ public class Item extends AbstractWorldObject { this.ownerID = 0; this.ownerType = null; - this.containerType = Enum.ItemContainerType.NONE; + this.containerType = mbEnums.ItemContainerType.NONE; this.equipSlot = EquipSlotType.NONE; } protected void validateItemContainer() { - if (this.containerType == Enum.ItemContainerType.NONE) + if (this.containerType == mbEnums.ItemContainerType.NONE) if (this.ownerID != 0) // Item has an owner, just somehow the flags got messed up. // Default to bank. // TODO NEED LOG EVENT HERE. - this.containerType = Enum.ItemContainerType.BANK; + this.containerType = mbEnums.ItemContainerType.BANK; else // This item is on the ground. Nothing to worry about. this.zeroItem(); @@ -811,7 +811,7 @@ public class Item extends AbstractWorldObject { this.zeroItem(); this.ownerID = npc.getObjectUUID(); this.ownerType = OwnerType.Npc; - this.containerType = Enum.ItemContainerType.INVENTORY; + this.containerType = mbEnums.ItemContainerType.INVENTORY; this.equipSlot = EquipSlotType.NONE; return true; } @@ -829,7 +829,7 @@ public class Item extends AbstractWorldObject { this.zeroItem(); this.ownerID = 0; this.ownerType = null; - this.containerType = Enum.ItemContainerType.INVENTORY; + this.containerType = mbEnums.ItemContainerType.INVENTORY; this.equipSlot = EquipSlotType.NONE; return true; } @@ -847,7 +847,7 @@ public class Item extends AbstractWorldObject { this.zeroItem(); this.ownerID = pc.getObjectUUID(); this.ownerType = OwnerType.PlayerCharacter; - this.containerType = Enum.ItemContainerType.BANK; + this.containerType = mbEnums.ItemContainerType.BANK; this.equipSlot = EquipSlotType.NONE; return true; } @@ -865,7 +865,7 @@ public class Item extends AbstractWorldObject { this.zeroItem(); this.ownerID = npc.getObjectUUID(); this.ownerType = OwnerType.Npc; - this.containerType = Enum.ItemContainerType.BANK; + this.containerType = mbEnums.ItemContainerType.BANK; this.equipSlot = EquipSlotType.NONE; return true; } @@ -883,12 +883,12 @@ public class Item extends AbstractWorldObject { this.zeroItem(); this.ownerID = a.getObjectUUID(); this.ownerType = OwnerType.Account; - this.containerType = Enum.ItemContainerType.VAULT; + this.containerType = mbEnums.ItemContainerType.VAULT; this.equipSlot = EquipSlotType.NONE; return true; } - protected synchronized boolean equipItem(PlayerCharacter pc, Enum.EquipSlotType slot) { + protected synchronized boolean equipItem(PlayerCharacter pc, mbEnums.EquipSlotType slot) { if (!DbManager.ItemQueries.UPDATE_OWNER(this, pc.getObjectUUID(), //tableID @@ -902,26 +902,26 @@ public class Item extends AbstractWorldObject { this.zeroItem(); this.ownerID = pc.getObjectUUID(); this.ownerType = OwnerType.PlayerCharacter; - this.containerType = Enum.ItemContainerType.EQUIPPED; + this.containerType = mbEnums.ItemContainerType.EQUIPPED; this.equipSlot = slot; return true; } - protected synchronized boolean equipItem(NPC npc, Enum.EquipSlotType slot) { + protected synchronized boolean equipItem(NPC npc, mbEnums.EquipSlotType slot) { this.zeroItem(); this.ownerID = npc.getObjectUUID(); this.ownerType = OwnerType.Npc; - this.containerType = Enum.ItemContainerType.EQUIPPED; + this.containerType = mbEnums.ItemContainerType.EQUIPPED; this.equipSlot = slot; return true; } - protected synchronized boolean equipItem(Mob mobile, Enum.EquipSlotType slot) { + protected synchronized boolean equipItem(Mob mobile, mbEnums.EquipSlotType slot) { this.zeroItem(); this.ownerID = mobile.getObjectUUID(); this.ownerType = OwnerType.Mob; - this.containerType = Enum.ItemContainerType.EQUIPPED; + this.containerType = mbEnums.ItemContainerType.EQUIPPED; this.equipSlot = slot; return true; } @@ -930,7 +930,7 @@ public class Item extends AbstractWorldObject { EffectsBase effect; - if (ConfigManager.serverType.equals(Enum.ServerType.LOGINSERVER)) + if (ConfigManager.serverType.equals(mbEnums.ServerType.LOGINSERVER)) return; @@ -1062,7 +1062,7 @@ public class Item extends AbstractWorldObject { DeleteItemMsg deleteItemMsg = new DeleteItemMsg(this.getObjectType().ordinal(), this.getObjectUUID()); charItemMan.cleanupDupe(this); Dispatch dispatch = Dispatch.borrow(pc, deleteItemMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } @@ -1085,7 +1085,7 @@ public class Item extends AbstractWorldObject { DeleteItemMsg deleteItemMsg = new DeleteItemMsg(this.getObjectType().ordinal(), this.getObjectUUID()); charItemMan.cleanupDupe(this); Dispatch dispatch = Dispatch.borrow(pc, deleteItemMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); return false; } return true; diff --git a/src/engine/objects/ItemContainer.java b/src/engine/objects/ItemContainer.java index db984558..b5e6e274 100644 --- a/src/engine/objects/ItemContainer.java +++ b/src/engine/objects/ItemContainer.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum.ContainerType; +import engine.mbEnums.ContainerType; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; diff --git a/src/engine/objects/ItemFactory.java b/src/engine/objects/ItemFactory.java index 626d5dbb..4ae1b050 100644 --- a/src/engine/objects/ItemFactory.java +++ b/src/engine/objects/ItemFactory.java @@ -9,13 +9,13 @@ package engine.objects; -import engine.Enum; -import engine.Enum.ItemContainerType; -import engine.Enum.ItemType; -import engine.Enum.OwnerType; import engine.gameManager.*; import engine.loot.ModTableEntry; import engine.loot.ModTypeTableEntry; +import engine.mbEnums; +import engine.mbEnums.ItemContainerType; +import engine.mbEnums.ItemType; +import engine.mbEnums.OwnerType; import engine.net.ItemProductionManager; import engine.net.ItemQueue; import engine.net.client.ClientConnection; @@ -123,7 +123,7 @@ public class ItemFactory { // ROLL BANE SCROLL. if (templateID > 910010 && templateID < 910019) { - ConcurrentHashMap resources = cityWarehouse.resources; + ConcurrentHashMap resources = cityWarehouse.resources; int buildingWithdraw = BuildingManager.GetWithdrawAmountForRolling(forge, template.item_value); @@ -135,13 +135,13 @@ public class ItemFactory { return null; } - if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GOLD)) { + if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Warehouse gold is barred! Overdraft cannot be withdrawn from warehouse." + " " + template.item_base_name); return null; } - if (overdraft > resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > resources.get(mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse for overdraft." + " " + template.item_base_name); return null; @@ -154,7 +154,7 @@ public class ItemFactory { ErrorPopupMsg.sendErrorMsg(pc, "Building does not have enough gold to produce this item." + template.item_base_name); return null; } else { - if (overdraft > resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > resources.get(mbEnums.ResourceType.GOLD)) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse to produce this item." + template.item_base_name); return null; } @@ -162,14 +162,14 @@ public class ItemFactory { } if (overdraft > 0) - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.GOLD, overdraft, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.GOLD, overdraft, true)) { Logger.error("Warehouse for city " + cityWarehouse.city.getName() + " Failed to Create Item." + template.item_base_name); return null; } ml = new MobLoot(npc, template, false); - ml.containerType = Enum.ItemContainerType.FORGE; + ml.containerType = mbEnums.ItemContainerType.FORGE; ml.setValue(0); ml.loadEnchantments(); @@ -251,13 +251,13 @@ public class ItemFactory { } if (galvorAmount > 0) { - if (Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GALVOR)) { + if (Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GALVOR)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Galvor is locked." + template.item_base_name); return null; } - if (cityWarehouse.resources.get(Enum.ResourceType.GALVOR) < galvorAmount) { + if (cityWarehouse.resources.get(mbEnums.ResourceType.GALVOR) < galvorAmount) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Not enough Galvor in warehouse to roll this item." + template.item_base_name); return null; @@ -265,20 +265,20 @@ public class ItemFactory { } if (wormwoodAmount > 0) { - if (Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.WORMWOOD)) { + if (Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.WORMWOOD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Wormwood is locked." + template.item_base_name); return null; } - if (cityWarehouse.resources.get(Enum.ResourceType.WORMWOOD) < wormwoodAmount) { + if (cityWarehouse.resources.get(mbEnums.ResourceType.WORMWOOD) < wormwoodAmount) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Not enough Wormwood in warehouse to roll this item." + template.item_base_name); return null; } } - ConcurrentHashMap suffixResourceCosts = null; - ConcurrentHashMap prefixResourceCosts = null; + ConcurrentHashMap suffixResourceCosts = null; + ConcurrentHashMap prefixResourceCosts = null; EffectsBase prefix = null; @@ -309,20 +309,20 @@ public class ItemFactory { return null; } - if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GOLD)) { + if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Warehouse gold is barred! Overdraft cannot be withdrawn from warehouse." + template.item_base_name); return null; } - if (overdraft > cityWarehouse.resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > cityWarehouse.resources.get(mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse for overdraft." + template.item_base_name); return null; } prefixResourceCosts = prefix.getResourcesForEffect(); - for (Enum.ResourceType ibResources : prefixResourceCosts.keySet()) { + for (mbEnums.ResourceType ibResources : prefixResourceCosts.keySet()) { int warehouseAmount = cityWarehouse.resources.get(ibResources); int creationAmount = prefixResourceCosts.get(ibResources); @@ -361,20 +361,20 @@ public class ItemFactory { return null; } - if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GOLD)) { + if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Warehouse gold is barred! Overdraft cannot be withdrawn from warehouse." + template.item_base_name); return null; } - if (overdraft > cityWarehouse.resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > cityWarehouse.resources.get(mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse for overdraft." + template.item_base_name); return null; } - for (Enum.ResourceType ibResources : suffixResourceCosts.keySet()) { + for (mbEnums.ResourceType ibResources : suffixResourceCosts.keySet()) { int warehouseAmount = cityWarehouse.resources.get(ibResources); int creationAmount = suffixResourceCosts.get(ibResources); @@ -396,13 +396,13 @@ public class ItemFactory { return null; } - if (overdraft > 0 && useWarehouse && Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GOLD)) { + if (overdraft > 0 && useWarehouse && Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Warehouse gold is barred! Overdraft cannot be withdrawn from warehouse." + template.item_base_name); return null; } - if (useWarehouse && overdraft > cityWarehouse.resources.get(Enum.ResourceType.GOLD)) { + if (useWarehouse && overdraft > cityWarehouse.resources.get(mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse for overdraft." + template.item_base_name); return null; @@ -422,7 +422,7 @@ public class ItemFactory { ErrorPopupMsg.sendErrorMsg(pc, "Building does not have enough gold to produce this item." + template.item_base_name); return null; } else { - if (overdraft > cityWarehouse.resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > cityWarehouse.resources.get(mbEnums.ResourceType.GOLD)) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse to produce this item." + template.item_base_name); return null; } @@ -430,7 +430,7 @@ public class ItemFactory { } if (overdraft > 0 && useWarehouse) - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.GOLD, overdraft, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.GOLD, overdraft, true)) { Logger.error("Warehouse for city " + cityWarehouse.city.getName() + " Failed to Create Item." + template.item_base_name); return null; } @@ -444,7 +444,7 @@ public class ItemFactory { } - for (Enum.ResourceType ibResources : prefixResourceCosts.keySet()) { + for (mbEnums.ResourceType ibResources : prefixResourceCosts.keySet()) { int creationAmount = prefixResourceCosts.get(ibResources); @@ -467,7 +467,7 @@ public class ItemFactory { if (suffix != null) { - for (Enum.ResourceType ibResources : suffixResourceCosts.keySet()) { + for (mbEnums.ResourceType ibResources : suffixResourceCosts.keySet()) { int creationAmount = suffixResourceCosts.get(ibResources); if (Warehouse.isResourceLocked(cityWarehouse, ibResources) == true) { @@ -505,14 +505,14 @@ public class ItemFactory { return null; } - if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GOLD)) { + if (overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Warehouse gold is barred! Overdraft cannot be withdrawn from warehouse." + template.item_base_name); return null; } - if (useWarehouse && overdraft > cityWarehouse.resources.get(Enum.ResourceType.GOLD)) { + if (useWarehouse && overdraft > cityWarehouse.resources.get(mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse for overdraft." + template.item_base_name); @@ -527,7 +527,7 @@ public class ItemFactory { ErrorPopupMsg.sendErrorMsg(pc, "Building does not have enough gold to produce this item." + template.item_base_name); return null; } else { - if (overdraft > cityWarehouse.resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > cityWarehouse.resources.get(mbEnums.ResourceType.GOLD)) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse to produce this item." + template.item_base_name); return null; } @@ -535,7 +535,7 @@ public class ItemFactory { } if (overdraft > 0) - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.GOLD, overdraft, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.GOLD, overdraft, true)) { //ChatManager.chatGuildError(pc, "Failed to create Item"); Logger.error("Warehouse for city " + cityWarehouse.city.getName() + " Failed to Create Item." + template.item_base_name); return null; @@ -544,7 +544,7 @@ public class ItemFactory { // ChatManager.chatGuildInfo(pc, "Gold Cost = " + total); if (galvorAmount > 0) { - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.GALVOR, galvorAmount, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.GALVOR, galvorAmount, true)) { ErrorPopupMsg.sendErrorMsg(pc, "Failed to withdraw Galvor from warehouse!" + template.item_base_name); Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); return null; @@ -552,7 +552,7 @@ public class ItemFactory { } if (wormwoodAmount > 0) { - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.WORMWOOD, wormwoodAmount, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.WORMWOOD, wormwoodAmount, true)) { ErrorPopupMsg.sendErrorMsg(pc, "Failed to withdraw Wormwood from warehouse!" + template.item_base_name); Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); return null; @@ -561,7 +561,7 @@ public class ItemFactory { ml = new MobLoot(npc, template, false); - ml.containerType = Enum.ItemContainerType.FORGE; + ml.containerType = mbEnums.ItemContainerType.FORGE; if (customName.isEmpty() == false) ml.name = customName; @@ -795,7 +795,7 @@ public class ItemFactory { if (cityWarehouse != null && forge.assetIsProtected()) useWarehouse = true; - ConcurrentHashMap resources = null; + ConcurrentHashMap resources = null; if (useWarehouse) resources = cityWarehouse.resources; @@ -833,24 +833,24 @@ public class ItemFactory { return null; if (galvorAmount > 0) { - if (Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GALVOR)) { + if (Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GALVOR)) { ErrorPopupMsg.sendErrorMsg(pc, "Galvor is locked." + template.item_base_name); return null; } - if (cityWarehouse.resources.get(Enum.ResourceType.GALVOR) < galvorAmount) { + if (cityWarehouse.resources.get(mbEnums.ResourceType.GALVOR) < galvorAmount) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Galvor in warehouse to roll this item." + template.item_base_name); return null; } } if (wormwoodAmount > 0) { - if (Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.WORMWOOD)) { + if (Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.WORMWOOD)) { ErrorPopupMsg.sendErrorMsg(pc, "Galvor is locked." + template.item_base_name); return null; } - if (cityWarehouse.resources.get(Enum.ResourceType.WORMWOOD) < wormwoodAmount) { + if (cityWarehouse.resources.get(mbEnums.ResourceType.WORMWOOD) < wormwoodAmount) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Galvor in warehouse to roll this item." + template.item_base_name); return null; } @@ -887,13 +887,13 @@ public class ItemFactory { return null; } - if (useWarehouse && overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GOLD)) { + if (useWarehouse && overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Warehouse gold is barred! Overdraft cannot be withdrawn from warehouse." + template.item_base_name); return null; } - if (useWarehouse && overdraft > resources.get(Enum.ResourceType.GOLD)) { + if (useWarehouse && overdraft > resources.get(mbEnums.ResourceType.GOLD)) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse for overdraft." + template.item_base_name); return null; } @@ -905,7 +905,7 @@ public class ItemFactory { ErrorPopupMsg.sendErrorMsg(pc, "Building does not have enough gold to produce this item." + template.item_base_name); return null; } else { - if (overdraft > resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > resources.get(mbEnums.ResourceType.GOLD)) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse to produce this item." + template.item_base_name); return null; } @@ -915,12 +915,12 @@ public class ItemFactory { // there was an overdraft, withdraw the rest from warehouse. if (overdraft > 0) { if (pc != null) { - if (!Warehouse.withdraw(cityWarehouse, pc, Enum.ResourceType.GOLD, overdraft, false, true)) { + if (!Warehouse.withdraw(cityWarehouse, pc, mbEnums.ResourceType.GOLD, overdraft, false, true)) { Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); return null; } } else { - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.GOLD, overdraft, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.GOLD, overdraft, true)) { Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); return null; } @@ -938,13 +938,13 @@ public class ItemFactory { return null; } - if (useWarehouse && overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, Enum.ResourceType.GOLD)) { + if (useWarehouse && overdraft > 0 && Warehouse.isResourceLocked(cityWarehouse, mbEnums.ResourceType.GOLD)) { if (pc != null) ErrorPopupMsg.sendErrorMsg(pc, "Warehouse gold is barred! Overdraft cannot be withdrawn from warehouse." + template.item_base_name); return null; } - if (useWarehouse && overdraft > resources.get(Enum.ResourceType.GOLD)) { + if (useWarehouse && overdraft > resources.get(mbEnums.ResourceType.GOLD)) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse for overdraft." + template.item_base_name); return null; } @@ -956,7 +956,7 @@ public class ItemFactory { ErrorPopupMsg.sendErrorMsg(pc, "Building does not have enough gold to produce this item." + template.item_base_name); return null; } else { - if (overdraft > resources.get(Enum.ResourceType.GOLD)) { + if (overdraft > resources.get(mbEnums.ResourceType.GOLD)) { ErrorPopupMsg.sendErrorMsg(pc, "Not enough Gold in Warehouse to produce this item." + template.item_base_name); return null; } @@ -966,12 +966,12 @@ public class ItemFactory { if (overdraft > 0 && useWarehouse) { if (pc != null) { - if (!Warehouse.withdraw(cityWarehouse, pc, Enum.ResourceType.GOLD, overdraft, false, true)) { + if (!Warehouse.withdraw(cityWarehouse, pc, mbEnums.ResourceType.GOLD, overdraft, false, true)) { Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); return null; } } else { - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.GOLD, overdraft, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.GOLD, overdraft, true)) { Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); return null; } @@ -981,7 +981,7 @@ public class ItemFactory { if (galvorAmount > 0 && useWarehouse) { //ChatManager.chatGuildInfo(pc, "Withdrawing " + galvorAmount + " galvor from warehouse"); - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.GALVOR, galvorAmount, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.GALVOR, galvorAmount, true)) { ErrorPopupMsg.sendErrorMsg(pc, "Failed to withdraw Galvor from warehouse!" + template.item_base_name); Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); return null; @@ -990,7 +990,7 @@ public class ItemFactory { if (wormwoodAmount > 0 && useWarehouse) { //ChatManager.chatGuildInfo(pc, "Withdrawing " + wormwoodAmount + " wormwood from warehouse"); - if (!Warehouse.withdraw(cityWarehouse, npc, Enum.ResourceType.WORMWOOD, wormwoodAmount, true)) { + if (!Warehouse.withdraw(cityWarehouse, npc, mbEnums.ResourceType.WORMWOOD, wormwoodAmount, true)) { ErrorPopupMsg.sendErrorMsg(pc, "Failed to withdraw Wormwood from warehouse for " + template.item_base_name); Logger.error("Warehouse for city " + cityWarehouse.city.getName() + "Failed to Withdrawl "); @@ -1000,7 +1000,7 @@ public class ItemFactory { ml = new MobLoot(npc, template, false); - ml.containerType = Enum.ItemContainerType.FORGE; + ml.containerType = mbEnums.ItemContainerType.FORGE; if (prefix != null) { ml.addPermanentEnchantment(prefix.getIDString(), 0, 0, true); diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 81d7ca2c..b186450e 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -8,8 +8,8 @@ package engine.objects; -import engine.Enum; import engine.math.Vector3fImmutable; +import engine.mbEnums; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.pmw.tinylog.Logger; @@ -36,11 +36,11 @@ public class ItemTemplate { public float combat_health_current; public float combat_health_full; public final HashMap combat_attack_resist = new HashMap<>(); - public Enum.ItemType item_type; + public mbEnums.ItemType item_type; public int item_eq_slots_value; public boolean item_eq_slots_type; - public final EnumSet item_eq_slots_or = EnumSet.noneOf(Enum.EquipSlotType.class); - public final EnumSet item_eq_slots_and = EnumSet.noneOf(Enum.EquipSlotType.class); + public final EnumSet item_eq_slots_or = EnumSet.noneOf(mbEnums.EquipSlotType.class); + public final EnumSet item_eq_slots_and = EnumSet.noneOf(mbEnums.EquipSlotType.class); public boolean item_takeable; public int item_value; public int item_wt; @@ -53,34 +53,34 @@ public class ItemTemplate { public String item_skill_mastery_used = ""; public int item_parry_anim_id; public float item_bulk_factor; - public final HashMap item_offering_info = new HashMap<>(); + public final HashMap item_offering_info = new HashMap<>(); public int item_defense_rating; public float item_weapon_wepspeed; public float item_weapon_max_range; public int item_weapon_projectile_id; public float item_weapon_projectile_speed; public int item_weapon_combat_idle_anim; - public final HashMap item_weapon_damage = new HashMap<>(); + public final HashMap item_weapon_damage = new HashMap<>(); public final ArrayList weapon_attack_anim_right = new ArrayList<>(); public final ArrayList weapon_attack_anim_left = new ArrayList<>(); - public Enum.AttributeType item_primary_attr = Enum.AttributeType.None; - public Enum.AttributeType item_secondary_attr = Enum.AttributeType.None; - public final EnumSet item_flags = EnumSet.noneOf(Enum.ItemFlags.class); - public final EnumSet item_use_flags = EnumSet.noneOf(Enum.ItemUseFlags.class); + public mbEnums.AttributeType item_primary_attr = mbEnums.AttributeType.None; + public mbEnums.AttributeType item_secondary_attr = mbEnums.AttributeType.None; + public final EnumSet item_flags = EnumSet.noneOf(mbEnums.ItemFlags.class); + public final EnumSet item_use_flags = EnumSet.noneOf(mbEnums.ItemUseFlags.class); public int item_initial_charges; public final HashMap item_skill_required = new HashMap<>(); - public final EnumSet item_race_req = EnumSet.noneOf(Enum.MonsterType.class); - public final EnumSet item_race_res = EnumSet.noneOf(Enum.MonsterType.class); - public final EnumSet item_class_req = EnumSet.noneOf(Enum.ClassType.class); - public final EnumSet item_class_res = EnumSet.noneOf(Enum.ClassType.class); - public final EnumSet item_disc_req = EnumSet.noneOf(Enum.DisciplineType.class); - public final EnumSet item_disc_res = EnumSet.noneOf(Enum.DisciplineType.class); + public final EnumSet item_race_req = EnumSet.noneOf(mbEnums.MonsterType.class); + public final EnumSet item_race_res = EnumSet.noneOf(mbEnums.MonsterType.class); + public final EnumSet item_class_req = EnumSet.noneOf(mbEnums.ClassType.class); + public final EnumSet item_class_res = EnumSet.noneOf(mbEnums.ClassType.class); + public final EnumSet item_disc_req = EnumSet.noneOf(mbEnums.DisciplineType.class); + public final EnumSet item_disc_res = EnumSet.noneOf(mbEnums.DisciplineType.class); public int item_level_req; - public Enum.SexType item_sex_req; + public mbEnums.SexType item_sex_req; public final HashMap item_user_power_action = new HashMap<>(); public final HashMap item_power_grant = new HashMap<>(); public final HashMap item_power_action = new HashMap<>(); - public final HashMap item_resource_cost = new HashMap<>(); + public final HashMap item_resource_cost = new HashMap<>(); public int modTable; public int deed_type; public int deed_furniture_id; @@ -93,8 +93,8 @@ public class ItemTemplate { public float deed_namelookup_val; public boolean deed_custom_city; public int deed_structure_id; - public final HashMap rune_attr_adj = new HashMap<>(); - public final HashMap rune_max_attr_adj = new HashMap<>(); + public final HashMap rune_attr_adj = new HashMap<>(); + public final HashMap rune_max_attr_adj = new HashMap<>(); public final HashMap rune_skill_grant = new HashMap<>(); public final HashMap skill_granted_skills = new HashMap<>(); public final HashMap power_granted_skills = new HashMap<>(); @@ -105,7 +105,7 @@ public class ItemTemplate { public int rune_rank; public int rune_pracs_per_level; public float rune_exp_req_to_level; - public Enum.SexType rune_sex; + public mbEnums.SexType rune_sex; public int rune_class_icon; public int rune_health; public int rune_mana; @@ -115,22 +115,22 @@ public class ItemTemplate { public int rune_attack; public int rune_defense; public int rune_level; - public final HashMap rune_speed = new HashMap<>(); + public final HashMap rune_speed = new HashMap<>(); public int rune_group_type; public boolean rune_group_is_faction = false; public boolean rune_group_is_guild = false; public String rune_dsc; public String rune_fx_txt; - public EnumSet rune_group_tactics = EnumSet.noneOf(Enum.MobBehaviourType.class); + public EnumSet rune_group_tactics = EnumSet.noneOf(mbEnums.MobBehaviourType.class); ; - public EnumSet rune_group_role_set = EnumSet.noneOf(Enum.MobBehaviourType.class); + public EnumSet rune_group_role_set = EnumSet.noneOf(mbEnums.MobBehaviourType.class); ; public boolean rune_renderable = false; public int rune_natural_power_attack; public final HashMap rune_sparse_data = new HashMap<>(); public final HashMap rune_skill_adj = new HashMap<>(); - public final EnumSet rune_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); - public final EnumSet rune_not_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); + public final EnumSet rune_enemy_monster_types = EnumSet.noneOf(mbEnums.MonsterType.class); + public final EnumSet rune_not_enemy_monster_types = EnumSet.noneOf(mbEnums.MonsterType.class); public final ArrayList rune_groupee_monster_types = new ArrayList<>(); public final ArrayList rune_helper_monster_types = new ArrayList<>(); @@ -194,7 +194,7 @@ public class ItemTemplate { // Parsing an enum - item_type = Enum.ItemType.valueOf((String) jsonObject.get("item_type")); + item_type = mbEnums.ItemType.valueOf((String) jsonObject.get("item_type")); item_eq_slots_value = ((Long) jsonObject.get("item_eq_slots_value")).intValue(); item_eq_slots_type = (boolean) jsonObject.get("item_eq_slots_type"); @@ -204,13 +204,13 @@ public class ItemTemplate { if (eq_slots_or.isEmpty() == false) for (Object o : eq_slots_or) - item_eq_slots_or.add(Enum.EquipSlotType.valueOf((String) o)); + item_eq_slots_or.add(mbEnums.EquipSlotType.valueOf((String) o)); JSONArray eq_slots_and = (JSONArray) jsonObject.get("item_eq_slots_and"); if (eq_slots_and.isEmpty() == false) for (Object o : eq_slots_and) - item_eq_slots_and.add(Enum.EquipSlotType.valueOf((String) o)); + item_eq_slots_and.add(mbEnums.EquipSlotType.valueOf((String) o)); item_takeable = (boolean) jsonObject.get("item_takeable"); item_value = ((Long) jsonObject.get("item_value")).intValue(); @@ -243,19 +243,19 @@ public class ItemTemplate { JSONObject offering_entry = (JSONObject) entry; String offering_type = ((String) offering_entry.get("offering_type")).replaceAll("-", ""); int offering_value = ((Long) offering_entry.get("offering_value")).intValue(); - item_offering_info.put(Enum.ShrineType.valueOf(offering_type), offering_value); + item_offering_info.put(mbEnums.ShrineType.valueOf(offering_type), offering_value); } // Fields only present for ARMOR - if (item_type.equals(Enum.ItemType.ARMOR)) { + if (item_type.equals(mbEnums.ItemType.ARMOR)) { item_bulk_factor = ((Double) jsonObject.get("item_bulk_factor")).floatValue(); item_defense_rating = ((Long) jsonObject.get("item_defense_rating")).intValue(); } // Fields only present for WEAPON - if (item_type.equals(Enum.ItemType.WEAPON)) { + if (item_type.equals(mbEnums.ItemType.WEAPON)) { JSONObject item_weapon = (JSONObject) jsonObject.get("item_weapon"); item_weapon_wepspeed = ((Double) item_weapon.get("weapon_wepspeed")).floatValue(); @@ -269,7 +269,7 @@ public class ItemTemplate { if (weapon_damage.isEmpty() == false) for (Object o : weapon_damage) { JSONObject damage_entry = (JSONObject) o; - Enum.DamageType damageType = Enum.DamageType.getDamageType(((String) damage_entry.get("damage_type"))); + mbEnums.DamageType damageType = mbEnums.DamageType.getDamageType(((String) damage_entry.get("damage_type"))); int min = ((Long) damage_entry.get("damage_min")).intValue(); int max = ((Long) damage_entry.get("damage_max")).intValue(); int[] minMax = {min, max}; @@ -296,8 +296,8 @@ public class ItemTemplate { weapon_attack_anim_left.add(new int[]{animation, duration}); } - item_primary_attr = Enum.AttributeType.valueOf((String) jsonObject.get("item_primary_attr")); - item_secondary_attr = Enum.AttributeType.valueOf((String) jsonObject.get("item_secondary_attr")); + item_primary_attr = mbEnums.AttributeType.valueOf((String) jsonObject.get("item_primary_attr")); + item_secondary_attr = mbEnums.AttributeType.valueOf((String) jsonObject.get("item_secondary_attr")); } JSONArray itemflags = (JSONArray) jsonObject.get("item_flags"); @@ -306,14 +306,14 @@ public class ItemTemplate { for (Object o : itemflags) { String flag = (String) o; if (flag.equals("None") == false) - item_flags.add(Enum.ItemFlags.valueOf((String) o)); + item_flags.add(mbEnums.ItemFlags.valueOf((String) o)); } JSONArray itemUseflags = (JSONArray) jsonObject.get("item_use_flags"); if (itemUseflags.isEmpty() == false) for (Object o : itemUseflags) - item_use_flags.add(Enum.ItemUseFlags.valueOf((String) o)); + item_use_flags.add(mbEnums.ItemUseFlags.valueOf((String) o)); item_initial_charges = ((Long) jsonObject.get("item_initial_charges")).intValue(); @@ -341,9 +341,9 @@ public class ItemTemplate { race = race.replaceAll("-", ""); if (restrict) - item_race_res.add(Enum.MonsterType.valueOf(race)); + item_race_res.add(mbEnums.MonsterType.valueOf(race)); else - item_race_req.add(Enum.MonsterType.valueOf(race)); + item_race_req.add(mbEnums.MonsterType.valueOf(race)); } JSONObject class_required = (JSONObject) jsonObject.get("item_class_req"); @@ -357,9 +357,9 @@ public class ItemTemplate { classEntry = classEntry.replaceAll(",", ""); if (restrict) - item_class_res.add(Enum.ClassType.valueOf(classEntry)); + item_class_res.add(mbEnums.ClassType.valueOf(classEntry)); else - item_class_req.add(Enum.ClassType.valueOf(classEntry)); + item_class_req.add(mbEnums.ClassType.valueOf(classEntry)); } JSONObject disc_required = (JSONObject) jsonObject.get("item_disc_req"); @@ -373,13 +373,13 @@ public class ItemTemplate { disc = disc.replaceAll(",", ""); if (restrict) - item_disc_res.add(Enum.DisciplineType.valueOf(disc)); + item_disc_res.add(mbEnums.DisciplineType.valueOf(disc)); else - item_disc_req.add(Enum.DisciplineType.valueOf(disc)); + item_disc_req.add(mbEnums.DisciplineType.valueOf(disc)); } item_level_req = ((Long) jsonObject.get("item_level_req")).intValue(); - item_sex_req = Enum.SexType.valueOf((String) jsonObject.get("item_sex_req")); + item_sex_req = mbEnums.SexType.valueOf((String) jsonObject.get("item_sex_req")); JSONArray userPowerActions = (JSONArray) jsonObject.get("item_user_power_action"); @@ -432,14 +432,14 @@ public class ItemTemplate { if (resource_costs.isEmpty() == false) for (Object o : resource_costs) { JSONObject resource_entry = (JSONObject) o; - Enum.ResourceType resource_type = Enum.ResourceType.valueOf(((String) resource_entry.get("resource_type")).toUpperCase()); + mbEnums.ResourceType resource_type = mbEnums.ResourceType.valueOf(((String) resource_entry.get("resource_type")).toUpperCase()); int resource_value = ((Long) resource_entry.get("resource_value")).intValue(); item_resource_cost.put(resource_type, resource_value); } // Deed related fields - if (item_type.equals(Enum.ItemType.DEED)) { + if (item_type.equals(mbEnums.ItemType.DEED)) { deed_type = ((Long) jsonObject.get("deed_type")).intValue(); deed_furniture_id = ((Long) jsonObject.get("deed_furniture_id")).intValue(); @@ -454,7 +454,7 @@ public class ItemTemplate { deed_structure_id = ((Long) jsonObject.get("deed_structure_id")).intValue(); } - if (item_type.equals(Enum.ItemType.RUNE)) { + if (item_type.equals(mbEnums.ItemType.RUNE)) { rune_type = (String) jsonObject.get("rune_type"); @@ -468,7 +468,7 @@ public class ItemTemplate { rune_rank = ((Long) jsonObject.get("rune_rank")).intValue(); rune_pracs_per_level = ((Long) jsonObject.get("rune_pracs_per_level")).intValue(); rune_exp_req_to_level = ((Double) jsonObject.get("rune_exp_req_to_level")).floatValue(); - rune_sex = Enum.SexType.valueOf((String) jsonObject.get("rune_sex")); + rune_sex = mbEnums.SexType.valueOf((String) jsonObject.get("rune_sex")); rune_class_icon = ((Long) jsonObject.get("rune_class_icon")).intValue(); rune_health = ((Long) jsonObject.get("rune_health")).intValue(); rune_mana = ((Long) jsonObject.get("rune_mana")).intValue(); @@ -482,7 +482,7 @@ public class ItemTemplate { JSONObject rune_speed_json = (JSONObject) jsonObject.get("rune_speed"); for (Object key : rune_speed_json.keySet()) { - Enum.MovementType movementType = Enum.MovementType.valueOf((String) key); + mbEnums.MovementType movementType = mbEnums.MovementType.valueOf((String) key); float speed = ((Double) rune_speed_json.get(key)).floatValue(); rune_speed.put(movementType, speed); } @@ -497,18 +497,18 @@ public class ItemTemplate { int group_tactics_bitvector = ((Long) jsonObject.get("rune_group_tactics")).intValue(); - rune_group_tactics.addAll(Enum.fromLong(group_tactics_bitvector, Enum.MobBehaviourType.class)); + rune_group_tactics.addAll(mbEnums.fromLong(group_tactics_bitvector, mbEnums.MobBehaviourType.class)); int group_role_bitvector = ((Long) jsonObject.get("rune_group_role_set")).intValue(); - rune_group_role_set.addAll(Enum.fromLong(group_role_bitvector, Enum.MobBehaviourType.class)); + rune_group_role_set.addAll(mbEnums.fromLong(group_role_bitvector, mbEnums.MobBehaviourType.class)); JSONArray enemy_types_json = (JSONArray) jsonObject.get("rune_enemy_monster_types"); for (Object o : enemy_types_json) { String enemy = (String) o; enemy = enemy.replaceAll("-", ""); - Enum.MonsterType monsterType = Enum.MonsterType.valueOf(enemy); + mbEnums.MonsterType monsterType = mbEnums.MonsterType.valueOf(enemy); rune_enemy_monster_types.add(monsterType); } @@ -517,7 +517,7 @@ public class ItemTemplate { for (Object o : not_enemy_types_json) { String notenemy = (String) o; notenemy = notenemy.replaceAll("-", ""); - Enum.MonsterType monsterType = Enum.MonsterType.valueOf(notenemy); + mbEnums.MonsterType monsterType = mbEnums.MonsterType.valueOf(notenemy); rune_not_enemy_monster_types.add(monsterType); } @@ -565,7 +565,7 @@ public class ItemTemplate { for (Object attributeEntry : attr_adj_json) { JSONObject attribute = (JSONObject) attributeEntry; String typeString = (String) attribute.get("attr_type"); - Enum.AttributeType attributeType = Enum.AttributeType.valueOf(typeString); + mbEnums.AttributeType attributeType = mbEnums.AttributeType.valueOf(typeString); int attributeValue = ((Long) attribute.get("attr_value")).intValue(); rune_attr_adj.put(attributeType, attributeValue); } @@ -575,7 +575,7 @@ public class ItemTemplate { for (Object attributeEntry : max_attr_adj_json) { JSONObject attribute = (JSONObject) attributeEntry; String typeString = (String) attribute.get("attr_type"); - Enum.AttributeType attributeType = Enum.AttributeType.valueOf(typeString); + mbEnums.AttributeType attributeType = mbEnums.AttributeType.valueOf(typeString); int attributeValue = ((Long) attribute.get("attr_value")).intValue(); rune_max_attr_adj.put(attributeType, attributeValue); } diff --git a/src/engine/objects/Kit.java b/src/engine/objects/Kit.java index eb8d305d..c1732e3b 100644 --- a/src/engine/objects/Kit.java +++ b/src/engine/objects/Kit.java @@ -9,10 +9,10 @@ package engine.objects; -import engine.Enum; -import engine.Enum.ItemContainerType; -import engine.Enum.OwnerType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.ItemContainerType; +import engine.mbEnums.OwnerType; import org.pmw.tinylog.Logger; import java.net.UnknownHostException; @@ -111,7 +111,7 @@ public class Kit extends AbstractGameObject { * Getters */ - private static boolean kitItemCreator(PlayerCharacter pc, int templateID, Enum.EquipSlotType slot) { + private static boolean kitItemCreator(PlayerCharacter pc, int templateID, mbEnums.EquipSlotType slot) { Item item = new Item(templateID); item.ownerID = pc.getObjectUUID(); @@ -409,15 +409,15 @@ public class Kit extends AbstractGameObject { public void equipPCwithKit(PlayerCharacter pc) { if (weapon != 0) - kitItemCreator(pc, weapon, Enum.EquipSlotType.RHELD); + kitItemCreator(pc, weapon, mbEnums.EquipSlotType.RHELD); if (offhand != 0) - kitItemCreator(pc, offhand, Enum.EquipSlotType.LHELD); + kitItemCreator(pc, offhand, mbEnums.EquipSlotType.LHELD); if (chest != 0) - kitItemCreator(pc, chest, Enum.EquipSlotType.CHEST); + kitItemCreator(pc, chest, mbEnums.EquipSlotType.CHEST); if (legs != 0) - kitItemCreator(pc, legs, Enum.EquipSlotType.LEGS); + kitItemCreator(pc, legs, mbEnums.EquipSlotType.LEGS); if (feet != 0) - kitItemCreator(pc, feet, Enum.EquipSlotType.FEET); + kitItemCreator(pc, feet, mbEnums.EquipSlotType.FEET); } @Override diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 0946972c..294f14d9 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -9,12 +9,12 @@ package engine.objects; -import engine.Enum; import engine.InterestManagement.WorldGrid; import engine.gameManager.BuildingManager; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.gameManager.ZoneManager; +import engine.mbEnums; import engine.net.ByteBufferWriter; import engine.net.client.msg.ErrorPopupMsg; import engine.server.MBServerStatics; @@ -45,7 +45,7 @@ public class Mine extends AbstractGameObject { public GuildTag guildTag; public String nationName; public GuildTag nationTag; - private Enum.ResourceType production; + private mbEnums.ResourceType production; private Guild owningGuild; private int flags; private int buildingID; @@ -88,7 +88,7 @@ public class Mine extends AbstractGameObject { this.nationTag = GuildTag.ERRANT; } - this.production = Enum.ResourceType.valueOf(rs.getString("mine_resource")); + this.production = mbEnums.ResourceType.valueOf(rs.getString("mine_resource")); this.lastClaimer = null; } @@ -114,7 +114,7 @@ public class Mine extends AbstractGameObject { if (mine.getBlueprint() == null) return; - if (mine.getBlueprint().getBuildingGroup() != Enum.BuildingGroup.MINE) + if (mine.getBlueprint().getBuildingGroup() != mbEnums.BuildingGroup.MINE) return; @@ -310,7 +310,7 @@ public class Mine extends AbstractGameObject { return mineCnt <= tolRank; } - public boolean changeProductionType(Enum.ResourceType resource) { + public boolean changeProductionType(mbEnums.ResourceType resource) { if (!this.validForMine(resource)) return false; //update resource in database; @@ -333,7 +333,7 @@ public class Mine extends AbstractGameObject { return this.zoneName; } - public Enum.ResourceType getProduction() { + public mbEnums.ResourceType getProduction() { return this.production; } @@ -380,7 +380,7 @@ public class Mine extends AbstractGameObject { building.isDeranking.compareAndSet(true, false); } - public boolean validForMine(Enum.ResourceType r) { + public boolean validForMine(mbEnums.ResourceType r) { if (this.mineType == null) return false; return this.mineType.validForMine(r, this.isExpansion()); @@ -444,7 +444,7 @@ public class Mine extends AbstractGameObject { // remove hirelings - Building building = (Building) getObject(Enum.GameObjectType.Building, this.buildingID); + Building building = (Building) getObject(mbEnums.GameObjectType.Building, this.buildingID); BuildingManager.cleanupHirelings(building); } @@ -482,7 +482,7 @@ public class Mine extends AbstractGameObject { if (this.owningGuild.getOwnedCity().warehouse == null) return false; - return Warehouse.depositFromMine(this, Enum.ResourceType.resourceLookup.get(this.production.templateID), this.getModifiedProductionAmount(), this.owningGuild.getOwnedCity().warehouse); + return Warehouse.depositFromMine(this, mbEnums.ResourceType.resourceLookup.get(this.production.templateID), this.getModifiedProductionAmount(), this.owningGuild.getOwnedCity().warehouse); } public boolean updateGuildOwner(PlayerCharacter playerCharacter) { diff --git a/src/engine/objects/MineProduction.java b/src/engine/objects/MineProduction.java index 966c124b..ddad3dfe 100644 --- a/src/engine/objects/MineProduction.java +++ b/src/engine/objects/MineProduction.java @@ -9,24 +9,24 @@ package engine.objects; -import engine.Enum; +import engine.mbEnums; import java.util.HashMap; public enum MineProduction { - LUMBER("Lumber Camp", new HashMap<>(), Enum.ResourceType.WORMWOOD, 1618637196, 1663491950), - ORE("Ore Mine", new HashMap<>(), Enum.ResourceType.OBSIDIAN, 518103023, -788976428), - GOLD("Gold Mine", new HashMap<>(), Enum.ResourceType.GALVOR, -662193002, -1227205358), - MAGIC("Magic Mine", new HashMap<>(), Enum.ResourceType.BLOODSTONE, 504746863, -1753567069); + LUMBER("Lumber Camp", new HashMap<>(), mbEnums.ResourceType.WORMWOOD, 1618637196, 1663491950), + ORE("Ore Mine", new HashMap<>(), mbEnums.ResourceType.OBSIDIAN, 518103023, -788976428), + GOLD("Gold Mine", new HashMap<>(), mbEnums.ResourceType.GALVOR, -662193002, -1227205358), + MAGIC("Magic Mine", new HashMap<>(), mbEnums.ResourceType.BLOODSTONE, 504746863, -1753567069); public final String name; - public final HashMap resources; - public final Enum.ResourceType xpac; + public final HashMap resources; + public final mbEnums.ResourceType xpac; public final int hash; public final int xpacHash; - MineProduction(String name, HashMap resources, Enum.ResourceType xpac, int hash, int xpacHash) { + MineProduction(String name, HashMap resources, mbEnums.ResourceType xpac, int hash, int xpacHash) { this.name = name; this.resources = resources; this.xpac = xpac; @@ -36,34 +36,34 @@ public enum MineProduction { public static void addResources() { if (MineProduction.LUMBER.resources.size() == 0) { - MineProduction.LUMBER.resources.put(7, Enum.ResourceType.GOLD); - MineProduction.LUMBER.resources.put(1580004, Enum.ResourceType.LUMBER); - MineProduction.LUMBER.resources.put(1580005, Enum.ResourceType.OAK); - MineProduction.LUMBER.resources.put(1580006, Enum.ResourceType.BRONZEWOOD); - MineProduction.LUMBER.resources.put(1580007, Enum.ResourceType.MANDRAKE); + MineProduction.LUMBER.resources.put(7, mbEnums.ResourceType.GOLD); + MineProduction.LUMBER.resources.put(1580004, mbEnums.ResourceType.LUMBER); + MineProduction.LUMBER.resources.put(1580005, mbEnums.ResourceType.OAK); + MineProduction.LUMBER.resources.put(1580006, mbEnums.ResourceType.BRONZEWOOD); + MineProduction.LUMBER.resources.put(1580007, mbEnums.ResourceType.MANDRAKE); } if (MineProduction.ORE.resources.size() == 0) { - MineProduction.ORE.resources.put(7, Enum.ResourceType.GOLD); - MineProduction.ORE.resources.put(1580000, Enum.ResourceType.STONE); - MineProduction.ORE.resources.put(1580001, Enum.ResourceType.TRUESTEEL); - MineProduction.ORE.resources.put(1580002, Enum.ResourceType.IRON); - MineProduction.ORE.resources.put(1580003, Enum.ResourceType.ADAMANT); + MineProduction.ORE.resources.put(7, mbEnums.ResourceType.GOLD); + MineProduction.ORE.resources.put(1580000, mbEnums.ResourceType.STONE); + MineProduction.ORE.resources.put(1580001, mbEnums.ResourceType.TRUESTEEL); + MineProduction.ORE.resources.put(1580002, mbEnums.ResourceType.IRON); + MineProduction.ORE.resources.put(1580003, mbEnums.ResourceType.ADAMANT); } if (MineProduction.GOLD.resources.size() == 0) { - MineProduction.GOLD.resources.put(7, Enum.ResourceType.GOLD); - MineProduction.GOLD.resources.put(1580000, Enum.ResourceType.STONE); - MineProduction.GOLD.resources.put(1580008, Enum.ResourceType.COAL); - MineProduction.GOLD.resources.put(1580009, Enum.ResourceType.AGATE); - MineProduction.GOLD.resources.put(1580010, Enum.ResourceType.DIAMOND); - MineProduction.GOLD.resources.put(1580011, Enum.ResourceType.ONYX); + MineProduction.GOLD.resources.put(7, mbEnums.ResourceType.GOLD); + MineProduction.GOLD.resources.put(1580000, mbEnums.ResourceType.STONE); + MineProduction.GOLD.resources.put(1580008, mbEnums.ResourceType.COAL); + MineProduction.GOLD.resources.put(1580009, mbEnums.ResourceType.AGATE); + MineProduction.GOLD.resources.put(1580010, mbEnums.ResourceType.DIAMOND); + MineProduction.GOLD.resources.put(1580011, mbEnums.ResourceType.ONYX); } if (MineProduction.MAGIC.resources.size() == 0) { - MineProduction.MAGIC.resources.put(7, Enum.ResourceType.GOLD); - MineProduction.MAGIC.resources.put(1580012, Enum.ResourceType.AZOTH); - MineProduction.MAGIC.resources.put(1580013, Enum.ResourceType.ORICHALK); - MineProduction.MAGIC.resources.put(1580014, Enum.ResourceType.ANTIMONY); - MineProduction.MAGIC.resources.put(1580015, Enum.ResourceType.SULFUR); - MineProduction.MAGIC.resources.put(1580016, Enum.ResourceType.QUICKSILVER); + MineProduction.MAGIC.resources.put(7, mbEnums.ResourceType.GOLD); + MineProduction.MAGIC.resources.put(1580012, mbEnums.ResourceType.AZOTH); + MineProduction.MAGIC.resources.put(1580013, mbEnums.ResourceType.ORICHALK); + MineProduction.MAGIC.resources.put(1580014, mbEnums.ResourceType.ANTIMONY); + MineProduction.MAGIC.resources.put(1580015, mbEnums.ResourceType.SULFUR); + MineProduction.MAGIC.resources.put(1580016, mbEnums.ResourceType.QUICKSILVER); } } @@ -78,7 +78,7 @@ public enum MineProduction { return MineProduction.MAGIC; } - public boolean validForMine(Enum.ResourceType r, boolean isXpac) { + public boolean validForMine(mbEnums.ResourceType r, boolean isXpac) { if (r == null) return false; if (this.resources.containsKey(r.templateID)) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 6949a7a3..b8b274a7 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -10,8 +10,6 @@ package engine.objects; import ch.claude_martin.enumbitset.EnumBitSet; -import engine.Enum; -import engine.Enum.*; import engine.InterestManagement.WorldGrid; import engine.exception.SerializationException; import engine.gameManager.*; @@ -20,6 +18,8 @@ import engine.jobs.DeferredPowerJob; import engine.jobs.UpgradeNPCJob; import engine.math.Bounds; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -144,8 +144,8 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { this.runeSet = rs.getInt("runeSet"); this.bootySet = rs.getInt("bootySet"); - this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), Enum.MonsterType.class); - this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), Enum.MonsterType.class); + this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), mbEnums.MonsterType.class); + this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), mbEnums.MonsterType.class); this.firstName = rs.getString("mob_name"); if (rs.getString("fsm").length() > 1) @@ -459,7 +459,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { minionMobile.deathTime = System.currentTimeMillis(); minionMobile.guardCaptain = guardCaptain; minionMobile.spawnDelay = (int) (-2.500 * guardCaptain.building.getRank() + 22.5) * 60; - minionMobile.behaviourType = Enum.MobBehaviourType.GuardMinion; + minionMobile.behaviourType = mbEnums.MobBehaviourType.GuardMinion; minionMobile.agentType = AIAgentType.GUARDMINION; minionMobile.guardedCity = guardCaptain.guardedCity; minionMobile.patrolPoints = guardCaptain.building.patrolPoints; @@ -469,7 +469,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { //grab name from minionbase. - Enum.MinionType minionType = Enum.MinionType.ContractToMinionMap.get(guardCaptain.contract.getContractID()); + mbEnums.MinionType minionType = mbEnums.MinionType.ContractToMinionMap.get(guardCaptain.contract.getContractID()); if (minionType != null) { String rank; @@ -882,7 +882,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { this.hasLoot = false; this.playerAgroMap.clear(); - if (this.behaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()) + if (this.behaviourType.ordinal() == mbEnums.MobBehaviourType.GuardMinion.ordinal()) this.spawnDelay = (int) (-2.500 * this.guardCaptain.building.getRank() + 22.5) * 60; if (this.isPet()) { @@ -897,7 +897,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { dispatch = Dispatch.borrow((PlayerCharacter) this.guardCaptain, petMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } @@ -925,7 +925,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { petOwner.setPet(null); PetMsg petMsg = new PetMsg(5, null); dispatch = Dispatch.borrow(petOwner, petMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } else { diff --git a/src/engine/objects/MobBase.java b/src/engine/objects/MobBase.java index 0901a6fb..03e1cee4 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -10,10 +10,10 @@ package engine.objects; import ch.claude_martin.enumbitset.EnumBitSet; -import engine.Enum; import engine.gameManager.DbManager; import engine.gameManager.LootManager; import engine.loot.BootySetEntry; +import engine.mbEnums; import engine.server.MBServerStatics; import java.sql.ResultSet; @@ -29,16 +29,16 @@ public class MobBase extends AbstractGameObject { private final float scale; public final ArrayList effectsList; public int bootySet; - public Enum.MobBehaviourType fsm; - public EnumBitSet notEnemy; - public EnumBitSet enemy; + public mbEnums.MobBehaviourType fsm; + public EnumBitSet notEnemy; + public EnumBitSet enemy; private float healthMax; private int attackRating; private int defenseRating; private float damageMin; private float damageMax; private float hitBoxRadius; - private EnumBitSet flags; + private EnumBitSet flags; private int mask; private int goldMod; private int seeInvis; @@ -74,11 +74,11 @@ public class MobBase extends AbstractGameObject { this.attackRange = rs.getFloat("attackRange"); this.bootySet = rs.getInt("bootySet"); - this.fsm = Enum.MobBehaviourType.valueOf(rs.getString("fsm")); + this.fsm = mbEnums.MobBehaviourType.valueOf(rs.getString("fsm")); - this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), Enum.MobFlagType.class); - this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), Enum.MonsterType.class); - this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), Enum.MonsterType.class); + this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), mbEnums.MobFlagType.class); + this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), mbEnums.MonsterType.class); + this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), mbEnums.MonsterType.class); this.seeInvis = rs.getInt("seeInvis"); this.scale = rs.getFloat("scale"); @@ -88,19 +88,19 @@ public class MobBase extends AbstractGameObject { if (this.getObjectUUID() == 12021 || this.getObjectUUID() == 12022) this.isNecroPet = true; - if (Enum.MobFlagType.HUMANOID.elementOf(this.flags)) + if (mbEnums.MobFlagType.HUMANOID.elementOf(this.flags)) this.mask += MBServerStatics.MASK_HUMANOID; - if (Enum.MobFlagType.UNDEAD.elementOf(this.flags)) + if (mbEnums.MobFlagType.UNDEAD.elementOf(this.flags)) this.mask += MBServerStatics.MASK_UNDEAD; - if (Enum.MobFlagType.BEAST.elementOf(this.flags)) + if (mbEnums.MobFlagType.BEAST.elementOf(this.flags)) this.mask += MBServerStatics.MASK_BEAST; - if (Enum.MobFlagType.DRAGON.elementOf(this.flags)) + if (mbEnums.MobFlagType.DRAGON.elementOf(this.flags)) this.mask += MBServerStatics.MASK_DRAGON; - if (Enum.MobFlagType.RAT.elementOf(this.flags)) + if (mbEnums.MobFlagType.RAT.elementOf(this.flags)) this.mask += MBServerStatics.MASK_RAT; this.mobBaseStats = DbManager.MobBaseQueries.LOAD_STATS(this.loadID); @@ -110,10 +110,10 @@ public class MobBase extends AbstractGameObject { } - public static ConcurrentHashMap loadEquipmentSet(int equipmentSetID) { + public static ConcurrentHashMap loadEquipmentSet(int equipmentSetID) { ArrayList equipList; - ConcurrentHashMap equip = new ConcurrentHashMap<>(); + ConcurrentHashMap equip = new ConcurrentHashMap<>(); if (equipmentSetID == 0) return equip; @@ -203,7 +203,7 @@ public class MobBase extends AbstractGameObject { return this.defenseRating; } - public EnumBitSet getFlags() { + public EnumBitSet getFlags() { return this.flags; } diff --git a/src/engine/objects/MobLoot.java b/src/engine/objects/MobLoot.java index 0fb7394d..b24a8798 100644 --- a/src/engine/objects/MobLoot.java +++ b/src/engine/objects/MobLoot.java @@ -9,11 +9,11 @@ package engine.objects; -import engine.Enum; -import engine.Enum.ItemType; -import engine.Enum.OwnerType; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; +import engine.mbEnums; +import engine.mbEnums.ItemType; +import engine.mbEnums.OwnerType; import engine.powers.poweractions.AbstractPowerAction; import org.pmw.tinylog.Logger; @@ -38,7 +38,7 @@ public final class MobLoot extends Item { } public MobLoot(AbstractCharacter mob, int qtyOfGold) { - this(mob, ItemTemplate.templates.get(Enum.ResourceType.GOLD.templateID), qtyOfGold, false); + this(mob, ItemTemplate.templates.get(mbEnums.ResourceType.GOLD.templateID), qtyOfGold, false); } public MobLoot(AbstractCharacter mob, ItemTemplate template, int quantity, boolean noSteal) { @@ -68,7 +68,7 @@ public final class MobLoot extends Item { * @return MobLoot object */ public static MobLoot getFromCache(int id) { - return (MobLoot) DbManager.getFromCache(Enum.GameObjectType.MobLoot, id); + return (MobLoot) DbManager.getFromCache(mbEnums.GameObjectType.MobLoot, id); } /** @@ -114,7 +114,7 @@ public final class MobLoot extends Item { Item item = this; item.setOwner(looter); - item.containerType = Enum.ItemContainerType.INVENTORY; + item.containerType = mbEnums.ItemContainerType.INVENTORY; item.setValue(0); if (this.getNumOfItems() > 1) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index a5263292..c02536f9 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -9,8 +9,6 @@ package engine.objects; -import engine.Enum; -import engine.Enum.*; import engine.InterestManagement.WorldGrid; import engine.exception.SerializationException; import engine.gameManager.*; @@ -20,6 +18,8 @@ import engine.jobs.UpgradeNPCJob; import engine.math.Bounds; import engine.math.Vector3f; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -671,7 +671,7 @@ public class NPC extends AbstractCharacter { PetMsg petMsg = new PetMsg(5, null); Dispatch dispatch = Dispatch.borrow(petOwner, petMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } @@ -940,7 +940,7 @@ public class NPC extends AbstractCharacter { ml.setValue(producedItem.getValue()); ml.setDateToUpgrade(producedItem.getDateToUpgrade().getMillis()); - ml.containerType = Enum.ItemContainerType.FORGE; + ml.containerType = mbEnums.ItemContainerType.FORGE; this.addItemToForge(ml); } else { @@ -956,7 +956,7 @@ public class NPC extends AbstractCharacter { } ml.setDateToUpgrade(producedItem.getDateToUpgrade().getMillis()); - ml.containerType = Enum.ItemContainerType.INVENTORY; + ml.containerType = mbEnums.ItemContainerType.INVENTORY; ml.flags.add(ItemFlags.Identified); this.charItemManager.addItemToInventory(ml); diff --git a/src/engine/objects/NPCProfits.java b/src/engine/objects/NPCProfits.java index 280be130..563eb963 100644 --- a/src/engine/objects/NPCProfits.java +++ b/src/engine/objects/NPCProfits.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.Enum.ProfitType; import engine.gameManager.DbManager; +import engine.mbEnums.ProfitType; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/src/engine/objects/PlayerBonuses.java b/src/engine/objects/PlayerBonuses.java index 965217dc..d5532172 100644 --- a/src/engine/objects/PlayerBonuses.java +++ b/src/engine/objects/PlayerBonuses.java @@ -9,12 +9,12 @@ package engine.objects; -import engine.Enum; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.gameManager.ChatManager; import engine.gameManager.ConfigManager; import engine.gameManager.PowersManager; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.powers.DamageShield; import engine.powers.EffectsBase; import engine.powers.effectmodifiers.AbstractEffectModifier; @@ -53,7 +53,7 @@ public class PlayerBonuses { public static void InitializeBonuses(PlayerCharacter player) { if (player.bonuses == null) return; - if (ConfigManager.serverType.equals(Enum.ServerType.LOGINSERVER)) + if (ConfigManager.serverType.equals(mbEnums.ServerType.LOGINSERVER)) return; player.bonuses.calculateRuneBaseEffects(player); @@ -61,9 +61,9 @@ public class PlayerBonuses { public static PlayerBonuses grantBonuses(AbstractCharacter ac) { - if (ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) + if (ac.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) return new PlayerBonuses((PlayerCharacter) ac); - else if (ac.getObjectType().equals(Enum.GameObjectType.Mob)) + else if (ac.getObjectType().equals(mbEnums.GameObjectType.Mob)) return new PlayerBonuses((Mob) ac); else return null; diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 1a29f3a7..6b4c35db 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -9,8 +9,6 @@ package engine.objects; -import engine.Enum; -import engine.Enum.*; import engine.InterestManagement.InterestManager; import engine.InterestManagement.RealmMap; import engine.InterestManagement.Terrain; @@ -29,6 +27,8 @@ import engine.jobs.NoTimeJob; import engine.math.Bounds; import engine.math.FastMath; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -364,7 +364,7 @@ public class PlayerCharacter extends AbstractCharacter { writer.putInt(0); // Pad writer.putInt(playerCharacter.subRaceID); - writer.putInt(Enum.GameObjectType.Race.ordinal()); + writer.putInt(mbEnums.GameObjectType.Race.ordinal()); writer.putInt(playerCharacter.subRaceID); } else playerCharacter.race.serializeForClientMsg(writer); @@ -2156,14 +2156,14 @@ public class PlayerCharacter extends AbstractCharacter { //handle rented room binds. if (bindBuilding == null) { - bindLocation = Enum.Ruins.getRandomRuin().getLocation(); + bindLocation = mbEnums.Ruins.getRandomRuin().getLocation(); return bindLocation; } bindLocation = BuildingManager.GetBindLocationForBuilding(bindBuilding); if (bindLocation == null) - bindLocation = Enum.Ruins.getRandomRuin().getLocation(); + bindLocation = mbEnums.Ruins.getRandomRuin().getLocation(); return bindLocation; @@ -4030,7 +4030,7 @@ public class PlayerCharacter extends AbstractCharacter { //assign enum values for restrictions String race = this.race.getName().replace("-", "").replace(", Male", "").replace(", Female", ""); - this.absRace = Enum.MonsterType.valueOf(race); + this.absRace = mbEnums.MonsterType.valueOf(race); if (this.baseClass != null) this.absBaseClass = ClassType.valueOf(this.baseClass.getName()); diff --git a/src/engine/objects/PlayerFriends.java b/src/engine/objects/PlayerFriends.java index 97405333..1acc20cf 100644 --- a/src/engine/objects/PlayerFriends.java +++ b/src/engine/objects/PlayerFriends.java @@ -9,9 +9,9 @@ package engine.objects; -import engine.Enum.DispatchChannel; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; +import engine.mbEnums.DispatchChannel; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.msg.UpdateFriendStatusMessage; diff --git a/src/engine/objects/Portal.java b/src/engine/objects/Portal.java index 19564ecb..63ca6a07 100644 --- a/src/engine/objects/Portal.java +++ b/src/engine/objects/Portal.java @@ -1,12 +1,12 @@ package engine.objects; -import engine.Enum; -import engine.Enum.PortalType; import engine.InterestManagement.WorldGrid; import engine.gameManager.ConfigManager; import engine.job.JobScheduler; import engine.jobs.CloseGateJob; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.PortalType; import engine.server.MBServerStatics; import java.util.HashSet; @@ -19,7 +19,7 @@ import java.util.HashSet; public class Portal { public final Vector3fImmutable portalLocation; - public Enum.PortalType portalType; + public mbEnums.PortalType portalType; public Building sourceGate; public Building targetGate; private boolean active; diff --git a/src/engine/objects/ProducedItem.java b/src/engine/objects/ProducedItem.java index 8ebfe4ff..e999fb44 100644 --- a/src/engine/objects/ProducedItem.java +++ b/src/engine/objects/ProducedItem.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.Enum.DispatchChannel; import engine.gameManager.PowersManager; +import engine.mbEnums.DispatchChannel; import engine.net.DispatchMessage; import engine.net.client.msg.ItemProductionMsg; import engine.powers.EffectsBase; diff --git a/src/engine/objects/PromotionClass.java b/src/engine/objects/PromotionClass.java index 08e476f3..c959a284 100644 --- a/src/engine/objects/PromotionClass.java +++ b/src/engine/objects/PromotionClass.java @@ -9,8 +9,8 @@ package engine.objects; -import engine.Enum.GameObjectType; import engine.gameManager.DbManager; +import engine.mbEnums.GameObjectType; import engine.net.ByteBufferWriter; import java.sql.ResultSet; diff --git a/src/engine/objects/Race.java b/src/engine/objects/Race.java index 93ef9426..1023e02c 100644 --- a/src/engine/objects/Race.java +++ b/src/engine/objects/Race.java @@ -9,9 +9,9 @@ package engine.objects; -import engine.Enum; -import engine.Enum.RaceType; import engine.gameManager.DbManager; +import engine.mbEnums; +import engine.mbEnums.RaceType; import engine.net.ByteBufferWriter; import engine.server.MBServerStatics; @@ -57,7 +57,7 @@ public class Race { private final ArrayList baseClasses; private final ArrayList skillsGranted; private final ArrayList powersGranted; - private Enum.RaceType raceType; + private mbEnums.RaceType raceType; private int token = 0; private HashSet hairStyles; private HashSet beardStyles; @@ -69,7 +69,7 @@ public class Race { public Race(ResultSet rs) throws SQLException { this.raceRuneID = rs.getInt("ID"); - this.raceType = Enum.RaceType.getRaceTypebyRuneID(raceRuneID); + this.raceType = mbEnums.RaceType.getRaceTypebyRuneID(raceRuneID); this.name = rs.getString("name"); this.description = rs.getString("description"); this.strStart = rs.getShort("strStart"); @@ -335,7 +335,7 @@ public class Race { writer.putInt(0); // Pad writer.putInt(this.raceRuneID); - writer.putInt(Enum.GameObjectType.Race.ordinal()); + writer.putInt(mbEnums.GameObjectType.Race.ordinal()); writer.putInt(raceRuneID); } @@ -343,7 +343,7 @@ public class Race { return raceRuneID; } - public Enum.RaceType getRaceType() { + public mbEnums.RaceType getRaceType() { return raceType; } diff --git a/src/engine/objects/Realm.java b/src/engine/objects/Realm.java index e254b762..e27aed2d 100644 --- a/src/engine/objects/Realm.java +++ b/src/engine/objects/Realm.java @@ -9,7 +9,6 @@ package engine.objects; -import engine.Enum; import engine.InterestManagement.RealmMap; import engine.InterestManagement.WorldGrid; import engine.db.archive.DataWarehouse; @@ -18,6 +17,7 @@ import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.GuildManager; import engine.gameManager.PowersManager; +import engine.mbEnums; import engine.net.ByteBufferWriter; import engine.net.client.msg.ErrorPopupMsg; import engine.powers.PowersBase; @@ -32,7 +32,7 @@ import java.time.ZoneId; import java.util.HashSet; import java.util.concurrent.ConcurrentHashMap; -import static engine.Enum.CharterType; +import static engine.mbEnums.CharterType; public class Realm { @@ -234,27 +234,27 @@ public class Realm { return false; } - resourceValue = warehouse.resources.get(Enum.ResourceType.GOLD); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.GOLD); if (resourceValue < 5000000) hasResources = false; - resourceValue = warehouse.resources.get(Enum.ResourceType.STONE); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.STONE); if (resourceValue < 8000) hasResources = false; - resourceValue = warehouse.resources.get(Enum.ResourceType.LUMBER); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.LUMBER); if (resourceValue < 8000) hasResources = false; - resourceValue = warehouse.resources.get(Enum.ResourceType.GALVOR); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.GALVOR); if (resourceValue < 15) hasResources = false; - resourceValue = warehouse.resources.get(Enum.ResourceType.WORMWOOD); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.WORMWOOD); if (resourceValue < 15) hasResources = false; @@ -266,50 +266,50 @@ public class Realm { // Remove resources from warehouse before claiming realm - resourceValue = warehouse.resources.get(Enum.ResourceType.GOLD); - warehouse.resources.put(Enum.ResourceType.GOLD, resourceValue - 5000000); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.GOLD); + warehouse.resources.put(mbEnums.ResourceType.GOLD, resourceValue - 5000000); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { Logger.error("gold update failed for warehouse of city:" + warehouse.city.getName()); - warehouse.resources.put(Enum.ResourceType.GOLD, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.GOLD, resourceValue); return false; } - Warehouse.AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, tol.getObjectUUID(), Enum.TransactionType.WITHDRAWL, Enum.ResourceType.GOLD, 5000000); + Warehouse.AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, tol.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, mbEnums.ResourceType.GOLD, 5000000); - resourceValue = warehouse.resources.get(Enum.ResourceType.STONE); - warehouse.resources.put(Enum.ResourceType.STONE, resourceValue - 8000); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.STONE); + warehouse.resources.put(mbEnums.ResourceType.STONE, resourceValue - 8000); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { Logger.error("stone update failed for warehouse of city:" + warehouse.city.getName()); - warehouse.resources.put(Enum.ResourceType.STONE, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.STONE, resourceValue); return false; } - resourceValue = warehouse.resources.get(Enum.ResourceType.LUMBER); - warehouse.resources.put(Enum.ResourceType.LUMBER, resourceValue - 8000); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.LUMBER); + warehouse.resources.put(mbEnums.ResourceType.LUMBER, resourceValue - 8000); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { Logger.error("lumber update failed for warehouse of city:" + warehouse.city.getName()); - warehouse.resources.put(Enum.ResourceType.LUMBER, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.LUMBER, resourceValue); return false; } - resourceValue = warehouse.resources.get(Enum.ResourceType.GALVOR); - warehouse.resources.put(Enum.ResourceType.GALVOR, resourceValue - 15); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.GALVOR); + warehouse.resources.put(mbEnums.ResourceType.GALVOR, resourceValue - 15); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { Logger.error("GALVOR update failed for warehouse of city:" + warehouse.city.getName()); - warehouse.resources.put(Enum.ResourceType.GALVOR, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.GALVOR, resourceValue); return false; } - resourceValue = warehouse.resources.get(Enum.ResourceType.WORMWOOD); - warehouse.resources.put(Enum.ResourceType.WORMWOOD, resourceValue - 15); + resourceValue = warehouse.resources.get(mbEnums.ResourceType.WORMWOOD); + warehouse.resources.put(mbEnums.ResourceType.WORMWOOD, resourceValue - 15); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { Logger.error("WORMWOOD update failed for warehouse of city:" + warehouse.city.getName()); - warehouse.resources.put(Enum.ResourceType.WORMWOOD, resourceValue); + warehouse.resources.put(mbEnums.ResourceType.WORMWOOD, resourceValue); return false; } @@ -323,7 +323,7 @@ public class Realm { if (building.getBlueprintUUID() != 0) { // TOL Health set through regular linear equation - if (building.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.TOL) { + if (building.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.TOL) { continue; } @@ -442,13 +442,13 @@ public class Realm { writer.putString(this.realmName); if (isRuled() == true) { - writer.putInt(Enum.GameObjectType.Guild.ordinal()); + writer.putInt(mbEnums.GameObjectType.Guild.ordinal()); writer.putInt(rulingNationUUID); writer.putInt(rulingCharacterOrdinal); writer.putInt(rulingCharacterUUID); - writer.putInt(Enum.GameObjectType.City.ordinal()); + writer.putInt(mbEnums.GameObjectType.City.ordinal()); writer.putInt(rulingCityUUID); writer.putLocalDateTime(this.ruledSince); @@ -505,7 +505,7 @@ public class Realm { // Push event to warehouse - RealmRecord realmRecord = RealmRecord.borrow(this, Enum.RecordEventType.LOST); + RealmRecord realmRecord = RealmRecord.borrow(this, mbEnums.RecordEventType.LOST); DataWarehouse.pushToWarehouse(realmRecord); // No longer own a realm @@ -532,7 +532,7 @@ public class Realm { // Push event to warehouse - RealmRecord realmRecord = RealmRecord.borrow(this, Enum.RecordEventType.CAPTURE); + RealmRecord realmRecord = RealmRecord.borrow(this, mbEnums.RecordEventType.CAPTURE); DataWarehouse.pushToWarehouse(realmRecord); } diff --git a/src/engine/objects/Resists.java b/src/engine/objects/Resists.java index 912ed11e..1a6de59c 100644 --- a/src/engine/objects/Resists.java +++ b/src/engine/objects/Resists.java @@ -9,9 +9,9 @@ package engine.objects; -import engine.Enum; -import engine.Enum.ModType; -import engine.Enum.SourceType; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.server.MBServerStatics; @@ -26,9 +26,9 @@ import java.util.concurrent.ConcurrentHashMap; public class Resists { private static ConcurrentHashMap mobResists = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); - private ConcurrentHashMap resists = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); - private ConcurrentHashMap immuneTo = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); - private Enum.DamageType protection; + private ConcurrentHashMap resists = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); + private ConcurrentHashMap immuneTo = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); + private mbEnums.DamageType protection; private int protectionTrains = 0; private boolean immuneToAll; @@ -51,9 +51,9 @@ public class Resists { } public Resists(Resists r) { - for (Enum.DamageType dt : r.resists.keySet()) + for (mbEnums.DamageType dt : r.resists.keySet()) this.resists.put(dt, r.resists.get(dt)); - for (Enum.DamageType dt : r.immuneTo.keySet()) + for (mbEnums.DamageType dt : r.immuneTo.keySet()) this.immuneTo.put(dt, r.immuneTo.get(dt)); this.protection = r.protection; this.protectionTrains = r.protectionTrains; @@ -83,30 +83,30 @@ public class Resists { */ public Resists(ResultSet rs) throws SQLException { this.immuneToAll = false; - this.resists.put(Enum.DamageType.SLASHING, rs.getFloat("slash")); - this.resists.put(Enum.DamageType.CRUSHING, rs.getFloat("crush")); - this.resists.put(Enum.DamageType.PIERCING, rs.getFloat("pierce")); - this.resists.put(Enum.DamageType.MAGIC, rs.getFloat("magic")); - this.resists.put(Enum.DamageType.BLEEDING, rs.getFloat("bleed")); - this.resists.put(Enum.DamageType.POISON, rs.getFloat("poison")); - this.resists.put(Enum.DamageType.MENTAL, rs.getFloat("mental")); - this.resists.put(Enum.DamageType.HOLY, rs.getFloat("holy")); - this.resists.put(Enum.DamageType.UNHOLY, rs.getFloat("unholy")); - this.resists.put(Enum.DamageType.LIGHTNING, rs.getFloat("lightning")); - this.resists.put(Enum.DamageType.FIRE, rs.getFloat("fire")); - this.resists.put(Enum.DamageType.COLD, rs.getFloat("cold")); - this.resists.put(Enum.DamageType.HEALING, 0f); + this.resists.put(mbEnums.DamageType.SLASHING, rs.getFloat("slash")); + this.resists.put(mbEnums.DamageType.CRUSHING, rs.getFloat("crush")); + this.resists.put(mbEnums.DamageType.PIERCING, rs.getFloat("pierce")); + this.resists.put(mbEnums.DamageType.MAGIC, rs.getFloat("magic")); + this.resists.put(mbEnums.DamageType.BLEEDING, rs.getFloat("bleed")); + this.resists.put(mbEnums.DamageType.POISON, rs.getFloat("poison")); + this.resists.put(mbEnums.DamageType.MENTAL, rs.getFloat("mental")); + this.resists.put(mbEnums.DamageType.HOLY, rs.getFloat("holy")); + this.resists.put(mbEnums.DamageType.UNHOLY, rs.getFloat("unholy")); + this.resists.put(mbEnums.DamageType.LIGHTNING, rs.getFloat("lightning")); + this.resists.put(mbEnums.DamageType.FIRE, rs.getFloat("fire")); + this.resists.put(mbEnums.DamageType.COLD, rs.getFloat("cold")); + this.resists.put(mbEnums.DamageType.HEALING, 0f); } //Handle Fortitudes - private static float handleFortitude(AbstractCharacter target, Enum.DamageType type, float damage) { - if (target == null || !(target.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + private static float handleFortitude(AbstractCharacter target, mbEnums.DamageType type, float damage) { + if (target == null || !(target.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return damage; PlayerBonuses bonus = target.getBonuses(); //see if there is a fortitude float damageCap = bonus.getFloatPercentAll(ModType.DamageCap, SourceType.None); - if (damageCap == 0f || type == Enum.DamageType.HEALING) + if (damageCap == 0f || type == mbEnums.DamageType.HEALING) return damage; //is fortitude, Are we under the cap? @@ -133,11 +133,11 @@ public class Resists { } //Test if Damagetype is valid for foritude - private static boolean isValidDamageCapType(HashSet forts, Enum.DamageType damageType, boolean exclusive) { + private static boolean isValidDamageCapType(HashSet forts, mbEnums.DamageType damageType, boolean exclusive) { for (SourceType fort : forts) { - Enum.DamageType dt = Enum.DamageType.getDamageType(fort.name()); + mbEnums.DamageType dt = mbEnums.DamageType.getDamageType(fort.name()); - if (dt.equals(Enum.DamageType.NONE)) + if (dt.equals(mbEnums.DamageType.NONE)) continue; if (dt.equals(damageType)) { @@ -162,7 +162,7 @@ public class Resists { if (armor == null) return phys; - if (armor.template.item_type.equals(Enum.ItemType.ARMOR)) { + if (armor.template.item_type.equals(mbEnums.ItemType.ARMOR)) { phys[0] += armor.template.combat_attack_resist.get("SLASHING"); phys[1] += armor.template.combat_attack_resist.get("CRUSHING"); phys[2] += armor.template.combat_attack_resist.get("PIERCING"); @@ -195,19 +195,19 @@ public class Resists { */ public final void setBuildingResists() { this.immuneToAll = false; - this.resists.put(Enum.DamageType.SLASHING, 85f); - this.resists.put(Enum.DamageType.CRUSHING, 85f); - this.resists.put(Enum.DamageType.SIEGE, 0f); - this.immuneTo.put(Enum.DamageType.PIERCING, true); - this.immuneTo.put(Enum.DamageType.MAGIC, true); - this.immuneTo.put(Enum.DamageType.BLEEDING, true); - this.immuneTo.put(Enum.DamageType.POISON, true); - this.immuneTo.put(Enum.DamageType.MENTAL, true); - this.immuneTo.put(Enum.DamageType.HOLY, true); - this.immuneTo.put(Enum.DamageType.UNHOLY, true); - this.immuneTo.put(Enum.DamageType.LIGHTNING, true); - this.immuneTo.put(Enum.DamageType.FIRE, true); - this.immuneTo.put(Enum.DamageType.COLD, true); + this.resists.put(mbEnums.DamageType.SLASHING, 85f); + this.resists.put(mbEnums.DamageType.CRUSHING, 85f); + this.resists.put(mbEnums.DamageType.SIEGE, 0f); + this.immuneTo.put(mbEnums.DamageType.PIERCING, true); + this.immuneTo.put(mbEnums.DamageType.MAGIC, true); + this.immuneTo.put(mbEnums.DamageType.BLEEDING, true); + this.immuneTo.put(mbEnums.DamageType.POISON, true); + this.immuneTo.put(mbEnums.DamageType.MENTAL, true); + this.immuneTo.put(mbEnums.DamageType.HOLY, true); + this.immuneTo.put(mbEnums.DamageType.UNHOLY, true); + this.immuneTo.put(mbEnums.DamageType.LIGHTNING, true); + this.immuneTo.put(mbEnums.DamageType.FIRE, true); + this.immuneTo.put(mbEnums.DamageType.COLD, true); } @@ -216,19 +216,19 @@ public class Resists { */ public final void setMineResists() { this.immuneToAll = false; - this.immuneTo.put(Enum.DamageType.SLASHING, true); - this.immuneTo.put(Enum.DamageType.CRUSHING, true); - this.immuneTo.put(Enum.DamageType.PIERCING, true); - this.immuneTo.put(Enum.DamageType.MAGIC, true); - this.immuneTo.put(Enum.DamageType.BLEEDING, true); - this.immuneTo.put(Enum.DamageType.POISON, true); - this.immuneTo.put(Enum.DamageType.MENTAL, true); - this.immuneTo.put(Enum.DamageType.HOLY, true); - this.immuneTo.put(Enum.DamageType.UNHOLY, true); - this.immuneTo.put(Enum.DamageType.LIGHTNING, true); - this.immuneTo.put(Enum.DamageType.FIRE, true); - this.immuneTo.put(Enum.DamageType.COLD, true); - this.resists.put(Enum.DamageType.SIEGE, 0f); + this.immuneTo.put(mbEnums.DamageType.SLASHING, true); + this.immuneTo.put(mbEnums.DamageType.CRUSHING, true); + this.immuneTo.put(mbEnums.DamageType.PIERCING, true); + this.immuneTo.put(mbEnums.DamageType.MAGIC, true); + this.immuneTo.put(mbEnums.DamageType.BLEEDING, true); + this.immuneTo.put(mbEnums.DamageType.POISON, true); + this.immuneTo.put(mbEnums.DamageType.MENTAL, true); + this.immuneTo.put(mbEnums.DamageType.HOLY, true); + this.immuneTo.put(mbEnums.DamageType.UNHOLY, true); + this.immuneTo.put(mbEnums.DamageType.LIGHTNING, true); + this.immuneTo.put(mbEnums.DamageType.FIRE, true); + this.immuneTo.put(mbEnums.DamageType.COLD, true); + this.resists.put(mbEnums.DamageType.SIEGE, 0f); } /** @@ -236,27 +236,27 @@ public class Resists { */ public final void setGenericResists() { this.immuneToAll = false; - this.resists.put(Enum.DamageType.SLASHING, 0f); - this.resists.put(Enum.DamageType.CRUSHING, 0f); - this.resists.put(Enum.DamageType.PIERCING, 0f); - this.resists.put(Enum.DamageType.MAGIC, 0f); - this.resists.put(Enum.DamageType.BLEEDING, 0f); - this.resists.put(Enum.DamageType.POISON, 0f); - this.resists.put(Enum.DamageType.MENTAL, 0f); - this.resists.put(Enum.DamageType.HOLY, 0f); - this.resists.put(Enum.DamageType.UNHOLY, 0f); - this.resists.put(Enum.DamageType.LIGHTNING, 0f); - this.resists.put(Enum.DamageType.FIRE, 0f); - this.resists.put(Enum.DamageType.COLD, 0f); - this.resists.put(Enum.DamageType.HEALING, 0f); - this.immuneTo.put(Enum.DamageType.SIEGE, true); + this.resists.put(mbEnums.DamageType.SLASHING, 0f); + this.resists.put(mbEnums.DamageType.CRUSHING, 0f); + this.resists.put(mbEnums.DamageType.PIERCING, 0f); + this.resists.put(mbEnums.DamageType.MAGIC, 0f); + this.resists.put(mbEnums.DamageType.BLEEDING, 0f); + this.resists.put(mbEnums.DamageType.POISON, 0f); + this.resists.put(mbEnums.DamageType.MENTAL, 0f); + this.resists.put(mbEnums.DamageType.HOLY, 0f); + this.resists.put(mbEnums.DamageType.UNHOLY, 0f); + this.resists.put(mbEnums.DamageType.LIGHTNING, 0f); + this.resists.put(mbEnums.DamageType.FIRE, 0f); + this.resists.put(mbEnums.DamageType.COLD, 0f); + this.resists.put(mbEnums.DamageType.HEALING, 0f); + this.immuneTo.put(mbEnums.DamageType.SIEGE, true); } /** * Get a resist */ - public float getResist(Enum.DamageType type, int trains) { + public float getResist(mbEnums.DamageType type, int trains) { //get resisted amount Float amount = 0f; if (this.resists.containsKey(type)) @@ -278,7 +278,7 @@ public class Resists { /** * get immuneTo */ - public boolean immuneTo(Enum.DamageType type) { + public boolean immuneTo(mbEnums.DamageType type) { if (this.immuneTo.containsKey(type)) return this.immuneTo.get(type); else @@ -293,13 +293,13 @@ public class Resists { } public boolean immuneToAttacks() { - return immuneTo(Enum.DamageType.ATTACK); + return immuneTo(mbEnums.DamageType.ATTACK); } /** * Set a resist */ - public void setResist(Enum.DamageType type, float value) { + public void setResist(mbEnums.DamageType type, float value) { this.resists.put(type, value); } @@ -322,7 +322,7 @@ public class Resists { * get Damage after resist * Expects heals as negative damage and damage as positive damage for fortitudes. */ - public float getResistedDamage(AbstractCharacter source, AbstractCharacter target, Enum.DamageType type, float damage, int trains) { + public float getResistedDamage(AbstractCharacter source, AbstractCharacter target, mbEnums.DamageType type, float damage, int trains) { //handle fortitudes damage = handleFortitude(target, type, damage); @@ -347,25 +347,25 @@ public class Resists { if (rb != null) { // Handle immunities if (rb.getBool(ModType.ImmuneTo, SourceType.Stun)) - this.immuneTo.put(Enum.DamageType.STUN, true); + this.immuneTo.put(mbEnums.DamageType.STUN, true); if (rb.getBool(ModType.ImmuneTo, SourceType.Blind)) - this.immuneTo.put(Enum.DamageType.BLIND, true); + this.immuneTo.put(mbEnums.DamageType.BLIND, true); if (rb.getBool(ModType.ImmuneToAttack, SourceType.None)) - this.immuneTo.put(Enum.DamageType.ATTACK, true); + this.immuneTo.put(mbEnums.DamageType.ATTACK, true); if (rb.getBool(ModType.ImmuneToPowers, SourceType.None)) - this.immuneTo.put(Enum.DamageType.POWERS, true); + this.immuneTo.put(mbEnums.DamageType.POWERS, true); if (rb.getBool(ModType.ImmuneTo, SourceType.Powerblock)) - this.immuneTo.put(Enum.DamageType.POWERBLOCK, true); + this.immuneTo.put(mbEnums.DamageType.POWERBLOCK, true); if (rb.getBool(ModType.ImmuneTo, SourceType.DeBuff)) - this.immuneTo.put(Enum.DamageType.DEBUFF, true); + this.immuneTo.put(mbEnums.DamageType.DEBUFF, true); if (rb.getBool(ModType.ImmuneTo, SourceType.Fear)) - this.immuneTo.put(Enum.DamageType.FEAR, true); + this.immuneTo.put(mbEnums.DamageType.FEAR, true); if (rb.getBool(ModType.ImmuneTo, SourceType.Charm)) - this.immuneTo.put(Enum.DamageType.CHARM, true); + this.immuneTo.put(mbEnums.DamageType.CHARM, true); if (rb.getBool(ModType.ImmuneTo, SourceType.Root)) - this.immuneTo.put(Enum.DamageType.ROOT, true); + this.immuneTo.put(mbEnums.DamageType.ROOT, true); if (rb.getBool(ModType.ImmuneTo, SourceType.Snare)) - this.immuneTo.put(Enum.DamageType.SNARE, true); + this.immuneTo.put(mbEnums.DamageType.SNARE, true); // Handle resists slash += rb.getFloat(ModType.Resistance, SourceType.Slashing); @@ -385,18 +385,18 @@ public class Resists { } // get resists from equipment - if (ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (ac.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { if (ac.charItemManager != null && ac.charItemManager.getEquipped() != null) { float[] phys = {0f, 0f, 0f}; - ConcurrentHashMap equip = ac.charItemManager.getEquipped(); + ConcurrentHashMap equip = ac.charItemManager.getEquipped(); // get base physical resists - phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.HELM), phys); - phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.CHEST), phys); - phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.UPARM), phys); - phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.HANDS), phys); - phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.LEGS), phys); - phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.FEET), phys); + phys = Resists.getArmorResists(equip.get(mbEnums.EquipSlotType.HELM), phys); + phys = Resists.getArmorResists(equip.get(mbEnums.EquipSlotType.CHEST), phys); + phys = Resists.getArmorResists(equip.get(mbEnums.EquipSlotType.UPARM), phys); + phys = Resists.getArmorResists(equip.get(mbEnums.EquipSlotType.HANDS), phys); + phys = Resists.getArmorResists(equip.get(mbEnums.EquipSlotType.LEGS), phys); + phys = Resists.getArmorResists(equip.get(mbEnums.EquipSlotType.FEET), phys); slash += phys[0]; crush += phys[1]; pierce += phys[2]; @@ -404,30 +404,30 @@ public class Resists { } } - this.resists.put(Enum.DamageType.SLASHING, slash); - this.resists.put(Enum.DamageType.CRUSHING, crush); - this.resists.put(Enum.DamageType.PIERCING, pierce); - this.resists.put(Enum.DamageType.MAGIC, magic); - this.resists.put(Enum.DamageType.BLEEDING, bleed); - this.resists.put(Enum.DamageType.POISON, poison); - this.resists.put(Enum.DamageType.MENTAL, mental); - this.resists.put(Enum.DamageType.HOLY, holy); - this.resists.put(Enum.DamageType.UNHOLY, unholy); - this.resists.put(Enum.DamageType.LIGHTNING, lightning); - this.resists.put(Enum.DamageType.FIRE, fire); - this.resists.put(Enum.DamageType.COLD, cold); - this.resists.put(Enum.DamageType.HEALING, healing); - - this.immuneTo.put(Enum.DamageType.SIEGE, true); + this.resists.put(mbEnums.DamageType.SLASHING, slash); + this.resists.put(mbEnums.DamageType.CRUSHING, crush); + this.resists.put(mbEnums.DamageType.PIERCING, pierce); + this.resists.put(mbEnums.DamageType.MAGIC, magic); + this.resists.put(mbEnums.DamageType.BLEEDING, bleed); + this.resists.put(mbEnums.DamageType.POISON, poison); + this.resists.put(mbEnums.DamageType.MENTAL, mental); + this.resists.put(mbEnums.DamageType.HOLY, holy); + this.resists.put(mbEnums.DamageType.UNHOLY, unholy); + this.resists.put(mbEnums.DamageType.LIGHTNING, lightning); + this.resists.put(mbEnums.DamageType.FIRE, fire); + this.resists.put(mbEnums.DamageType.COLD, cold); + this.resists.put(mbEnums.DamageType.HEALING, healing); + + this.immuneTo.put(mbEnums.DamageType.SIEGE, true); // debug printing of resists // printResists(pc); } public void printResistsToClient(PlayerCharacter pc) { - for (Enum.DamageType dt : resists.keySet()) + for (mbEnums.DamageType dt : resists.keySet()) ChatManager.chatSystemInfo(pc, " resist." + dt.name() + ": " + resists.get(dt)); - for (Enum.DamageType dt : immuneTo.keySet()) + for (mbEnums.DamageType dt : immuneTo.keySet()) ChatManager.chatSystemInfo(pc, " immuneTo." + dt.name() + ": " + immuneTo.get(dt)); ChatManager.chatSystemInfo(pc, " immuneToAll: " + this.immuneToAll); if (protection != null) @@ -440,9 +440,9 @@ public class Resists { String out = pc.getName(); out += "Resists: "; - Iterator it = this.resists.keySet().iterator(); + Iterator it = this.resists.keySet().iterator(); while (it.hasNext()) { - Enum.DamageType damType = it.next(); + mbEnums.DamageType damType = it.next(); String dtName = damType.name(); out += dtName + '=' + this.resists.get(dtName) + ", "; } @@ -450,7 +450,7 @@ public class Resists { out += "ImmuneTo: "; it = this.immuneTo.keySet().iterator(); while (it.hasNext()) { - Enum.DamageType damType = it.next(); + mbEnums.DamageType damType = it.next(); String dtName = damType.name(); out += dtName + '=' + this.resists.get(dtName) + ", "; diff --git a/src/engine/objects/RuneBase.java b/src/engine/objects/RuneBase.java index 39950a6b..6f8b8d71 100644 --- a/src/engine/objects/RuneBase.java +++ b/src/engine/objects/RuneBase.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.net.ByteBufferWriter; import engine.server.MBServerStatics; @@ -83,7 +83,7 @@ public class RuneBase extends AbstractGameObject { if (tableId == 0) return null; - RuneBase rb = (RuneBase) DbManager.getFromCache(Enum.GameObjectType.RuneBase, tableId); + RuneBase rb = (RuneBase) DbManager.getFromCache(mbEnums.GameObjectType.RuneBase, tableId); if (rb != null) return rb; diff --git a/src/engine/objects/RuneBaseAttribute.java b/src/engine/objects/RuneBaseAttribute.java index 82e93b22..6629a053 100644 --- a/src/engine/objects/RuneBaseAttribute.java +++ b/src/engine/objects/RuneBaseAttribute.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.gameManager.DbManager; import java.sql.ResultSet; diff --git a/src/engine/objects/Runegate.java b/src/engine/objects/Runegate.java index 673df36c..d771b1b9 100644 --- a/src/engine/objects/Runegate.java +++ b/src/engine/objects/Runegate.java @@ -1,6 +1,6 @@ package engine.objects; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.net.ByteBufferWriter; @@ -32,9 +32,9 @@ public class Runegate { // Chaos, Khar and Oblivion are on by default - _portals[Enum.PortalType.CHAOS.ordinal()].activate(false); - _portals[Enum.PortalType.OBLIV.ordinal()].activate(false); - _portals[Enum.PortalType.MERCHANT.ordinal()].activate(false); + _portals[mbEnums.PortalType.CHAOS.ordinal()].activate(false); + _portals[mbEnums.PortalType.OBLIV.ordinal()].activate(false); + _portals[mbEnums.PortalType.MERCHANT.ordinal()].activate(false); } @@ -46,7 +46,7 @@ public class Runegate { for (int gateID : gateList) { - Building gateBuilding = (Building) DbManager.getObject(Enum.GameObjectType.Building, gateID); + Building gateBuilding = (Building) DbManager.getObject(mbEnums.GameObjectType.Building, gateID); Runegate runegate = new Runegate(gateBuilding); _runegates.put(gateID, runegate); @@ -68,13 +68,13 @@ public class Runegate { return openGateIDStrings; } - public void activatePortal(Enum.PortalType portalType) { + public void activatePortal(mbEnums.PortalType portalType) { this._portals[portalType.ordinal()].activate(true); } - public void deactivatePortal(Enum.PortalType portalType) { + public void deactivatePortal(mbEnums.PortalType portalType) { this._portals[portalType.ordinal()].deactivate(); diff --git a/src/engine/objects/Shrine.java b/src/engine/objects/Shrine.java index a868841f..9b7ac5ae 100644 --- a/src/engine/objects/Shrine.java +++ b/src/engine/objects/Shrine.java @@ -9,9 +9,9 @@ package engine.objects; -import engine.Enum; -import engine.Enum.BuildingGroup; -import engine.Enum.ShrineType; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.ShrineType; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import org.pmw.tinylog.Logger; @@ -218,7 +218,7 @@ public class Shrine extends AbstractWorldObject implements Comparable { if (shrine != null) { shrine.shrineType.RemoveShrineFromServerList(shrine); Shrine.shrinesByBuildingUUID.remove(building.getObjectUUID()); - DbManager.removeFromCache(Enum.GameObjectType.Shrine, + DbManager.removeFromCache(mbEnums.GameObjectType.Shrine, shrine.getObjectUUID()); } } diff --git a/src/engine/objects/SkillsBase.java b/src/engine/objects/SkillsBase.java index d615b717..9327fdc6 100644 --- a/src/engine/objects/SkillsBase.java +++ b/src/engine/objects/SkillsBase.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum.SourceType; +import engine.mbEnums.SourceType; import engine.gameManager.DbManager; import engine.server.MBServerStatics; diff --git a/src/engine/objects/Transaction.java b/src/engine/objects/Transaction.java index 1859876c..fd481d13 100644 --- a/src/engine/objects/Transaction.java +++ b/src/engine/objects/Transaction.java @@ -9,9 +9,9 @@ package engine.objects; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.TransactionType; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.TransactionType; import org.joda.time.DateTime; import java.sql.ResultSet; @@ -23,7 +23,7 @@ public class Transaction implements Comparable { private final int warehouseUUID; private final int targetUUID; - private final Enum.ResourceType resource; + private final mbEnums.ResourceType resource; private final DateTime date; private final int amount; private final TransactionType transactionType; @@ -35,7 +35,7 @@ public class Transaction implements Comparable { this.targetUUID = rs.getInt("targetUID"); this.targetType = GameObjectType.valueOf(rs.getString("targetType")); this.transactionType = TransactionType.valueOf(rs.getString("type").toUpperCase()); - this.resource = Enum.ResourceType.valueOf(rs.getString("resource").toUpperCase()); + this.resource = mbEnums.ResourceType.valueOf(rs.getString("resource").toUpperCase()); this.amount = rs.getInt("amount"); Date sqlDateTime = rs.getTimestamp("date"); @@ -48,7 +48,7 @@ public class Transaction implements Comparable { } - public Transaction(int warehouseUUID, GameObjectType targetType, int targetUUID, TransactionType transactionType, Enum.ResourceType resource, int amount, + public Transaction(int warehouseUUID, GameObjectType targetType, int targetUUID, TransactionType transactionType, mbEnums.ResourceType resource, int amount, DateTime date) { this.warehouseUUID = warehouseUUID; this.targetUUID = targetUUID; @@ -70,7 +70,7 @@ public class Transaction implements Comparable { } - public Enum.ResourceType getResource() { + public mbEnums.ResourceType getResource() { return resource; } diff --git a/src/engine/objects/Warehouse.java b/src/engine/objects/Warehouse.java index d0855254..1ae97564 100644 --- a/src/engine/objects/Warehouse.java +++ b/src/engine/objects/Warehouse.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; import engine.net.Dispatch; @@ -30,11 +30,11 @@ import java.util.concurrent.ConcurrentHashMap; public class Warehouse { - public EnumSet locked = EnumSet.noneOf(Enum.ResourceType.class); + public EnumSet locked = EnumSet.noneOf(mbEnums.ResourceType.class); public Building building; public City city; public ArrayList transactions = new ArrayList<>(); - public ConcurrentHashMap resources = new ConcurrentHashMap<>(); + public ConcurrentHashMap resources = new ConcurrentHashMap<>(); public Warehouse(Building building) { @@ -43,12 +43,12 @@ public class Warehouse { // New empty warehouse - for (Enum.ResourceType resourceType : EnumSet.allOf(Enum.ResourceType.class)) + for (mbEnums.ResourceType resourceType : EnumSet.allOf(mbEnums.ResourceType.class)) this.resources.put(resourceType, 0); // With no locks - this.locked = EnumSet.noneOf(Enum.ResourceType.class); + this.locked = EnumSet.noneOf(mbEnums.ResourceType.class); } public Warehouse(JSONObject warehouse) throws SQLException { @@ -56,7 +56,7 @@ public class Warehouse { JSONObject resources = (JSONObject) warehouse.get("resources"); for (Object key : resources.keySet()) { - Enum.ResourceType resourceType = Enum.ResourceType.valueOf((String) key); + mbEnums.ResourceType resourceType = mbEnums.ResourceType.valueOf((String) key); int value = ((Long) resources.get(key)).intValue(); this.resources.put(resourceType, value); } @@ -65,16 +65,16 @@ public class Warehouse { if (lockedResources.isEmpty() == false) for (Object o : lockedResources) - this.locked.add(Enum.ResourceType.valueOf((String) o)); + this.locked.add(mbEnums.ResourceType.valueOf((String) o)); } - public static HashMap - calculateWarehouseOverdraft(Warehouse warehouse, HashMap costMap) { + public static HashMap + calculateWarehouseOverdraft(Warehouse warehouse, HashMap costMap) { - HashMap overdraft = new HashMap<>(); + HashMap overdraft = new HashMap<>(); - for (Enum.ResourceType resourceType : costMap.keySet()) { + for (mbEnums.ResourceType resourceType : costMap.keySet()) { int cost = costMap.get(resourceType); @@ -123,7 +123,7 @@ public class Warehouse { vrm.setWarehouseBuilding(warehouseBuilding); vrm.configure(); dispatch = Dispatch.borrow(player, vrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } public static void warehouseWithdraw(MerchantMsg msg, PlayerCharacter player, NPC npc) { @@ -152,7 +152,7 @@ public class Warehouse { if (warehouse == null) return; - Enum.ResourceType resourceType = Enum.ResourceType.hashLookup.get(msg.getHashID()); + mbEnums.ResourceType resourceType = mbEnums.ResourceType.hashLookup.get(msg.getHashID()); if (isResourceLocked(warehouse, resourceType)) { ChatManager.chatSystemInfo(player, "You cannot withdrawl a locked resource."); @@ -169,7 +169,7 @@ public class Warehouse { vrm.setWarehouseBuilding(warehouseBuilding); vrm.configure(); dispatch = Dispatch.borrow(player, vrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } public static void warehouseLock(MerchantMsg msg, PlayerCharacter player, NPC npc) { @@ -194,7 +194,7 @@ public class Warehouse { warehouse = city.warehouse; - Enum.ResourceType resourceType = Enum.ResourceType.hashLookup.get(hashID); + mbEnums.ResourceType resourceType = mbEnums.ResourceType.hashLookup.get(hashID); // toggle lock @@ -210,7 +210,7 @@ public class Warehouse { vrm.setWarehouseBuilding(warehouseBuilding); vrm.configure(); dispatch = Dispatch.borrow(player, vrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else warehouse.locked.add(resourceType); @@ -227,7 +227,7 @@ public class Warehouse { vrm.setWarehouseBuilding(warehouseBuilding); vrm.configure(); dispatch = Dispatch.borrow(player, vrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else warehouse.locked.remove(resourceType); @@ -245,7 +245,7 @@ public class Warehouse { return false; } - Enum.ResourceType resourceType = Enum.ResourceType.resourceLookup.get(resource.templateID); + mbEnums.ResourceType resourceType = mbEnums.ResourceType.resourceLookup.get(resource.templateID); if (warehouse.resources.get(resourceType) == null) return false; @@ -273,11 +273,11 @@ public class Warehouse { int newAmount = oldAmount + amount; - if (newAmount > Enum.ResourceType.resourceLookup.get(resource.templateID).deposit_limit) + if (newAmount > mbEnums.ResourceType.resourceLookup.get(resource.templateID).deposit_limit) return false; if (removeFromInventory) { - if (resourceType.equals(Enum.ResourceType.GOLD)) { + if (resourceType.equals(mbEnums.ResourceType.GOLD)) { if (itemMan.getGoldInventory().getNumOfItems() - amount < 0) return false; @@ -291,7 +291,7 @@ public class Warehouse { UpdateGoldMsg ugm = new UpdateGoldMsg(pc); ugm.configure(); Dispatch dispatch = Dispatch.borrow(pc, ugm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); itemMan.updateInventory(); @@ -313,18 +313,18 @@ public class Warehouse { return false; } - if (resource.template.item_type.equals(Enum.ItemType.GOLD)) - resourceType = Enum.ResourceType.GOLD; + if (resource.template.item_type.equals(mbEnums.ItemType.GOLD)) + resourceType = mbEnums.ResourceType.GOLD; else - resourceType = Enum.ResourceType.valueOf(ItemTemplate.templates.get(resource.templateID).item_base_name.toUpperCase()); + resourceType = mbEnums.ResourceType.valueOf(ItemTemplate.templates.get(resource.templateID).item_base_name.toUpperCase()); if (transaction) - AddTransactionToWarehouse(warehouse, pc.getObjectType(), pc.getObjectUUID(), Enum.TransactionType.DEPOSIT, resourceType, amount); + AddTransactionToWarehouse(warehouse, pc.getObjectType(), pc.getObjectUUID(), mbEnums.TransactionType.DEPOSIT, resourceType, amount); return true; } - public static synchronized boolean depositFromMine(Mine mine, Enum.ResourceType resourceType, int amount, Warehouse warehouse) { + public static synchronized boolean depositFromMine(Mine mine, mbEnums.ResourceType resourceType, int amount, Warehouse warehouse) { int oldAmount = warehouse.resources.get(resourceType); int newAmount = oldAmount + amount; @@ -340,12 +340,12 @@ public class Warehouse { } if (mine != null) - AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, mine.getBuildingID(), Enum.TransactionType.MINE, resourceType, amount); + AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, mine.getBuildingID(), mbEnums.TransactionType.MINE, resourceType, amount); return true; } - public static synchronized void depositRealmTaxes(PlayerCharacter taxer, Enum.ResourceType resourceType, int amount, Warehouse warehouse) { + public static synchronized void depositRealmTaxes(PlayerCharacter taxer, mbEnums.ResourceType resourceType, int amount, Warehouse warehouse) { int oldAmount = warehouse.resources.get(resourceType); int newAmount = oldAmount + amount; @@ -356,11 +356,11 @@ public class Warehouse { return; } - AddTransactionToWarehouse(warehouse, taxer.getObjectType(), taxer.getObjectUUID(), Enum.TransactionType.TAXRESOURCEDEPOSIT, resourceType, amount); + AddTransactionToWarehouse(warehouse, taxer.getObjectType(), taxer.getObjectUUID(), mbEnums.TransactionType.TAXRESOURCEDEPOSIT, resourceType, amount); } - public static synchronized void depositProfitTax(Enum.ResourceType resourceType, int amount, Building building, Warehouse warehouse) { + public static synchronized void depositProfitTax(mbEnums.ResourceType resourceType, int amount, Building building, Warehouse warehouse) { if (warehouse.resources.get(resourceType) == null) return; @@ -379,11 +379,11 @@ public class Warehouse { } if (building != null) - AddTransactionToWarehouse(warehouse, Enum.GameObjectType.Building, building.getObjectUUID(), Enum.TransactionType.DEPOSIT, resourceType, amount); + AddTransactionToWarehouse(warehouse, mbEnums.GameObjectType.Building, building.getObjectUUID(), mbEnums.TransactionType.DEPOSIT, resourceType, amount); } - public static synchronized boolean withdraw(Warehouse warehouse, NPC npc, Enum.ResourceType resourceType, int amount, boolean transaction) { + public static synchronized boolean withdraw(Warehouse warehouse, NPC npc, mbEnums.ResourceType resourceType, int amount, boolean transaction) { int oldAmount = warehouse.resources.get(resourceType); @@ -406,14 +406,14 @@ public class Warehouse { } if (transaction) - AddTransactionToWarehouse(warehouse, npc.getObjectType(), npc.getObjectUUID(), Enum.TransactionType.WITHDRAWL, resourceType, amount); + AddTransactionToWarehouse(warehouse, npc.getObjectType(), npc.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, resourceType, amount); return true; } - public static synchronized void transferResources(Warehouse warehouse, PlayerCharacter taxer, TaxResourcesMsg msg, ArrayList realmResources, float taxPercent) { + public static synchronized void transferResources(Warehouse warehouse, PlayerCharacter taxer, TaxResourcesMsg msg, ArrayList realmResources, float taxPercent) { - for (Enum.ResourceType resourceType : realmResources) { + for (mbEnums.ResourceType resourceType : realmResources) { if (warehouse.resources.get(resourceType) == null) return; @@ -445,14 +445,14 @@ public class Warehouse { warehouse.resources.put(resourceType, newAmount); depositRealmTaxes(taxer, resourceType, amount, warehouse); - Enum.ResourceType resource; + mbEnums.ResourceType resource; - AddTransactionToWarehouse(warehouse, taxer.getObjectType(), taxer.getObjectUUID(), Enum.TransactionType.TAXRESOURCE, resourceType, amount); + AddTransactionToWarehouse(warehouse, taxer.getObjectType(), taxer.getObjectUUID(), mbEnums.TransactionType.TAXRESOURCE, resourceType, amount); } } - public static synchronized boolean withdraw(Warehouse warehouse, PlayerCharacter pc, Enum.ResourceType resourceType, int amount, boolean addToInventory, boolean transaction) { + public static synchronized boolean withdraw(Warehouse warehouse, PlayerCharacter pc, mbEnums.ResourceType resourceType, int amount, boolean addToInventory, boolean transaction) { if (pc == null) return false; @@ -476,7 +476,7 @@ public class Warehouse { return false; } - if (addToInventory && resourceType.equals(Enum.ResourceType.GOLD)) { + if (addToInventory && resourceType.equals(mbEnums.ResourceType.GOLD)) { if (pc.charItemManager.getGoldInventory().getNumOfItems() + amount > MBServerStatics.PLAYER_GOLD_LIMIT) return false; @@ -498,13 +498,13 @@ public class Warehouse { } if (addToInventory) { - if (resourceType.equals(Enum.ResourceType.GOLD)) { + if (resourceType.equals(mbEnums.ResourceType.GOLD)) { itemMan.addGoldToInventory(amount, false); UpdateGoldMsg ugm = new UpdateGoldMsg(pc); ugm.configure(); Dispatch dispatch = Dispatch.borrow(pc, ugm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); itemMan.updateInventory(); } else { @@ -512,8 +512,8 @@ public class Warehouse { Item item = new Item(resourceType.templateID); item.ownerID = pc.getObjectUUID(); - item.ownerType = Enum.OwnerType.PlayerCharacter; - item.containerType = Enum.ItemContainerType.INVENTORY; + item.ownerType = mbEnums.OwnerType.PlayerCharacter; + item.containerType = mbEnums.ItemContainerType.INVENTORY; item.numberOfItems = amount; try { @@ -530,12 +530,12 @@ public class Warehouse { } if (transaction) - AddTransactionToWarehouse(warehouse, pc.getObjectType(), pc.getObjectUUID(), Enum.TransactionType.WITHDRAWL, resourceType, amount); + AddTransactionToWarehouse(warehouse, pc.getObjectType(), pc.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, resourceType, amount); return true; } - public static synchronized boolean loot(Warehouse warehouse, PlayerCharacter pc, Enum.ResourceType resourceType, int amount, boolean addToInventory) { + public static synchronized boolean loot(Warehouse warehouse, PlayerCharacter pc, mbEnums.ResourceType resourceType, int amount, boolean addToInventory) { if (pc == null) return false; @@ -571,21 +571,21 @@ public class Warehouse { warehouse.resources.put(resourceType, newAmount); if (addToInventory) { - if (resourceType.equals(Enum.ResourceType.GOLD)) { + if (resourceType.equals(mbEnums.ResourceType.GOLD)) { itemMan.addGoldToInventory(amount, false); UpdateGoldMsg ugm = new UpdateGoldMsg(pc); ugm.configure(); Dispatch dispatch = Dispatch.borrow(pc, ugm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); itemMan.updateInventory(); } else { boolean itemWorked = false; Item item = new Item(resourceType.templateID); item.ownerID = pc.getObjectUUID(); - item.ownerType = Enum.OwnerType.PlayerCharacter; - item.containerType = Enum.ItemContainerType.INVENTORY; + item.ownerType = mbEnums.OwnerType.PlayerCharacter; + item.containerType = mbEnums.ItemContainerType.INVENTORY; item.numberOfItems = amount; try { @@ -607,7 +607,7 @@ public class Warehouse { public static boolean isEmpty(Warehouse warehouse) { int amount = 0; - for (Enum.ResourceType resourceType : EnumSet.allOf(Enum.ResourceType.class)) { + for (mbEnums.ResourceType resourceType : EnumSet.allOf(mbEnums.ResourceType.class)) { amount += warehouse.resources.get(resourceType); if (amount > 0) @@ -620,7 +620,7 @@ public class Warehouse { warehouse.transactions = DbManager.WarehouseQueries.GET_TRANSACTIONS_FOR_WAREHOUSE(warehouse.building.getObjectUUID()); } - public static void AddTransactionToWarehouse(Warehouse warehouse, Enum.GameObjectType targetType, int targetUUID, Enum.TransactionType transactionType, Enum.ResourceType resource, int amount) { + public static void AddTransactionToWarehouse(Warehouse warehouse, mbEnums.GameObjectType targetType, int targetUUID, mbEnums.TransactionType transactionType, mbEnums.ResourceType resource, int amount) { if (!DbManager.WarehouseQueries.CREATE_TRANSACTION(warehouse.building.getObjectUUID(), targetType, targetUUID, transactionType, resource, amount, DateTime.now())) @@ -630,13 +630,13 @@ public class Warehouse { warehouse.transactions.add(transaction); } - public static boolean isAboveCap(Warehouse warehouse, Enum.ResourceType resourceType, int deposit) { + public static boolean isAboveCap(Warehouse warehouse, mbEnums.ResourceType resourceType, int deposit) { int newAmount = warehouse.resources.get(resourceType) + deposit; return newAmount > resourceType.deposit_limit; } - public static boolean isResourceLocked(Warehouse warehouse, Enum.ResourceType resourceType) { + public static boolean isResourceLocked(Warehouse warehouse, mbEnums.ResourceType resourceType) { return resourceType.elementOf(warehouse.locked); } diff --git a/src/engine/objects/Zone.java b/src/engine/objects/Zone.java index 4bc30406..c198d1ef 100644 --- a/src/engine/objects/Zone.java +++ b/src/engine/objects/Zone.java @@ -9,7 +9,7 @@ package engine.objects; -import engine.Enum; +import engine.mbEnums; import engine.InterestManagement.Terrain; import engine.db.archive.DataWarehouse; import engine.gameManager.ZoneManager; @@ -106,8 +106,8 @@ public class Zone extends AbstractWorldObject { if (zone.playerCityUUID > 0) { writer.put((byte) 1); // Player City - True - writer.putFloat(Enum.CityBoundsType.ZONE.halfExtents); - writer.putFloat(Enum.CityBoundsType.ZONE.halfExtents); + writer.putFloat(mbEnums.CityBoundsType.ZONE.halfExtents); + writer.putFloat(mbEnums.CityBoundsType.ZONE.halfExtents); } else writer.put((byte) 0); // Player City - False @@ -165,8 +165,8 @@ public class Zone extends AbstractWorldObject { // stored within its template. if (this.template == null) { - this.minor_radius = Enum.CityBoundsType.ZONE.halfExtents; - this.major_radius = Enum.CityBoundsType.ZONE.halfExtents; + this.minor_radius = mbEnums.CityBoundsType.ZONE.halfExtents; + this.major_radius = mbEnums.CityBoundsType.ZONE.halfExtents; } else { this.minor_radius = this.template.minor_radius; this.major_radius = this.template.major_radius; @@ -312,7 +312,7 @@ public class Zone extends AbstractWorldObject { // Write hash to player character table - DataWarehouse.writeHash(Enum.DataRecordType.ZONE, this.getObjectUUID()); + DataWarehouse.writeHash(mbEnums.DataRecordType.ZONE, this.getObjectUUID()); } } diff --git a/src/engine/powers/ActionsBase.java b/src/engine/powers/ActionsBase.java index 308d1c6a..c758289a 100644 --- a/src/engine/powers/ActionsBase.java +++ b/src/engine/powers/ActionsBase.java @@ -9,11 +9,11 @@ package engine.powers; -import engine.Enum.ModType; -import engine.Enum.SourceType; -import engine.Enum.StackType; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; +import engine.mbEnums.StackType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.PlayerBonuses; diff --git a/src/engine/powers/DamageShield.java b/src/engine/powers/DamageShield.java index 72949da4..f0824d62 100644 --- a/src/engine/powers/DamageShield.java +++ b/src/engine/powers/DamageShield.java @@ -9,22 +9,22 @@ package engine.powers; -import engine.Enum; +import engine.mbEnums; public class DamageShield { - private final Enum.DamageType damageType; + private final mbEnums.DamageType damageType; private final float amount; private final boolean usePercent; - public DamageShield(Enum.DamageType damageType, float amount, boolean usePercent) { + public DamageShield(mbEnums.DamageType damageType, float amount, boolean usePercent) { super(); this.damageType = damageType; this.amount = amount; this.usePercent = usePercent; } - public Enum.DamageType getDamageType() { + public mbEnums.DamageType getDamageType() { return this.damageType; } diff --git a/src/engine/powers/EffectsBase.java b/src/engine/powers/EffectsBase.java index 039f13db..dc72873a 100644 --- a/src/engine/powers/EffectsBase.java +++ b/src/engine/powers/EffectsBase.java @@ -9,10 +9,10 @@ package engine.powers; -import engine.Enum; -import engine.Enum.EffectSourceType; -import engine.Enum.GameObjectType; -import engine.Enum.PowerFailCondition; +import engine.mbEnums; +import engine.mbEnums.EffectSourceType; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.PowerFailCondition; import engine.gameManager.DbManager; import engine.gameManager.PowersManager; import engine.job.JobContainer; @@ -46,7 +46,7 @@ public class EffectsBase { public static HashMap>> NewEffectsMap = new HashMap<>(); public static HashMap>> ChangedEffectsMap = new HashMap<>(); public static HashMap> EffectFailConditions = new HashMap<>(); - public static HashMap> EffectDamageTypes = new HashMap<>(); + public static HashMap> EffectDamageTypes = new HashMap<>(); public static HashSet DefaultModifiers = new HashSet<>(); private static ConcurrentHashMap itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); private static int NewID = 3000; @@ -78,7 +78,7 @@ public class EffectsBase { private boolean isSuffix = false; //used by items private String name = ""; private float value = 0; - private ConcurrentHashMap resourceCosts = new ConcurrentHashMap<>(); + private ConcurrentHashMap resourceCosts = new ConcurrentHashMap<>(); private ConcurrentHashMap sourceTypes = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); /** @@ -224,14 +224,14 @@ public class EffectsBase { if (!EffectsBase.EffectDamageTypes.containsKey(eb.getToken())) EffectsBase.EffectDamageTypes.put(eb.getToken(), new HashSet<>()); - Enum.DamageType dt = Enum.DamageType.getDamageType(damageType1); + mbEnums.DamageType dt = mbEnums.DamageType.getDamageType(damageType1); if (dt != null) EffectsBase.EffectDamageTypes.get(eb.token).add(dt); - dt = Enum.DamageType.getDamageType(damageType2); + dt = mbEnums.DamageType.getDamageType(damageType2); if (dt != null) EffectsBase.EffectDamageTypes.get(eb.token).add(dt); - dt = Enum.DamageType.getDamageType(damageType3); + dt = mbEnums.DamageType.getDamageType(damageType3); if (dt != null) EffectsBase.EffectDamageTypes.get(eb.token).add(dt); break; @@ -304,7 +304,7 @@ public class EffectsBase { } - public boolean containsDamageType(Enum.DamageType dt) { + public boolean containsDamageType(mbEnums.DamageType dt) { if (!EffectsBase.EffectDamageTypes.containsKey(this.token)) return false; return EffectsBase.EffectDamageTypes.get(this.token).contains(dt); @@ -525,7 +525,7 @@ public class EffectsBase { if (source.getObjectType() == GameObjectType.PlayerCharacter) { Dispatch dispatch = Dispatch.borrow((PlayerCharacter) source, pum); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } } @@ -579,7 +579,7 @@ public class EffectsBase { pum.setPowerUsedName(pb.getName()); Dispatch dispatch = Dispatch.borrow(conn.getPlayerCharacter(), pum); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } @@ -631,7 +631,7 @@ public class EffectsBase { pum.setPowerUsedName(this.name); Dispatch dispatch = Dispatch.borrow(conn.getPlayerCharacter(), pum); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } } @@ -695,7 +695,7 @@ public class EffectsBase { String text = ""; if (!EffectsBase.EffectDamageTypes.containsKey(this.token)) return text; - for (Enum.DamageType type : EffectsBase.EffectDamageTypes.get(this.token)) { + for (mbEnums.DamageType type : EffectsBase.EffectDamageTypes.get(this.token)) { text += type.name() + ' '; } return text; @@ -718,11 +718,11 @@ public class EffectsBase { this.value = Value; } - public ConcurrentHashMap getResourcesForEffect() { + public ConcurrentHashMap getResourcesForEffect() { if (this.resourceCosts.isEmpty()) { ArrayList effectsCostList = DbManager.EffectsResourceCostsQueries.GET_ALL_EFFECT_RESOURCES(this.IDString); for (EffectsResourceCosts erc : effectsCostList) { - this.resourceCosts.put(Enum.ResourceType.resourceLookup.get(erc.getResourceID()), erc.getAmount()); + this.resourceCosts.put(mbEnums.ResourceType.resourceLookup.get(erc.getResourceID()), erc.getAmount()); } } return this.resourceCosts; diff --git a/src/engine/powers/PowersBase.java b/src/engine/powers/PowersBase.java index 9cfc8c01..efd5af71 100644 --- a/src/engine/powers/PowersBase.java +++ b/src/engine/powers/PowersBase.java @@ -9,8 +9,8 @@ package engine.powers; -import engine.Enum.PowerCategoryType; -import engine.Enum.PowerTargetType; +import engine.mbEnums.PowerCategoryType; +import engine.mbEnums.PowerTargetType; import org.pmw.tinylog.Logger; import java.sql.ResultSet; diff --git a/src/engine/powers/RangeBasedAwo.java b/src/engine/powers/RangeBasedAwo.java index 66a499c8..fc4daf55 100644 --- a/src/engine/powers/RangeBasedAwo.java +++ b/src/engine/powers/RangeBasedAwo.java @@ -9,9 +9,9 @@ package engine.powers; -import engine.Enum; -import engine.Enum.GameObjectType; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.PlayerCharacter; @@ -52,12 +52,12 @@ public class RangeBasedAwo implements Comparable { return awolist; AbstractWorldObject awo = rba.awo; - if (awo.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (awo.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { if (playerCnt < maxPlayers) { awolist.add(awo); playerCnt++; } - } else if (awo.getObjectType().equals(Enum.GameObjectType.Mob)) { + } else if (awo.getObjectType().equals(mbEnums.GameObjectType.Mob)) { if (mobCnt < maxMobs) { awolist.add(awo); mobCnt++; diff --git a/src/engine/powers/effectmodifiers/AbstractEffectModifier.java b/src/engine/powers/effectmodifiers/AbstractEffectModifier.java index b35eda3f..e36d25c6 100644 --- a/src/engine/powers/effectmodifiers/AbstractEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AbstractEffectModifier.java @@ -9,9 +9,9 @@ package engine.powers.effectmodifiers; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.jobs.AbstractEffectJob; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; diff --git a/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java b/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java index fab03894..0c617bec 100644 --- a/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java @@ -9,9 +9,9 @@ package engine.powers.effectmodifiers; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.jobs.AbstractEffectJob; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.objects.*; import java.sql.ResultSet; diff --git a/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java b/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java index 5619e98f..283a9545 100644 --- a/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java +++ b/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java @@ -9,9 +9,9 @@ package engine.powers.effectmodifiers; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.jobs.AbstractEffectJob; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.objects.*; import org.pmw.tinylog.Logger; diff --git a/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java b/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java index f55e903d..1af36449 100644 --- a/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java +++ b/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java @@ -9,8 +9,8 @@ package engine.powers.effectmodifiers; -import engine.Enum.ModType; import engine.jobs.AbstractEffectJob; +import engine.mbEnums.ModType; import engine.objects.*; import java.sql.ResultSet; diff --git a/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java b/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java index 1048b9e1..6114aaa3 100644 --- a/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java +++ b/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java @@ -9,8 +9,8 @@ package engine.powers.effectmodifiers; -import engine.Enum; import engine.jobs.AbstractEffectJob; +import engine.mbEnums; import engine.objects.*; import java.sql.ResultSet; @@ -31,7 +31,7 @@ public class CannotCastEffectModifier extends AbstractEffectModifier { @Override public void applyBonus(AbstractCharacter ac, int trains) { - if (ac.getObjectType().equals(Enum.GameObjectType.Mob)) { + if (ac.getObjectType().equals(mbEnums.GameObjectType.Mob)) { Mob mob = (Mob) ac; } diff --git a/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java b/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java index 7795a825..788f5700 100644 --- a/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java +++ b/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java @@ -9,8 +9,8 @@ package engine.powers.effectmodifiers; -import engine.Enum; import engine.jobs.AbstractEffectJob; +import engine.mbEnums; import engine.objects.*; import engine.powers.DamageShield; @@ -49,7 +49,7 @@ public class DamageShieldEffectModifier extends AbstractEffectModifier { amount *= (1 + mod); } - Enum.DamageType dt = Enum.DamageType.getDamageType(this.type); + mbEnums.DamageType dt = mbEnums.DamageType.getDamageType(this.type); if (dt != null) { diff --git a/src/engine/powers/effectmodifiers/HealthEffectModifier.java b/src/engine/powers/effectmodifiers/HealthEffectModifier.java index 83d8856d..525b7d13 100644 --- a/src/engine/powers/effectmodifiers/HealthEffectModifier.java +++ b/src/engine/powers/effectmodifiers/HealthEffectModifier.java @@ -9,12 +9,12 @@ package engine.powers.effectmodifiers; -import engine.Enum; -import engine.Enum.GameObjectType; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.jobs.AbstractEffectJob; import engine.jobs.DamageOverTimeJob; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.net.AbstractNetMsg; import engine.net.DispatchMessage; import engine.net.client.msg.ModifyHealthKillMsg; @@ -28,13 +28,13 @@ import java.util.concurrent.ThreadLocalRandom; public class HealthEffectModifier extends AbstractEffectModifier { - private Enum.DamageType damageType; + private mbEnums.DamageType damageType; public HealthEffectModifier(ResultSet rs) throws SQLException { super(rs); String damageTypeDB = rs.getString("type"); try { - this.damageType = Enum.DamageType.getDamageType(damageTypeDB); + this.damageType = mbEnums.DamageType.getDamageType(damageTypeDB); } catch (IllegalArgumentException e) { Logger.error("DamageType could not be loaded from database. " + "UUID = " + this.UUID + " value received = '" + damageTypeDB.toUpperCase() + '\'', e); diff --git a/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java b/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java index 5c358185..5c79cabe 100644 --- a/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java +++ b/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java @@ -9,9 +9,9 @@ package engine.powers.effectmodifiers; -import engine.Enum; import engine.gameManager.SessionManager; import engine.jobs.AbstractEffectJob; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.objects.*; import engine.powers.ActionsBase; @@ -30,7 +30,7 @@ public class InvisibleEffectModifier extends AbstractEffectModifier { @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { - if (awo.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (awo.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter pc = (PlayerCharacter) awo; if (effect == null) @@ -70,7 +70,7 @@ public class InvisibleEffectModifier extends AbstractEffectModifier { bonus.updateIfHigher(this, (float) trains); //remove pets - if (ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) + if (ac.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) ((PlayerCharacter) ac).dismissPet(); } diff --git a/src/engine/powers/effectmodifiers/ManaEffectModifier.java b/src/engine/powers/effectmodifiers/ManaEffectModifier.java index 5bf66393..184e8b7d 100644 --- a/src/engine/powers/effectmodifiers/ManaEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ManaEffectModifier.java @@ -9,11 +9,11 @@ package engine.powers.effectmodifiers; -import engine.Enum; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.jobs.AbstractEffectJob; import engine.jobs.DamageOverTimeJob; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.net.DispatchMessage; import engine.net.client.msg.ModifyHealthMsg; import engine.objects.*; @@ -30,13 +30,13 @@ import java.util.concurrent.ThreadLocalRandom; public class ManaEffectModifier extends AbstractEffectModifier { - private Enum.DamageType damageType; + private mbEnums.DamageType damageType; public ManaEffectModifier(ResultSet rs) throws SQLException { super(rs); String damageTypeDB = rs.getString("type"); try { - this.damageType = Enum.DamageType.getDamageType(damageTypeDB); + this.damageType = mbEnums.DamageType.getDamageType(damageTypeDB); } catch (IllegalArgumentException e) { Logger.error("DamageType could not be loaded from database. " + "UUID = " + this.UUID + " value received = '" + damageTypeDB.toUpperCase() + '\'', e); @@ -89,7 +89,7 @@ public class ManaEffectModifier extends AbstractEffectModifier { max *= (1 + mod); } } - if (source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter pc = (PlayerCharacter) source; float focus; @@ -176,7 +176,7 @@ public class ManaEffectModifier extends AbstractEffectModifier { if (AbstractWorldObject.IsAbstractCharacter(awo)) { AbstractCharacter ac = (AbstractCharacter) awo; resists = ac.getResists(); - } else if (awo.getObjectType().equals(Enum.GameObjectType.Building)) + } else if (awo.getObjectType().equals(mbEnums.GameObjectType.Building)) resists = ((Building) awo).getResists(); // calculate resists in if any diff --git a/src/engine/powers/effectmodifiers/NoModEffectModifier.java b/src/engine/powers/effectmodifiers/NoModEffectModifier.java index a09c5600..63c8cb90 100644 --- a/src/engine/powers/effectmodifiers/NoModEffectModifier.java +++ b/src/engine/powers/effectmodifiers/NoModEffectModifier.java @@ -9,8 +9,8 @@ package engine.powers.effectmodifiers; -import engine.Enum.GameObjectType; import engine.jobs.AbstractEffectJob; +import engine.mbEnums.GameObjectType; import engine.objects.*; import java.sql.ResultSet; diff --git a/src/engine/powers/effectmodifiers/StaminaEffectModifier.java b/src/engine/powers/effectmodifiers/StaminaEffectModifier.java index 4dcfb815..9e325c95 100644 --- a/src/engine/powers/effectmodifiers/StaminaEffectModifier.java +++ b/src/engine/powers/effectmodifiers/StaminaEffectModifier.java @@ -9,9 +9,9 @@ package engine.powers.effectmodifiers; -import engine.Enum; -import engine.Enum.ModType; -import engine.Enum.SourceType; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.jobs.AbstractEffectJob; import engine.jobs.DamageOverTimeJob; import engine.net.DispatchMessage; @@ -30,13 +30,13 @@ import java.util.concurrent.ThreadLocalRandom; public class StaminaEffectModifier extends AbstractEffectModifier { - private Enum.DamageType damageType; + private mbEnums.DamageType damageType; public StaminaEffectModifier(ResultSet rs) throws SQLException { super(rs); String damageTypeDB = rs.getString("type"); try { - this.damageType = Enum.DamageType.getDamageType(damageTypeDB); + this.damageType = mbEnums.DamageType.getDamageType(damageTypeDB); } catch (IllegalArgumentException e) { Logger.error("DamageType could not be loaded from database. " + "UUID = " + this.UUID + " value received = '" + damageTypeDB.toUpperCase() + '\'', e); @@ -87,7 +87,7 @@ public class StaminaEffectModifier extends AbstractEffectModifier { max *= (1 + mod); } } - if (source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter pc = (PlayerCharacter) source; float focus; @@ -176,7 +176,7 @@ public class StaminaEffectModifier extends AbstractEffectModifier { if (AbstractWorldObject.IsAbstractCharacter(awo)) { AbstractCharacter ac = (AbstractCharacter) awo; resists = ac.getResists(); - } else if (awo.getObjectType().equals(Enum.GameObjectType.Building)) + } else if (awo.getObjectType().equals(mbEnums.GameObjectType.Building)) resists = ((Building) awo).getResists(); // calculate resists in if any diff --git a/src/engine/powers/effectmodifiers/StunnedEffectModifier.java b/src/engine/powers/effectmodifiers/StunnedEffectModifier.java index 0789f3c7..caff6247 100644 --- a/src/engine/powers/effectmodifiers/StunnedEffectModifier.java +++ b/src/engine/powers/effectmodifiers/StunnedEffectModifier.java @@ -9,7 +9,7 @@ package engine.powers.effectmodifiers; -import engine.Enum.GameObjectType; +import engine.mbEnums.GameObjectType; import engine.jobs.AbstractEffectJob; import engine.objects.*; diff --git a/src/engine/powers/poweractions/ApplyEffectPowerAction.java b/src/engine/powers/poweractions/ApplyEffectPowerAction.java index 5ba50b7b..b7e16e09 100644 --- a/src/engine/powers/poweractions/ApplyEffectPowerAction.java +++ b/src/engine/powers/poweractions/ApplyEffectPowerAction.java @@ -9,15 +9,15 @@ package engine.powers.poweractions; -import engine.Enum.GameObjectType; -import engine.Enum.ModType; -import engine.Enum.SourceType; import engine.InterestManagement.WorldGrid; import engine.gameManager.ChatManager; import engine.jobs.ChantJob; import engine.jobs.DeferredPowerJob; import engine.jobs.FinishEffectTimeJob; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.net.DispatchMessage; import engine.net.client.msg.chat.ChatSystemMsg; import engine.objects.*; diff --git a/src/engine/powers/poweractions/CharmPowerAction.java b/src/engine/powers/poweractions/CharmPowerAction.java index 100f5461..93ab7531 100644 --- a/src/engine/powers/poweractions/CharmPowerAction.java +++ b/src/engine/powers/poweractions/CharmPowerAction.java @@ -9,8 +9,8 @@ package engine.powers.poweractions; -import engine.Enum; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.client.ClientConnection; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; @@ -37,7 +37,7 @@ public class CharmPowerAction extends AbstractPowerAction { @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || awo == null || !(awo.getObjectType().equals(Enum.GameObjectType.Mob)) || !(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + if (source == null || awo == null || !(awo.getObjectType().equals(mbEnums.GameObjectType.Mob)) || !(source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return; PlayerCharacter owner = (PlayerCharacter) source; @@ -48,7 +48,7 @@ public class CharmPowerAction extends AbstractPowerAction { //verify is mob, not pet or guard Mob mob = (Mob) awo; - if (!(mob.agentType.equals(Enum.AIAgentType.MOBILE))) + if (!(mob.agentType.equals(mbEnums.AIAgentType.MOBILE))) return; //make sure mob isn't too high level diff --git a/src/engine/powers/poweractions/ClaimMinePowerAction.java b/src/engine/powers/poweractions/ClaimMinePowerAction.java index ecb83284..b67dbb8a 100644 --- a/src/engine/powers/poweractions/ClaimMinePowerAction.java +++ b/src/engine/powers/poweractions/ClaimMinePowerAction.java @@ -9,9 +9,9 @@ package engine.powers.poweractions; -import engine.Enum; import engine.gameManager.ChatManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.objects.*; import engine.powers.ActionsBase; import engine.powers.PowersBase; @@ -32,12 +32,12 @@ public class ClaimMinePowerAction extends AbstractPowerAction { if (source == null || worldObject == null) return; - if (!(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + if (!(source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return; PlayerCharacter playerCharacter = (PlayerCharacter) source; - if (!(worldObject.getObjectType().equals(Enum.GameObjectType.Building))) + if (!(worldObject.getObjectType().equals(mbEnums.GameObjectType.Building))) return; Building mineBuilding = (Building) worldObject; diff --git a/src/engine/powers/poweractions/ClearAggroPowerAction.java b/src/engine/powers/poweractions/ClearAggroPowerAction.java index ea9c0f18..7333d722 100644 --- a/src/engine/powers/poweractions/ClearAggroPowerAction.java +++ b/src/engine/powers/poweractions/ClearAggroPowerAction.java @@ -9,8 +9,8 @@ package engine.powers.poweractions; -import engine.Enum.GameObjectType; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Mob; diff --git a/src/engine/powers/poweractions/ClearNearbyAggroPowerAction.java b/src/engine/powers/poweractions/ClearNearbyAggroPowerAction.java index 829fc0be..4fb86784 100644 --- a/src/engine/powers/poweractions/ClearNearbyAggroPowerAction.java +++ b/src/engine/powers/poweractions/ClearNearbyAggroPowerAction.java @@ -9,8 +9,8 @@ package engine.powers.poweractions; -import engine.Enum.GameObjectType; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.powers.ActionsBase; diff --git a/src/engine/powers/poweractions/CreateMobPowerAction.java b/src/engine/powers/poweractions/CreateMobPowerAction.java index a0ec17e9..25d4c979 100644 --- a/src/engine/powers/poweractions/CreateMobPowerAction.java +++ b/src/engine/powers/poweractions/CreateMobPowerAction.java @@ -9,12 +9,12 @@ package engine.powers.poweractions; -import engine.Enum; import engine.InterestManagement.WorldGrid; import engine.gameManager.DbManager; import engine.gameManager.NPCManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -51,7 +51,7 @@ public class CreateMobPowerAction extends AbstractPowerAction { @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || !(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + if (source == null || !(source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return; PlayerCharacter owner = (PlayerCharacter) source; @@ -93,7 +93,7 @@ public class CreateMobPowerAction extends AbstractPowerAction { } } else if (currentPet != null && currentPet.isSiege()) { - currentPet.agentType = Enum.AIAgentType.MOBILE; + currentPet.agentType = mbEnums.AIAgentType.MOBILE; currentPet.guardCaptain = null; currentPet.setCombatTarget(null); @@ -120,7 +120,7 @@ public class CreateMobPowerAction extends AbstractPowerAction { //currentPet.disableIntelligence(); } else { if (currentPet.isSiege()) { - currentPet.agentType = Enum.AIAgentType.MOBILE; + currentPet.agentType = mbEnums.AIAgentType.MOBILE; currentPet.guardCaptain = null; currentPet.setCombatTarget(null); @@ -142,7 +142,7 @@ public class CreateMobPowerAction extends AbstractPowerAction { pet.setHealth(pet.healthMax); PetMsg pm = new PetMsg(5, pet); Dispatch dispatch = Dispatch.borrow(owner, pm); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @Override diff --git a/src/engine/powers/poweractions/FearPowerAction.java b/src/engine/powers/poweractions/FearPowerAction.java index da352aa5..fe573e62 100644 --- a/src/engine/powers/poweractions/FearPowerAction.java +++ b/src/engine/powers/poweractions/FearPowerAction.java @@ -9,7 +9,7 @@ package engine.powers.poweractions; -import engine.Enum; +import engine.mbEnums; import engine.job.JobScheduler; import engine.jobs.EndFearJob; import engine.math.Vector3fImmutable; @@ -37,7 +37,7 @@ public class FearPowerAction extends AbstractPowerAction { @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || awo == null || !(awo.getObjectType().equals(Enum.GameObjectType.Mob)) || !(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + if (source == null || awo == null || !(awo.getObjectType().equals(mbEnums.GameObjectType.Mob)) || !(source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return; PlayerCharacter owner = (PlayerCharacter) source; @@ -47,7 +47,7 @@ public class FearPowerAction extends AbstractPowerAction { //verify is mob, not pet or guard Mob mob = (Mob) awo; - if (!(mob.agentType.equals(Enum.AIAgentType.MOBILE))) + if (!(mob.agentType.equals(mbEnums.AIAgentType.MOBILE))) return; //make sure mob isn't too high level diff --git a/src/engine/powers/poweractions/MobRecallPowerAction.java b/src/engine/powers/poweractions/MobRecallPowerAction.java index 44fb93e8..0b7cddcc 100644 --- a/src/engine/powers/poweractions/MobRecallPowerAction.java +++ b/src/engine/powers/poweractions/MobRecallPowerAction.java @@ -9,9 +9,9 @@ package engine.powers.poweractions; -import engine.Enum.GameObjectType; import engine.gameManager.MovementManager; import engine.math.Vector3fImmutable; +import engine.mbEnums.GameObjectType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Mob; diff --git a/src/engine/powers/poweractions/OpenGatePowerAction.java b/src/engine/powers/poweractions/OpenGatePowerAction.java index 76ed8bfa..2bff5c9c 100644 --- a/src/engine/powers/poweractions/OpenGatePowerAction.java +++ b/src/engine/powers/poweractions/OpenGatePowerAction.java @@ -9,11 +9,11 @@ package engine.powers.poweractions; -import engine.Enum; -import engine.Enum.BuildingGroup; -import engine.Enum.GameObjectType; -import engine.Enum.PortalType; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GameObjectType; +import engine.mbEnums.PortalType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; @@ -50,7 +50,7 @@ public class OpenGatePowerAction extends AbstractPowerAction { // Sanity check. - if (source == null || awo == null || !(awo.getObjectType().equals(Enum.GameObjectType.Building)) || pb == null) + if (source == null || awo == null || !(awo.getObjectType().equals(mbEnums.GameObjectType.Building)) || pb == null) return; // Make sure building has a blueprint diff --git a/src/engine/powers/poweractions/PeekPowerAction.java b/src/engine/powers/poweractions/PeekPowerAction.java index 824e58dd..b94c6e73 100644 --- a/src/engine/powers/poweractions/PeekPowerAction.java +++ b/src/engine/powers/poweractions/PeekPowerAction.java @@ -9,9 +9,9 @@ package engine.powers.poweractions; -import engine.Enum; import engine.gameManager.ChatManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.msg.LootWindowResponseMsg; @@ -77,11 +77,11 @@ public class PeekPowerAction extends AbstractPowerAction { @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || awo == null || !(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + if (source == null || awo == null || !(source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return; PlayerCharacter pc = null; - if (source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) + if (source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) pc = (PlayerCharacter) source; AbstractCharacter target = null; @@ -99,7 +99,7 @@ public class PeekPowerAction extends AbstractPowerAction { LootWindowResponseMsg lwrm = null; - if (awo.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (awo.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter tar = (PlayerCharacter) awo; @@ -107,7 +107,7 @@ public class PeekPowerAction extends AbstractPowerAction { return; lwrm = new LootWindowResponseMsg(tar.getObjectType().ordinal(), tar.getObjectUUID(), tar.getInventory(true)); - } else if (awo.getObjectType().equals(Enum.GameObjectType.Mob)) { + } else if (awo.getObjectType().equals(mbEnums.GameObjectType.Mob)) { Mob tar = (Mob) awo; @@ -120,7 +120,7 @@ public class PeekPowerAction extends AbstractPowerAction { return; Dispatch dispatch = Dispatch.borrow(pc, lwrm); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } @Override diff --git a/src/engine/powers/poweractions/RecallPowerAction.java b/src/engine/powers/poweractions/RecallPowerAction.java index 8a0f6050..75d90d5a 100644 --- a/src/engine/powers/poweractions/RecallPowerAction.java +++ b/src/engine/powers/poweractions/RecallPowerAction.java @@ -9,10 +9,11 @@ package engine.powers.poweractions; -import engine.Enum.GameObjectType; import engine.InterestManagement.WorldGrid; import engine.gameManager.MovementManager; import engine.math.Vector3fImmutable; +import engine.mbEnums; +import engine.mbEnums.GameObjectType; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; @@ -55,7 +56,7 @@ public class RecallPowerAction extends AbstractPowerAction { pc.setTimeStamp("LastRecallType", 1); //recall to bind PromptRecallMsg promptRecallMsgmsg = new PromptRecallMsg(); Dispatch dispatch = Dispatch.borrow(pc, promptRecallMsgmsg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } else { MovementManager.translocate(awoac, awoac.getBindLoc()); diff --git a/src/engine/powers/poweractions/RemoveEffectPowerAction.java b/src/engine/powers/poweractions/RemoveEffectPowerAction.java index 0cb838de..b52840f8 100644 --- a/src/engine/powers/poweractions/RemoveEffectPowerAction.java +++ b/src/engine/powers/poweractions/RemoveEffectPowerAction.java @@ -9,8 +9,8 @@ package engine.powers.poweractions; -import engine.Enum.EffectSourceType; import engine.math.Vector3fImmutable; +import engine.mbEnums.EffectSourceType; import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.powers.ActionsBase; diff --git a/src/engine/powers/poweractions/RunegateTeleportPowerAction.java b/src/engine/powers/poweractions/RunegateTeleportPowerAction.java index 09416a86..67ca652a 100644 --- a/src/engine/powers/poweractions/RunegateTeleportPowerAction.java +++ b/src/engine/powers/poweractions/RunegateTeleportPowerAction.java @@ -9,7 +9,7 @@ package engine.powers.poweractions; -import engine.Enum; +import engine.mbEnums; import engine.math.Vector3fImmutable; import engine.net.Dispatch; import engine.net.DispatchMessage; @@ -36,7 +36,7 @@ public class RunegateTeleportPowerAction extends AbstractPowerAction { @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || awo == null || !(awo.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + if (source == null || awo == null || !(awo.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return; PlayerCharacter pc = (PlayerCharacter) awo; @@ -63,7 +63,7 @@ public class RunegateTeleportPowerAction extends AbstractPowerAction { if (rg != null) { PromptRecallMsg promptRecallMsgmsg = new PromptRecallMsg(); Dispatch dispatch = Dispatch.borrow(pc, promptRecallMsgmsg); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } } else { diff --git a/src/engine/powers/poweractions/SetItemFlagPowerAction.java b/src/engine/powers/poweractions/SetItemFlagPowerAction.java index 0bcd6868..f49ddd92 100644 --- a/src/engine/powers/poweractions/SetItemFlagPowerAction.java +++ b/src/engine/powers/poweractions/SetItemFlagPowerAction.java @@ -9,7 +9,7 @@ package engine.powers.poweractions; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.math.Vector3fImmutable; import engine.objects.AbstractCharacter; @@ -32,21 +32,21 @@ public class SetItemFlagPowerAction extends AbstractPowerAction { @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || awo == null || !(awo.getObjectType().equals(Enum.GameObjectType.Item))) + if (source == null || awo == null || !(awo.getObjectType().equals(mbEnums.GameObjectType.Item))) return; Item item = (Item) awo; - if (item.containerType != Enum.ItemContainerType.INVENTORY) + if (item.containerType != mbEnums.ItemContainerType.INVENTORY) return; //Send an error here? //until this is shown to do something else, just use it as item identify spell. - item.flags.add(Enum.ItemFlags.Identified); + item.flags.add(mbEnums.ItemFlags.Identified); ; if (!DbManager.ItemQueries.UPDATE_FLAGS(item)) - item.flags.remove(Enum.ItemFlags.Identified); + item.flags.remove(mbEnums.ItemFlags.Identified); ; //update failed, reset //update inventory diff --git a/src/engine/powers/poweractions/SpireDisablePowerAction.java b/src/engine/powers/poweractions/SpireDisablePowerAction.java index b61c0166..80d6687d 100644 --- a/src/engine/powers/poweractions/SpireDisablePowerAction.java +++ b/src/engine/powers/poweractions/SpireDisablePowerAction.java @@ -9,8 +9,8 @@ package engine.powers.poweractions; -import engine.Enum.BuildingGroup; -import engine.Enum.GameObjectType; +import engine.mbEnums.BuildingGroup; +import engine.mbEnums.GameObjectType; import engine.gameManager.ChatManager; import engine.math.Vector3fImmutable; import engine.objects.AbstractCharacter; diff --git a/src/engine/powers/poweractions/StealPowerAction.java b/src/engine/powers/poweractions/StealPowerAction.java index 35775449..0e9e0019 100644 --- a/src/engine/powers/poweractions/StealPowerAction.java +++ b/src/engine/powers/poweractions/StealPowerAction.java @@ -9,8 +9,8 @@ package engine.powers.poweractions; -import engine.Enum; -import engine.Enum.ItemType; +import engine.mbEnums; +import engine.mbEnums.ItemType; import engine.gameManager.ChatManager; import engine.gameManager.CombatManager; import engine.math.Vector3fImmutable; @@ -81,7 +81,7 @@ public class StealPowerAction extends AbstractPowerAction { @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || awo == null || !(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) || !(awo.getObjectType().equals(Enum.GameObjectType.Item))) + if (source == null || awo == null || !(source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) || !(awo.getObjectType().equals(mbEnums.GameObjectType.Item))) return; PlayerCharacter sourcePlayer = (PlayerCharacter) source; @@ -113,7 +113,7 @@ public class StealPowerAction extends AbstractPowerAction { //only steal from players or mobs - if (owner.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (owner.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter ownerPC = (PlayerCharacter) owner; @@ -172,14 +172,14 @@ public class StealPowerAction extends AbstractPowerAction { //send loot message to person stealing. LootMsg lm = new LootMsg(source.getObjectType().ordinal(), source.getObjectUUID(), owner.getObjectType().ordinal(), owner.getObjectUUID(), tar); Dispatch dispatch = Dispatch.borrow(sourcePlayer, lm); - DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); //update thief's inventory if (sourcePlayer.charItemManager != null) sourcePlayer.charItemManager.updateInventory(); //update victims inventory - if (owner.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (owner.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter ownerPC = (PlayerCharacter) owner; if (ownerPC.charItemManager != null) diff --git a/src/engine/powers/poweractions/SummonPowerAction.java b/src/engine/powers/poweractions/SummonPowerAction.java index 37c26b0d..810d519a 100644 --- a/src/engine/powers/poweractions/SummonPowerAction.java +++ b/src/engine/powers/poweractions/SummonPowerAction.java @@ -9,7 +9,7 @@ package engine.powers.poweractions; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.SessionManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; @@ -40,7 +40,7 @@ public class SummonPowerAction extends AbstractPowerAction { protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { - if (source == null || awo == null || !(awo.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) || !(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))) + if (source == null || awo == null || !(awo.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) || !(source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))) return; PlayerCharacter target = (PlayerCharacter) awo; @@ -61,7 +61,7 @@ public class SummonPowerAction extends AbstractPowerAction { location, false); Dispatch dispatch = Dispatch.borrow(target, rsrm); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } diff --git a/src/engine/powers/poweractions/TeleportPowerAction.java b/src/engine/powers/poweractions/TeleportPowerAction.java index 5f0c6e31..841cb9ff 100644 --- a/src/engine/powers/poweractions/TeleportPowerAction.java +++ b/src/engine/powers/poweractions/TeleportPowerAction.java @@ -9,9 +9,9 @@ package engine.powers.poweractions; -import engine.Enum; -import engine.Enum.ModType; -import engine.Enum.SourceType; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.gameManager.MovementManager; import engine.gameManager.PowersManager; import engine.gameManager.ZoneManager; @@ -39,7 +39,7 @@ public class TeleportPowerAction extends AbstractPowerAction { private static void failTeleport(PowersBase pb, AbstractCharacter awo) { - if (pb == null || awo == null || (!(awo.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)))) + if (pb == null || awo == null || (!(awo.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)))) return; //teleport failed. Reset teleport power diff --git a/src/engine/powers/poweractions/TransferStatPowerAction.java b/src/engine/powers/poweractions/TransferStatPowerAction.java index cca03e81..eb43391a 100644 --- a/src/engine/powers/poweractions/TransferStatPowerAction.java +++ b/src/engine/powers/poweractions/TransferStatPowerAction.java @@ -9,9 +9,9 @@ package engine.powers.poweractions; -import engine.Enum; -import engine.Enum.ModType; -import engine.Enum.SourceType; +import engine.mbEnums; +import engine.mbEnums.ModType; +import engine.mbEnums.SourceType; import engine.math.Vector3fImmutable; import engine.net.AbstractNetMsg; import engine.net.DispatchMessage; @@ -44,7 +44,7 @@ public class TransferStatPowerAction extends AbstractPowerAction { protected float transferEfficiencyRamp; protected boolean transferEfficiencyRampAdd; protected boolean targetToCaster; - protected Enum.DamageType damageType; + protected mbEnums.DamageType damageType; protected EffectsBase effect; public TransferStatPowerAction(ResultSet rs, HashMap effects) throws SQLException { @@ -78,7 +78,7 @@ public class TransferStatPowerAction extends AbstractPowerAction { // Damage type can sometimes be null in the DB. if (damageString.isEmpty() == false) - this.damageType = Enum.DamageType.getDamageType(damageString); + this.damageType = mbEnums.DamageType.getDamageType(damageString); } catch (Exception e) { this.damageType = null; } @@ -177,7 +177,7 @@ public class TransferStatPowerAction extends AbstractPowerAction { float max = min; float damage = 0f; - if (source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { + if (source.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { PlayerCharacter pc = (PlayerCharacter) source; float focus; CharacterSkill skill = pc.getSkills().get(pb.getSkillName()); diff --git a/src/engine/server/MBServerStatics.java b/src/engine/server/MBServerStatics.java index d7812146..8546fe01 100644 --- a/src/engine/server/MBServerStatics.java +++ b/src/engine/server/MBServerStatics.java @@ -9,8 +9,8 @@ package engine.server; -import engine.Enum; import engine.math.Vector3fImmutable; +import engine.mbEnums; public class MBServerStatics { @@ -383,7 +383,7 @@ public class MBServerStatics { public static float PLAYER_HATE_DELIMITER = 50; // reduces 50 hate a second public static float PLAYER_COMBAT_HATE_MODIFIER = 2; // DO NOT FINAL THESE FIELD! - public static Enum.AccountStatus accessLevel; // Min account level to login to server + public static mbEnums.AccountStatus accessLevel; // Min account level to login to server public static boolean blockLogin = false; public static boolean ENABLE_VAULT_FILL = false; public static boolean ENABLE_MOB_LOOT = true; diff --git a/src/engine/server/login/LoginServer.java b/src/engine/server/login/LoginServer.java index c70faaea..1c951e81 100644 --- a/src/engine/server/login/LoginServer.java +++ b/src/engine/server/login/LoginServer.java @@ -9,11 +9,11 @@ package engine.server.login; -import engine.Enum; import engine.gameManager.*; import engine.job.JobScheduler; import engine.jobs.CSessionCleanupJob; import engine.jobs.DisconnectJob; +import engine.mbEnums; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.Network; @@ -87,7 +87,7 @@ public class LoginServer { loginServer = new LoginServer(); ConfigManager.loginServer = loginServer; - ConfigManager.serverType = Enum.ServerType.LOGINSERVER; + ConfigManager.serverType = mbEnums.ServerType.LOGINSERVER; if (ConfigManager.init() == false) { Logger.error("ABORT! Missing config entry!"); @@ -192,7 +192,7 @@ public class LoginServer { origin.sendMsg(msg); } else { Dispatch dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.PRIMARY); + DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY); } @@ -314,7 +314,7 @@ public class LoginServer { DbManager.KitQueries.GET_ALL_KITS(); Logger.info("Initializing Race data"); - Enum.RaceType.initRaceTypeTables(); + mbEnums.RaceType.initRaceTypeTables(); Race.loadAllRaces(); Logger.info("Initializing Errant Guild"); @@ -491,11 +491,11 @@ public class LoginServer { switch (objectType) { case "account": - DbManager.removeFromCache(Enum.GameObjectType.Account, objectUUID); + DbManager.removeFromCache(mbEnums.GameObjectType.Account, objectUUID); break; case "character": - DbManager.removeFromCache(Enum.GameObjectType.PlayerCharacter, objectUUID); - PlayerCharacter player = (PlayerCharacter) DbManager.getObject(Enum.GameObjectType.PlayerCharacter, objectUUID); + DbManager.removeFromCache(mbEnums.GameObjectType.PlayerCharacter, objectUUID); + PlayerCharacter player = (PlayerCharacter) DbManager.getObject(mbEnums.GameObjectType.PlayerCharacter, objectUUID); PlayerCharacter.initializePlayer(player); player.getAccount().characterMap.replace(player.getObjectUUID(), player); Logger.info("Player active state is : " + player.isActive()); diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 73b76c02..a5079b09 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -9,10 +9,10 @@ package engine.server.world; -import engine.Enum; -import engine.Enum.DispatchChannel; -import engine.Enum.MinionType; -import engine.Enum.SupportMsgType; +import engine.mbEnums; +import engine.mbEnums.DispatchChannel; +import engine.mbEnums.MinionType; +import engine.mbEnums.SupportMsgType; import engine.InterestManagement.RealmMap; import engine.InterestManagement.WorldGrid; import engine.db.archive.DataWarehouse; @@ -69,7 +69,7 @@ public class WorldServer { public static int worldRealmMap = Integer.parseInt(ConfigManager.MB_WORLD_REALMMAP.getValue()); public static int worldUUID = 1; // Root object in database - public static Enum.AccountStatus worldAccessLevel = Enum.AccountStatus.valueOf(ConfigManager.MB_WORLD_ACCESS_LVL.getValue()); + public static mbEnums.AccountStatus worldAccessLevel = mbEnums.AccountStatus.valueOf(ConfigManager.MB_WORLD_ACCESS_LVL.getValue()); private static LocalDateTime bootTime = LocalDateTime.now(); public boolean isRunning = false; @@ -100,7 +100,7 @@ public class WorldServer { worldServer = new WorldServer(); - ConfigManager.serverType = Enum.ServerType.WORLDSERVER; + ConfigManager.serverType = mbEnums.ServerType.WORLDSERVER; ConfigManager.worldServer = worldServer; worldServer.init(); @@ -364,7 +364,7 @@ public class WorldServer { MapLoader.loadAlHeightMaps(); Logger.info("Loading Race data"); - Enum.RaceType.initRaceTypeTables(); + mbEnums.RaceType.initRaceTypeTables(); Race.loadAllRaces(); Logger.info("Loading building slot/stuck location data."); @@ -413,7 +413,7 @@ public class WorldServer { DbManager.ShrineQueries.LOAD_ALL_SHRINES(); Logger.info("Initialize Resource type lookup"); - Enum.ResourceType.InitializeResourceTypes(); + mbEnums.ResourceType.InitializeResourceTypes(); Logger.info("Loading Warehouse data."); DbManager.WarehouseQueries.LOAD_WAREHOUSES(); @@ -720,8 +720,8 @@ public class WorldServer { Logger.info("Msg: " + flashString); ChatSystemMsg msg = new ChatSystemMsg(null, flashString); - msg.setChannel(engine.Enum.ChatChannelType.FLASH.getChannelID()); - msg.setMessageType(Enum.ChatMessageType.INFO.ordinal()); + msg.setChannel(mbEnums.ChatChannelType.FLASH.getChannelID()); + msg.setMessageType(mbEnums.ChatMessageType.INFO.ordinal()); DispatchMessage.dispatchMsgToAll(msg); // Delete file diff --git a/src/engine/session/Session.java b/src/engine/session/Session.java index 8a8de33c..52b645bb 100644 --- a/src/engine/session/Session.java +++ b/src/engine/session/Session.java @@ -9,7 +9,7 @@ package engine.session; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.net.client.ClientConnection; import engine.objects.Account; @@ -34,8 +34,8 @@ public class Session { public PlayerCharacter getPlayerCharacter() { if (this.playerCharacter != null) { - if (DbManager.inCache(Enum.GameObjectType.PlayerCharacter, this.playerCharacter.getObjectUUID())) - this.playerCharacter = (PlayerCharacter) DbManager.getFromCache(Enum.GameObjectType.PlayerCharacter, this.playerCharacter.getObjectUUID()); + if (DbManager.inCache(mbEnums.GameObjectType.PlayerCharacter, this.playerCharacter.getObjectUUID())) + this.playerCharacter = (PlayerCharacter) DbManager.getFromCache(mbEnums.GameObjectType.PlayerCharacter, this.playerCharacter.getObjectUUID()); } return this.playerCharacter; } diff --git a/src/engine/workthreads/DestroyCityThread.java b/src/engine/workthreads/DestroyCityThread.java index ccb44c6d..a2222dd5 100644 --- a/src/engine/workthreads/DestroyCityThread.java +++ b/src/engine/workthreads/DestroyCityThread.java @@ -18,7 +18,7 @@ package engine.workthreads; * next reboot. */ -import engine.Enum; +import engine.mbEnums; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.GuildManager; @@ -63,7 +63,7 @@ public class DestroyCityThread implements Runnable { //Successful Update of guild - formerGuild.setGuildState(engine.Enum.GuildState.Errant); + formerGuild.setGuildState(mbEnums.GuildState.Errant); formerGuild.setNation(null); formerGuild.setCityUUID(0); GuildManager.updateAllGuildTags(formerGuild); @@ -97,12 +97,12 @@ public class DestroyCityThread implements Runnable { // Do nothing with the banestone. It will be removed elsewhere - if (cityBuilding.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.BANESTONE)) + if (cityBuilding.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.BANESTONE)) continue; // TOL is processed after all other structures in the city zone - if (cityBuilding.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL)) { + if (cityBuilding.getBlueprint().getBuildingGroup().equals(mbEnums.BuildingGroup.TOL)) { tol = cityBuilding; continue; } @@ -123,16 +123,16 @@ public class DestroyCityThread implements Runnable { // No longer a tree, no longer any protection contract! - cityBuilding.setProtectionState(Enum.ProtectionState.NONE); + cityBuilding.setProtectionState(mbEnums.ProtectionState.NONE); // Destroy all remaining city assets - if ((cityBuilding.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.BARRACK) + if ((cityBuilding.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.BARRACK) || (cityBuilding.getBlueprint().isWallPiece()) - || (cityBuilding.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.SHRINE) - || (cityBuilding.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.TOL) - || (cityBuilding.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.SPIRE) - || (cityBuilding.getBlueprint().getBuildingGroup() == Enum.BuildingGroup.WAREHOUSE)) { + || (cityBuilding.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.SHRINE) + || (cityBuilding.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.TOL) + || (cityBuilding.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.SPIRE) + || (cityBuilding.getBlueprint().getBuildingGroup() == mbEnums.BuildingGroup.WAREHOUSE)) { if (cityBuilding.getRank() != -1) BuildingManager.setRank(cityBuilding, -1); diff --git a/src/engine/workthreads/DisconnectTrashTask.java b/src/engine/workthreads/DisconnectTrashTask.java index b0cf6748..2171c857 100644 --- a/src/engine/workthreads/DisconnectTrashTask.java +++ b/src/engine/workthreads/DisconnectTrashTask.java @@ -8,7 +8,7 @@ package engine.workthreads; -import engine.Enum; +import engine.mbEnums; import engine.gameManager.DbManager; import engine.gameManager.SessionManager; import engine.objects.PlayerCharacter; @@ -45,7 +45,7 @@ public class DisconnectTrashTask extends TimerTask { // Remove account from cache - DbManager.removeFromCache(Enum.GameObjectType.Account, accountUID); + DbManager.removeFromCache(mbEnums.GameObjectType.Account, accountUID); } } diff --git a/src/engine/workthreads/HourlyJobThread.java b/src/engine/workthreads/HourlyJobThread.java index 26795745..057ca27d 100644 --- a/src/engine/workthreads/HourlyJobThread.java +++ b/src/engine/workthreads/HourlyJobThread.java @@ -9,11 +9,11 @@ package engine.workthreads; -import engine.Enum; import engine.InterestManagement.WorldGrid; import engine.db.archive.DataWarehouse; import engine.db.archive.MineRecord; import engine.gameManager.*; +import engine.mbEnums; import engine.net.DispatchMessage; import engine.net.MessageDispatcher; import engine.net.client.msg.chat.ChatSystemMsg; @@ -38,7 +38,7 @@ public class HourlyJobThread implements Runnable { for (Shrine shrine : Shrine.shrinesByBuildingUUID.values()) { try { - Building shrineBuilding = (Building) DbManager.getObject(Enum.GameObjectType.Building, shrine.getBuildingID()); + Building shrineBuilding = (Building) DbManager.getObject(mbEnums.GameObjectType.Building, shrine.getBuildingID()); if (shrineBuilding == null) continue; @@ -168,12 +168,12 @@ public class HourlyJobThread implements Runnable { ChatSystemMsg chatMsg = new ChatSystemMsg(null, mine.lastClaimer.getName() + " has claimed the mine in " + mine.getParentZone().parent.zoneName + " for " + mine.getOwningGuild().getName() + ". The mine is no longer active."); chatMsg.setMessageType(10); - chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); + chatMsg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID()); DispatchMessage.dispatchMsgToAll(chatMsg); // Warehouse this claim event - MineRecord mineRecord = MineRecord.borrow(mine, mine.lastClaimer, Enum.RecordEventType.CAPTURE); + MineRecord mineRecord = MineRecord.borrow(mine, mine.lastClaimer, mbEnums.RecordEventType.CAPTURE); DataWarehouse.pushToWarehouse(mineRecord); BuildingManager.setRank(mineBuilding, mineBuilding.getRank()); @@ -233,7 +233,7 @@ public class HourlyJobThread implements Runnable { if (LocalDateTime.now().getHour() == MINE_LATE_WINDOW) { Guild guild; - for (AbstractGameObject dbObject : DbManager.getList(Enum.GameObjectType.Guild)) { + for (AbstractGameObject dbObject : DbManager.getList(mbEnums.GameObjectType.Guild)) { guild = (Guild) dbObject; if (guild != null) @@ -261,7 +261,7 @@ public class HourlyJobThread implements Runnable { // Update city population values - ConcurrentHashMap map = DbManager.getMap(Enum.GameObjectType.City); + ConcurrentHashMap map = DbManager.getMap(mbEnums.GameObjectType.City); if (map != null) { diff --git a/src/engine/workthreads/TransferCityThread.java b/src/engine/workthreads/TransferCityThread.java index cd4d1cb4..bb59d3a1 100644 --- a/src/engine/workthreads/TransferCityThread.java +++ b/src/engine/workthreads/TransferCityThread.java @@ -15,7 +15,7 @@ package engine.workthreads; * */ -import engine.Enum; +import engine.mbEnums; import engine.gameManager.BuildingManager; import engine.gameManager.DbManager; import engine.gameManager.GuildManager; @@ -50,7 +50,7 @@ public class TransferCityThread implements Runnable { if (formerGuild != null) if (DbManager.GuildQueries.SET_GUILD_OWNED_CITY(formerGuild.getObjectUUID(), 0)) { - formerGuild.setGuildState(Enum.GuildState.Errant); + formerGuild.setGuildState(mbEnums.GuildState.Errant); formerGuild.setNation(null); formerGuild.setCityUUID(0); GuildManager.updateAllGuildTags(formerGuild); diff --git a/src/engine/workthreads/WarehousePushThread.java b/src/engine/workthreads/WarehousePushThread.java index 77c368f5..0e6fd8e3 100644 --- a/src/engine/workthreads/WarehousePushThread.java +++ b/src/engine/workthreads/WarehousePushThread.java @@ -15,7 +15,7 @@ package engine.workthreads; * */ -import engine.Enum; +import engine.mbEnums; import engine.db.archive.*; import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; @@ -359,7 +359,7 @@ public class WarehousePushThread implements Runnable { // Push records to remote database - for (Enum.DataRecordType recordType : Enum.DataRecordType.values()) { + for (mbEnums.DataRecordType recordType : mbEnums.DataRecordType.values()) { switch (recordType) { case PVP: