Browse Source

guild lookup no lonkger retursn null, return ErrantGuild

combat-3
FatBoy-DOTC 5 months ago
parent
commit
8ff06b1200
  1. 6
      src/engine/objects/City.java

6
src/engine/objects/City.java

@ -639,17 +639,17 @@ public class City extends AbstractWorldObject { @@ -639,17 +639,17 @@ public class City extends AbstractWorldObject {
public Guild getGuild() {
if (this.getTOL() == null)
return null;
return Guild.getErrantGuild();
if (this.isNpc == 1) {
if (this.getTOL().getOwner() == null)
return null;
return Guild.getErrantGuild();
return this.getTOL().getOwner().getGuild();
} else {
if (this.getTOL().getOwner() == null)
return null;
return Guild.getErrantGuild();
return this.getTOL().getOwner().getGuild();
}
}

Loading…
Cancel
Save