mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-25 12:37:13 +00:00
resources count display bug fix by @AlfredoPagano
This commit is contained in:
@@ -152,7 +152,7 @@ class Village {
|
|||||||
global $technology, $database, $session;
|
global $technology, $database, $session;
|
||||||
|
|
||||||
// clear cache, since we're updating village data
|
// 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);
|
$upkeep = $technology->getUpkeep($this->unitall, 0, $this->wid);
|
||||||
$this->production['wood'] = $this->getWoodProd();
|
$this->production['wood'] = $this->getWoodProd();
|
||||||
$this->production['clay'] = $this->getClayProd();
|
$this->production['clay'] = $this->getClayProd();
|
||||||
@@ -169,6 +169,9 @@ class Village {
|
|||||||
$niron = min(($this->production['iron'] / 3600) * $timepast, $this->maxstore);
|
$niron = min(($this->production['iron'] / 3600) * $timepast, $this->maxstore);
|
||||||
$ncrop = min(($this->production['crop'] / 3600) * $timepast, $this->maxcrop);
|
$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->modifyResource($this->wid, $nwood, $nclay, $niron, $ncrop, 1);
|
||||||
$database->updateVillage($this->wid);
|
$database->updateVillage($this->wid);
|
||||||
$this->LoadTown(true);
|
$this->LoadTown(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user