resources count display bug fix by @AlfredoPagano

This commit is contained in:
Taras
2020-03-15 12:30:05 +02:00
committed by GitHub
parent aa2b0cde4b
commit ff30fe3b4c
+4 -1
View File
@@ -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);