Block warehouse placement while the city has a bane

Placing a new warehouse discards the destroyed warehouse's rubble loot,
so defenders could deny attackers the loot by rebuilding mid-siege.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-18 10:09:31 -04:00
1 parent 875809efe0
commit e450224902
1 file changed
+7
@@ -532,6 +532,13 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
return false;
}
// A rebuilt warehouse would orphan the destroyed warehouse's loot
if (cityObject.getBane() != null) {
PlaceAssetMsg.sendPlaceAssetError(origin, 1, "Cannot place a warehouse during an active bane.");
return false;
}
// Create the warehouse object and it's entry in the database
if (createWarehouse(player, msg.getFirstPlacementInfo(), serverZone) == false) {