From e2cca6201f726422d0d6c08d0f1b59ce769a4901 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 20 Apr 2024 10:49:52 -0500 Subject: [PATCH] summon fix --- src/engine/gameManager/PowersManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 20a59151..22ccd7ee 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -1298,8 +1298,7 @@ public enum PowersManager { if (pc == null) return; - PlayerCharacter target = SessionManager - .getPlayerCharacterByLowerCaseName(msg.getTargetName()); + PlayerCharacter target = SessionManager.getPlayerCharacterByLowerCaseName(msg.getTargetName()); 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 @@ -1309,7 +1308,7 @@ 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){ + if(target != null && target.getGuild().getNation().equals(pc.getGuild().getNation()) == false){ ChatManager.chatInfoError(pc, "Cannot summon outside of nation."); }