Charter template id is stored not ordinal

This commit is contained in:
2024-04-28 14:18:13 -04:00
parent 4f20cc9aba
commit 3c4d8239db
12 changed files with 25 additions and 30 deletions
+6 -10
View File
@@ -38,7 +38,7 @@ public class Guild extends AbstractWorldObject {
private static Guild errantNation;
private final String name;
private final GuildTag guildTag;
private final int charter;
public final GuildCharterType charter;
private final String leadershipType; // Have to see how this is sent to the client
private final int repledgeMin;
private final int repledgeMax;
@@ -71,7 +71,7 @@ public class Guild extends AbstractWorldObject {
/**
* No Id Constructor
*/
public Guild(String name, Guild nat, int charter,
public Guild(String name, Guild nat, GuildCharterType charter,
String leadershipType, GuildTag gt, String motto) {
super();
this.name = name;
@@ -100,7 +100,7 @@ public class Guild extends AbstractWorldObject {
/**
* Normal Constructor
*/
public Guild(String name, Guild nat, int charter,
public Guild(String name, Guild nat, GuildCharterType charter,
String leadershipType, GuildTag gt, int newUUID) {
super(newUUID);
this.name = name;
@@ -134,7 +134,7 @@ public class Guild extends AbstractWorldObject {
DbObjectType objectType;
this.name = rs.getString("name");
this.charter = rs.getInt("charter");
this.charter = GuildCharterType.templateLookup.get(rs.getInt("charter"));
this.leadershipType = rs.getString("leadershipType");
this.guildTag = new GuildTag(rs.getInt("backgroundColor01"),
@@ -311,7 +311,7 @@ public class Guild extends AbstractWorldObject {
public static Guild getErrantGuild() {
if (Guild.errantGuild == null)
Guild.errantGuild = new Guild("None", Guild.getErrantNation(), 0,
Guild.errantGuild = new Guild("None", Guild.getErrantNation(), GuildCharterType.NONE,
"Anarchy", GuildTag.ERRANT, 0);
return Guild.errantGuild;
@@ -319,7 +319,7 @@ public class Guild extends AbstractWorldObject {
public static Guild getErrantNation() {
if (Guild.errantNation == null)
Guild.errantNation = new Guild("None", null, 10, "Despot Rule", GuildTag.ERRANT, 0);
Guild.errantNation = new Guild("None", null, GuildCharterType.NONE, "Despot Rule", GuildTag.ERRANT, 0);
return Guild.errantNation;
}
@@ -456,10 +456,6 @@ public class Guild extends AbstractWorldObject {
return this.guildTag;
}
public int getCharter() {
return charter;
}
/*
* Utils
*/