Browse Source

upgraded protection for variables

combat-2
MagicBot 8 months ago
parent
commit
31c83f2bb5
  1. 3
      src/engine/db/archive/GuildRecord.java
  2. 8
      src/engine/mbEnums.java

3
src/engine/db/archive/GuildRecord.java

@ -89,7 +89,8 @@ public class GuildRecord extends DataRecord {
guildRecord.guildHash = guildRecord.guild.getHash(); guildRecord.guildHash = guildRecord.guild.getHash();
guildRecord.guildID = guildRecord.guild.getObjectUUID(); guildRecord.guildID = guildRecord.guild.getObjectUUID();
guildRecord.guildName = guildRecord.guild.getName(); 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()); guildRecord.GLHash = DataWarehouse.hasher.encrypt(guildRecord.guild.getGuildLeaderUUID());

8
src/engine/mbEnums.java

@ -2535,10 +2535,10 @@ public class mbEnums {
public final EnumSet<ClassType> requiredClasses; public final EnumSet<ClassType> requiredClasses;
public final EnumSet<MonsterType> requiredRaces; public final EnumSet<MonsterType> requiredRaces;
public final EnumSet<SexType> sexRequired; public final EnumSet<SexType> sexRequired;
private final String name; public final String name;
private final String[][] ranks; //Stored Rank#->Gender(M,F) private final String[][] ranks; //Stored Rank#->Gender(M,F)
private final String[] leadershipTypes; private final String[] leadershipTypes;
private final int templateID; public final int templateID;
GuildCharterType(String name, String[][] ranks, String[] leadershipTypes, EnumSet<ClassType> requiredClasses, GuildCharterType(String name, String[][] ranks, String[] leadershipTypes, EnumSet<ClassType> requiredClasses,
EnumSet<MonsterType> requiredRaces, EnumSet<SexType> sexRequired, int templateID) { EnumSet<MonsterType> requiredRaces, EnumSet<SexType> sexRequired, int templateID) {
@ -2631,10 +2631,6 @@ public class mbEnums {
return GuildCharterType.values()[i]; return GuildCharterType.values()[i];
} }
public String getCharterName() {
return this.name;
}
public int getNumberOfRanks() { public int getNumberOfRanks() {
return ranks.length; return ranks.length;
} }

Loading…
Cancel
Save