cannot summon outside of nation

This commit is contained in:
2024-04-18 13:27:01 -05:00
parent 7c2915928d
commit f8a584d000
+5 -2
View File
@@ -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);