cannot be subbed if you have a bane placed
nations can only have 1 bane placed at a time
This commit is contained in:
@@ -25,6 +25,8 @@ import engine.objects.Guild;
|
||||
import engine.objects.GuildStatusController;
|
||||
import engine.objects.PlayerCharacter;
|
||||
|
||||
import static engine.objects.Bane.getBaneByAttackerGuild;
|
||||
|
||||
public class InviteToSubHandler extends AbstractClientMsgHandler {
|
||||
|
||||
public InviteToSubHandler() {
|
||||
@@ -110,6 +112,10 @@ public class InviteToSubHandler extends AbstractClientMsgHandler {
|
||||
if(targetGuild.getOwnedCity().getBane() != null)
|
||||
return true; // cannot be subbed if you have a bane placed on you
|
||||
|
||||
|
||||
if(getBaneByAttackerGuild(targetGuild) != null)
|
||||
return true; // cannot sub to a nation if you have a bane placed
|
||||
|
||||
//target must be GL or IC
|
||||
|
||||
if (GuildStatusController.isInnerCouncil(target.getGuildStatus()) == false && GuildStatusController.isGuildLeader(target.getGuildStatus()) == false) {
|
||||
|
||||
Reference in New Issue
Block a user