Lore Rules

This commit is contained in:
2024-02-15 19:46:41 -06:00
parent c1de1f148b
commit c80b9013d2
7 changed files with 90 additions and 19 deletions
@@ -14,6 +14,7 @@ import engine.Enum;
import engine.Enum.GameObjectType;
import engine.exception.MsgSendException;
import engine.gameManager.ChatManager;
import engine.gameManager.ConfigManager;
import engine.gameManager.GuildManager;
import engine.gameManager.SessionManager;
import engine.net.Dispatch;
@@ -124,7 +125,12 @@ public class InviteToGuildHandler extends AbstractClientMsgHandler {
ErrorPopupMsg.sendErrorPopup(sourcePlayer, 135);// you do not meet the level required for this SWORN guild
return true;
}
if(ConfigManager.MB_RULESET.getValue() == "LORE") {
if (GuildManager.meetsLoreRequirements(sourcePlayer.guild, targetPlayer) == false) {
ChatManager.chatGuildError(sourcePlayer,targetPlayer.getFirstName() + " does not meet charter requirements!");
return true;
}
}
targetPlayer.setLastGuildToInvite(sourcePlayer.getGuild().getObjectUUID());
// setup guild invite message to send to targetPlayer