From 75ea9092e2517982d43157bacf65698ac0a20098 Mon Sep 17 00:00:00 2001 From: fatboy Date: Thu, 18 Apr 2024 13:19:21 -0500 Subject: [PATCH] cannot group outside of nation --- src/engine/net/client/handlers/GroupInviteHandler.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/net/client/handlers/GroupInviteHandler.java b/src/engine/net/client/handlers/GroupInviteHandler.java index bef9a198..0040df7b 100644 --- a/src/engine/net/client/handlers/GroupInviteHandler.java +++ b/src/engine/net/client/handlers/GroupInviteHandler.java @@ -21,6 +21,7 @@ import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.group.GroupInviteMsg; import engine.net.client.msg.group.GroupUpdateMsg; import engine.objects.Group; +import engine.objects.Guild; import engine.objects.PlayerCharacter; public class GroupInviteHandler extends AbstractClientMsgHandler { @@ -103,6 +104,12 @@ public class GroupInviteHandler extends AbstractClientMsgHandler { if (target.isIgnoringPlayer(source)) return false; + if(source.getGuild().getNation().equals(target.getGuild().getNation()) == false) + return false; // cannot group outside of nation + + if(source.getGuild().getNation().equals(target.getGuild().getNation()) && source.getGuild().getNation().equals(Guild.getErrantGuild())) + if(source.getGuild().equals(target.getGuild()) == false) + return false; // cannot group as an errant guild with other errant guilds // dont block invites to people already in a group and // dont check for pending invites, the client does it