diff --git a/GameEngine/Village.php b/GameEngine/Village.php index 56e93ed2..e450f848 100755 --- a/GameEngine/Village.php +++ b/GameEngine/Village.php @@ -152,7 +152,7 @@ class Village { global $technology, $database, $session; // clear cache, since we're updating village data - call_user_func(get_class($database).'::clearVillageCache'); + call_user_func(get_class($database).'::clearVillageCache'); $upkeep = $technology->getUpkeep($this->unitall, 0, $this->wid); $this->production['wood'] = $this->getWoodProd(); $this->production['clay'] = $this->getClayProd(); @@ -169,6 +169,9 @@ class Village { $niron = min(($this->production['iron'] / 3600) * $timepast, $this->maxstore); $ncrop = min(($this->production['crop'] / 3600) * $timepast, $this->maxcrop); + // clear cache, since we're updating village data + call_user_func(get_class($database).'::clearVillageCache'); + $database->modifyResource($this->wid, $nwood, $nclay, $niron, $ncrop, 1); $database->updateVillage($this->wid); $this->LoadTown(true);