From e708bb02f5f0203d8eb82729d643fdb2e44e8683 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 21 Apr 2024 16:42:08 -0500 Subject: [PATCH] npc buildings dont accumulate gold --- src/engine/objects/Building.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Building.java b/src/engine/objects/Building.java index 9c577ed9..e7728433 100644 --- a/src/engine/objects/Building.java +++ b/src/engine/objects/Building.java @@ -1000,7 +1000,10 @@ public class Building extends AbstractWorldObject { public final boolean setStrongboxValue(int newValue) { boolean success = true; - + if(this.isOwnerIsNPC()) { + newValue = 0; + this.setStrongboxValue(0); + } try { DbManager.BuildingQueries.SET_PROPERTY(this, "currentGold", newValue); this._strongboxValue = newValue;