Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Fix $costresource (#245)
Browse files Browse the repository at this point in the history
Fix the price of the research
  • Loading branch information
Jbaukens authored and jkroepke committed Aug 15, 2016
1 parent 0ca4d35 commit 8174dea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/pages/game/ShowResearchPage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private function AddBuildingToQueue($elementId, $AddMode = true)
return false;
}

$costResources = BuildFunctions::getElementPrice($USER, $PLANET, $elementId, !$AddMode);
$costResources = BuildFunctions::getElementPrice($USER, $PLANET, $elementId, !$AddMode, $BuildLevel);

if(!BuildFunctions::isElementBuyable($USER, $PLANET, $elementId, $costResources))
{
Expand Down Expand Up @@ -376,7 +376,7 @@ public function show()
$levelToBuild = $USER[$resource[$elementId]];
}

$costResources = BuildFunctions::getElementPrice($USER, $PLANET, $elementId, false, $levelToBuild);
$costResources = BuildFunctions::getElementPrice($USER, $PLANET, $elementId, false, $levelToBuild+1);
$costOverflow = BuildFunctions::getRestPrice($USER, $PLANET, $elementId, $costResources);
$elementTime = BuildFunctions::getBuildingTime($USER, $PLANET, $elementId, $costResources);
$buyable = $QueueCount != 0 || BuildFunctions::isElementBuyable($USER, $PLANET, $elementId, $costResources);
Expand Down

0 comments on commit 8174dea

Please sign in to comment.