Browse Source

guilds MOTD now persist

lakebane-strongholds
FatBoy-DOTC 3 months ago
parent
commit
405063f036
  1. 13
      src/engine/net/client/handlers/MOTDEditHandler.java
  2. 4
      src/engine/objects/Guild.java

13
src/engine/net/client/handlers/MOTDEditHandler.java

@ -62,16 +62,23 @@ public class MOTDEditHandler extends AbstractClientMsgHandler { @@ -62,16 +62,23 @@ public class MOTDEditHandler extends AbstractClientMsgHandler {
return true;
}
if (type == 1) // Guild MOTD
if (type == 1) { // Guild MOTD
msg.setMessage(guild.getMOTD());
else if (type == 3) // IC MOTD
guild.updateDatabase();
}else if (type == 3) { // IC MOTD
msg.setMessage(guild.getICMOTD());
else if (type == 0) { // Nation MOTD
guild.updateDatabase();
}else if (type == 0) { // Nation MOTD
Guild nation = guild.getNation();
if (nation == null || !nation.isNation()) {
ErrorPopupMsg.sendErrorMsg(playerCharacter, "You do not have such authority!");
return true;
}
nation.setNMOTD(msg.getMessage());
nation.updateDatabase();
for(Guild sub : nation.getSubGuildList()){
sub.setNMOTD(nation.getNMOTD());
}
msg.setMessage(nation.getMOTD());
}
dispatch = Dispatch.borrow(playerCharacter, msg);

4
src/engine/objects/Guild.java

@ -521,6 +521,10 @@ public class Guild extends AbstractWorldObject { @@ -521,6 +521,10 @@ public class Guild extends AbstractWorldObject {
public void setICMOTD(String value) {
this.icmotd = value;
}
public void setNMOTD(String value) {
this.nmotd = value;
}
public String getNMOTD(){return nmotd;}
public boolean isNPCGuild() {

Loading…
Cancel
Save