Browse Source

Merged the two errant guild methods.

master
MagicBot 2 years ago
parent
commit
715fdeec9e
  1. 4
      src/engine/net/client/msg/guild/GuildInfoMsg.java
  2. 8
      src/engine/objects/Guild.java

4
src/engine/net/client/msg/guild/GuildInfoMsg.java

@ -373,7 +373,7 @@ class GuildInfoMessageType5 extends GuildInfoMessageType {
if(pc != null && g != null && g.getObjectUUID() != 0) { if(pc != null && g != null && g.getObjectUUID() != 0) {
Guild n = g.getNation(); Guild n = g.getNation();
if(n == null) { if(n == null) {
n = Guild.getErrantNation(); n = Guild.getErrantGuild();
} }
writer.putInt(ago.getObjectType().ordinal()); writer.putInt(ago.getObjectType().ordinal());
@ -412,7 +412,7 @@ class GuildInfoMessageType5 extends GuildInfoMessageType {
writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus())); //Title writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus())); //Title
writer.putInt(g.getCharter()); writer.putInt(g.getCharter());
if(g.getNation().equals(Guild.getErrantNation())) if(g.getNation().equals(Guild.getErrantGuild()))
writer.putString("Errant"); writer.putString("Errant");
else else
writer.putString("City"); writer.putString("City");

8
src/engine/objects/Guild.java

@ -725,18 +725,12 @@ Guild.serializeForClientMsg(guild,writer, null, false);
public static Guild getErrantGuild() { public static Guild getErrantGuild() {
return Guild.getErrantNation();
}
public static Guild getErrantNation() {
if (Guild.errant == null) if (Guild.errant == null)
Guild.errant = new Guild("None", null, 10, "Despot Rule", GuildTag.ERRANT, 0); Guild.errant = new Guild("None", null, 10, "Despot Rule", GuildTag.ERRANT, 0);
return Guild.errant; return Guild.errant;
} }
/*
* Game Object Manager
*/
public static Guild getGuild(final int objectUUID) { public static Guild getGuild(final int objectUUID) {
if (objectUUID == 0) if (objectUUID == 0)

Loading…
Cancel
Save