From f8a584d000f22c1f1f8ba5f27e25af70ea0eba48 Mon Sep 17 00:00:00 2001 From: fatboy Date: Thu, 18 Apr 2024 13:27:01 -0500 Subject: [PATCH] cannot summon outside of nation --- src/engine/gameManager/PowersManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index c03c16a0..20a59151 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -1300,7 +1300,7 @@ public enum PowersManager { PlayerCharacter target = SessionManager .getPlayerCharacterByLowerCaseName(msg.getTargetName()); - if (target == null || target.equals(pc) || target.isCombat()) { + if (target == null || target.equals(pc) || target.isCombat() || target.getGuild().getNation().equals(pc.getGuild().getNation()) == false) { if (target == null) // Player not found. Send not found message ChatManager.chatInfoError(pc, @@ -1309,7 +1309,10 @@ public enum PowersManager { ChatManager.chatInfoError(pc, "Cannot summon player in combat."); // else trying to summon self, just fail - + if(target.getGuild().getNation().equals(pc.getGuild().getNation()) == false){ + ChatManager.chatInfoError(pc, + "Cannot summon outside of nation."); + } // recycle summon sendRecyclePower(msg.getPowerToken(), origin);