Browse Source

summon fix

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
e2cca6201f
  1. 5
      src/engine/gameManager/PowersManager.java

5
src/engine/gameManager/PowersManager.java

@ -1298,8 +1298,7 @@ public enum PowersManager {
if (pc == null) if (pc == null)
return; return;
PlayerCharacter target = SessionManager PlayerCharacter target = SessionManager.getPlayerCharacterByLowerCaseName(msg.getTargetName());
.getPlayerCharacterByLowerCaseName(msg.getTargetName());
if (target == null || target.equals(pc) || target.isCombat() || target.getGuild().getNation().equals(pc.getGuild().getNation()) == false) { 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 if (target == null) // Player not found. Send not found message
@ -1309,7 +1308,7 @@ public enum PowersManager {
ChatManager.chatInfoError(pc, ChatManager.chatInfoError(pc,
"Cannot summon player in combat."); "Cannot summon player in combat.");
// else trying to summon self, just fail // 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, ChatManager.chatInfoError(pc,
"Cannot summon outside of nation."); "Cannot summon outside of nation.");
} }

Loading…
Cancel
Save