summaryrefslogtreecommitdiff
path: root/src/Controller/Building.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Controller/Building.php')
-rw-r--r--src/Controller/Building.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Controller/Building.php b/src/Controller/Building.php
index 876f474..e141113 100644
--- a/src/Controller/Building.php
+++ b/src/Controller/Building.php
@@ -28,7 +28,9 @@ class Building
// event
$event = new Event();
- $event->time = (new \DateTime())->add(\DateInterval::createFromDateString($building->getBuildTime() . ' seconds'));
+ $event->time = (new \DateTime())->add(\DateInterval::createFromDateString(
+ $building->getBuildTimeForLevel($building->getEffectiveLevel() + 1) . ' seconds'
+ ));
$event->villageId = $building->villageId;
$upgradeBuildingEvent = new UpgradeBuilding();
$upgradeBuildingEvent->event = $event;