Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
@@ -23,60 +23,60 @@ import engine.objects.PlayerCharacter;
public class MOTDCommitHandler extends AbstractClientMsgHandler {
public MOTDCommitHandler() {
super(MOTDCommitMsg.class);
}
public MOTDCommitHandler() {
super(MOTDCommitMsg.class);
}
@Override
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException {
MOTDCommitMsg msg = (MOTDCommitMsg) baseMsg;
Dispatch dispatch;
@Override
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException {
MOTDCommitMsg msg = (MOTDCommitMsg) baseMsg;
Dispatch dispatch;
// get source player
PlayerCharacter sourcePlayer = SessionManager.getPlayerCharacter(
origin);
// get source player
PlayerCharacter sourcePlayer = SessionManager.getPlayerCharacter(
origin);
if (sourcePlayer == null)
return true;
if (sourcePlayer == null)
return true;
int type = msg.getType();
int type = msg.getType();
if (type == 0 || type == 1 || type == 3) {
if (type == 0 || type == 1 || type == 3) {
if (GuildStatusController.isInnerCouncil(sourcePlayer.getGuildStatus()) == false)
return true;
if (GuildStatusController.isInnerCouncil(sourcePlayer.getGuildStatus()) == false)
return true;
Guild guild = sourcePlayer.getGuild();
Guild guild = sourcePlayer.getGuild();
if (guild == null)
return true;
if (guild == null)
return true;
if (type == 1) { // Guild MOTD
guild.setMOTD(msg.getMessage());
ChatManager.chatGuildMOTD(sourcePlayer, msg.getMessage(),
true);
} else if (type == 3) { // IC MOTD
guild.setICMOTD(msg.getMessage());
ChatManager
.chatICMOTD(sourcePlayer, msg.getMessage(), true);
} else if (type == 0) { // Nation MOTD
Guild nation = guild.getNation();
if (nation == null)
return true;
if (nation.isNation()) { // only
// nation's
// primary guild can
// set nation motd
nation.setMOTD(msg.getMessage());
ChatManager.chatNationMOTD(sourcePlayer,
msg.getMessage(), true);
}
}
if (type == 1) { // Guild MOTD
guild.setMOTD(msg.getMessage());
ChatManager.chatGuildMOTD(sourcePlayer, msg.getMessage(),
true);
} else if (type == 3) { // IC MOTD
guild.setICMOTD(msg.getMessage());
ChatManager
.chatICMOTD(sourcePlayer, msg.getMessage(), true);
} else if (type == 0) { // Nation MOTD
Guild nation = guild.getNation();
if (nation == null)
return true;
if (nation.isNation()) { // only
// nation's
// primary guild can
// set nation motd
nation.setMOTD(msg.getMessage());
ChatManager.chatNationMOTD(sourcePlayer,
msg.getMessage(), true);
}
}
dispatch = Dispatch.borrow(sourcePlayer, msg);
DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY);
}
return true;
}
}
return true;
}
}