guilds MOTD now persist
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user