From 31c83f2bb5e163901175f0f70ab067b778ee06ae Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 28 Apr 2024 13:26:07 -0400 Subject: [PATCH] upgraded protection for variables --- src/engine/db/archive/GuildRecord.java | 3 ++- src/engine/mbEnums.java | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/engine/db/archive/GuildRecord.java b/src/engine/db/archive/GuildRecord.java index e1cc4a1b..a2ad5a17 100644 --- a/src/engine/db/archive/GuildRecord.java +++ b/src/engine/db/archive/GuildRecord.java @@ -89,7 +89,8 @@ public class GuildRecord extends DataRecord { guildRecord.guildHash = guildRecord.guild.getHash(); guildRecord.guildID = guildRecord.guild.getObjectUUID(); guildRecord.guildName = guildRecord.guild.getName(); - guildRecord.charterName = mbEnums.GuildCharterType.getGuildTypeFromInt(guildRecord.guild.getCharter()).getCharterName(); + mbEnums.GuildCharterType guildCharterType = mbEnums.GuildCharterType.getGuildTypeFromInt(guildRecord.guild.getCharter()); + guildRecord.charterName = guildCharterType.name; guildRecord.GLHash = DataWarehouse.hasher.encrypt(guildRecord.guild.getGuildLeaderUUID()); diff --git a/src/engine/mbEnums.java b/src/engine/mbEnums.java index 33406f48..974d5454 100644 --- a/src/engine/mbEnums.java +++ b/src/engine/mbEnums.java @@ -2535,10 +2535,10 @@ public class mbEnums { public final EnumSet requiredClasses; public final EnumSet requiredRaces; public final EnumSet sexRequired; - private final String name; + public final String name; private final String[][] ranks; //Stored Rank#->Gender(M,F) private final String[] leadershipTypes; - private final int templateID; + public final int templateID; GuildCharterType(String name, String[][] ranks, String[] leadershipTypes, EnumSet requiredClasses, EnumSet requiredRaces, EnumSet sexRequired, int templateID) { @@ -2631,10 +2631,6 @@ public class mbEnums { return GuildCharterType.values()[i]; } - public String getCharterName() { - return this.name; - } - public int getNumberOfRanks() { return ranks.length; }