mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-08 13:46:09 +00:00
fix: last batch of manual INT typecastings
This commit is contained in:
@@ -748,13 +748,13 @@ class Building {
|
||||
$newgold = $session->gold-1;
|
||||
$database->updateUserField($session->uid, "gold", $newgold, 1);
|
||||
$enought_res = 1;
|
||||
$q = "UPDATE ".TB_PREFIX."fdata set f".$jobs['field']." = ".$jobs['level'].", f".$jobs['field']."t = ".$jobs['type']." where vref = ".$jobs['wid'];
|
||||
$q = "UPDATE ".TB_PREFIX."fdata set f".$jobs['field']." = ".$jobs['level'].", f".$jobs['field']."t = ".(int) $jobs['type']." where vref = ".(int) $jobs['wid'];
|
||||
}
|
||||
}
|
||||
if($database->query($q) && ($enought_res == 1 or $jobs['master'] == 0)) {
|
||||
$database->modifyPop($jobs['wid'],$resource['pop'],0);
|
||||
$database->addCP($jobs['wid'],$resource['cp']);
|
||||
$q = "DELETE FROM ".TB_PREFIX."bdata where id = ".$jobs['id'];
|
||||
$q = "DELETE FROM ".TB_PREFIX."bdata where id = ".(int) $jobs['id'];
|
||||
$database->query($q);
|
||||
if($jobs['type'] == 18) {
|
||||
$owner = $database->getVillageField($jobs['wid'],"owner");
|
||||
@@ -779,7 +779,7 @@ class Building {
|
||||
if(count($stillbuildingarray) == 1) {
|
||||
if($stillbuildingarray[0]['loopcon'] == 1) {
|
||||
//$q = "UPDATE ".TB_PREFIX."bdata SET loopcon=0,timestamp=".(time()+$stillbuildingarray[0]['timestamp']-$innertimestamp)." WHERE id=".$stillbuildingarray[0]['id'];
|
||||
$q = "UPDATE ".TB_PREFIX."bdata SET loopcon=0 WHERE id=".$stillbuildingarray[0]['id'];
|
||||
$q = "UPDATE ".TB_PREFIX."bdata SET loopcon=0 WHERE id=".(int) $stillbuildingarray[0]['id'];
|
||||
$database->query($q);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user