Declare the bane local at the top of placeWarehouse
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e450224902
commit
c97b4d7c3d
1 file changed
+4
-1
@@ -496,6 +496,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
|||||||
|
|
||||||
Zone serverZone;
|
Zone serverZone;
|
||||||
City cityObject;
|
City cityObject;
|
||||||
|
Bane bane;
|
||||||
PlacementInfo buildingList;
|
PlacementInfo buildingList;
|
||||||
|
|
||||||
// Retrieve the building details we're placing
|
// Retrieve the building details we're placing
|
||||||
@@ -534,7 +535,9 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
|||||||
|
|
||||||
// A rebuilt warehouse would orphan the destroyed warehouse's loot
|
// A rebuilt warehouse would orphan the destroyed warehouse's loot
|
||||||
|
|
||||||
if (cityObject.getBane() != null) {
|
bane = cityObject.getBane();
|
||||||
|
|
||||||
|
if (bane != null) {
|
||||||
PlaceAssetMsg.sendPlaceAssetError(origin, 1, "Cannot place a warehouse during an active bane.");
|
PlaceAssetMsg.sendPlaceAssetError(origin, 1, "Cannot place a warehouse during an active bane.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user