Browse Source

cannot group outside of nation

lakebane-master
fatboy 8 months ago
parent
commit
75ea9092e2
  1. 7
      src/engine/net/client/handlers/GroupInviteHandler.java

7
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.GroupInviteMsg;
import engine.net.client.msg.group.GroupUpdateMsg; import engine.net.client.msg.group.GroupUpdateMsg;
import engine.objects.Group; import engine.objects.Group;
import engine.objects.Guild;
import engine.objects.PlayerCharacter; import engine.objects.PlayerCharacter;
public class GroupInviteHandler extends AbstractClientMsgHandler { public class GroupInviteHandler extends AbstractClientMsgHandler {
@ -103,6 +104,12 @@ public class GroupInviteHandler extends AbstractClientMsgHandler {
if (target.isIgnoringPlayer(source)) if (target.isIgnoringPlayer(source))
return false; 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 block invites to people already in a group and
// dont check for pending invites, the client does it // dont check for pending invites, the client does it

Loading…
Cancel
Save