forked from MagicBane/Server
cannot sub after placing bane, zerg multiplier reset when bane ends
This commit is contained in:
@@ -21,6 +21,7 @@ import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
import engine.net.client.msg.guild.InviteToSubMsg;
|
||||
import engine.objects.Bane;
|
||||
import engine.objects.Guild;
|
||||
import engine.objects.GuildStatusController;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -112,6 +113,12 @@ public class InviteToSubHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
//ensure bane to be subbed does not have a bane dropped
|
||||
for(Bane bane : Bane.banes.values()){
|
||||
if(bane.getOwner().guild.getNation().equals(targetGuild))
|
||||
return true;
|
||||
}
|
||||
|
||||
//all tests passed, let's send invite.
|
||||
|
||||
if (target.getClientConnection() != null) {
|
||||
|
||||
Reference in New Issue
Block a user