yes as i said before its for localhost; i tested it and you are right .
i come up with fast and new and better solution now
open showofficierpage.class.php
find this and edit as follows to remove weapon technology update from officers
public function UpdateExtra($Element)
{
global $PLANET, $USER, $resource, $pricelist;
var_dump($Element); // delete this when you finished and make control.
if ($Element != 701) { // add this line
$costResources= BuildFunctions::getElementPrice($USER, $PLANET, $Element);
if (!BuildFunctions::isElementBuyable($USER, $PLANET, $Element, $costResources)) {
return;
}
$USER[$resource[$Element]] = max($USER[$resource[$Element]], TIMESTAMP) + $pricelist[$Element]['time'];
if(isset($costResources[901])) { $PLANET[$resource[901]] -= $costResources[901]; }
if(isset($costResources[902])) { $PLANET[$resource[902]] -= $costResources[902]; }
if(isset($costResources[903])) { $PLANET[$resource[903]] -= $costResources[903]; }
if(isset($costResources[921])) { $USER[$resource[921]]-= $costResources[921]; }
$sql = 'UPDATE %%USERS%% SET
'.$resource[$Element].' = :newTime
WHERE
id = :userId;';
Database::get()->update($sql, array(
':newTime' => $USER[$resource[$Element]],
':userId' => $USER['id']
));
}
}
i tested it even if you change html input value you cannot buy officier
i come up with fast and new and better solution now
open showofficierpage.class.php
find this and edit as follows to remove weapon technology update from officers
public function UpdateExtra($Element)
{
global $PLANET, $USER, $resource, $pricelist;
var_dump($Element); // delete this when you finished and make control.
if ($Element != 701) { // add this line
$costResources= BuildFunctions::getElementPrice($USER, $PLANET, $Element);
if (!BuildFunctions::isElementBuyable($USER, $PLANET, $Element, $costResources)) {
return;
}
$USER[$resource[$Element]] = max($USER[$resource[$Element]], TIMESTAMP) + $pricelist[$Element]['time'];
if(isset($costResources[901])) { $PLANET[$resource[901]] -= $costResources[901]; }
if(isset($costResources[902])) { $PLANET[$resource[902]] -= $costResources[902]; }
if(isset($costResources[903])) { $PLANET[$resource[903]] -= $costResources[903]; }
if(isset($costResources[921])) { $USER[$resource[921]]-= $costResources[921]; }
$sql = 'UPDATE %%USERS%% SET
'.$resource[$Element].' = :newTime
WHERE
id = :userId;';
Database::get()->update($sql, array(
':newTime' => $USER[$resource[$Element]],
':userId' => $USER['id']
));
}
}
i tested it even if you change html input value you cannot buy officier