mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-20 03:26:10 +00:00
update removeBuilding function (sorry, i forgot it, i hope is the last)
This commit is contained in:
@@ -1629,11 +1629,19 @@
|
|||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($SameBuildCount < 8){
|
||||||
$uprequire1 = $building->resourceRequired($jobs[$jobMaster]['field'],$jobs[$jobMaster]['type'],2);
|
$uprequire1 = $building->resourceRequired($jobs[$jobMaster]['field'],$jobs[$jobMaster]['type'],2);
|
||||||
$time1 = $uprequire1['time'];
|
$time1 = $uprequire1['time'];
|
||||||
$timestamp1 = $time1;
|
$timestamp1 = $time1;
|
||||||
$q1 = "UPDATE " . TB_PREFIX . "bdata SET level=level-1,timestamp=".$timestamp1." WHERE id=".$jobs[$jobMaster]['id']."";
|
$q1 = "UPDATE " . TB_PREFIX . "bdata SET level=level-1,timestamp=".$timestamp1." WHERE id=".$jobs[$jobMaster]['id']."";
|
||||||
mysql_query($q1, $this->connection);
|
mysql_query($q1, $this->connection);
|
||||||
|
}else{
|
||||||
|
$uprequire1 = $building->resourceRequired($jobs[$jobMaster]['field'],$jobs[$jobMaster]['type'],1);
|
||||||
|
$time1 = $uprequire1['time'];
|
||||||
|
$timestamp1 = $time1;
|
||||||
|
$q1 = "UPDATE " . TB_PREFIX . "bdata SET level=level-1,timestamp=".$timestamp1." WHERE id=".$jobs[$jobMaster]['id']."";
|
||||||
|
mysql_query($q1, $this->connection);
|
||||||
|
}
|
||||||
}else if($d == $jobs[floor($SameBuildCount / 3)]['id'] || $d == $jobs[floor($SameBuildCount / 2) + 1]['id']) {
|
}else if($d == $jobs[floor($SameBuildCount / 3)]['id'] || $d == $jobs[floor($SameBuildCount / 2) + 1]['id']) {
|
||||||
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=" . $jobs[floor($SameBuildCount / 3)]['timestamp'] . " WHERE master = 0 AND id > ".$d." and (ID=" . $jobs[floor($SameBuildCount / 3)]['id'] . " OR ID=" . $jobs[floor($SameBuildCount / 2) + 1]['id'] . ")";
|
$q = "UPDATE " . TB_PREFIX . "bdata SET loopcon=0,level=level-1,timestamp=" . $jobs[floor($SameBuildCount / 3)]['timestamp'] . " WHERE master = 0 AND id > ".$d." and (ID=" . $jobs[floor($SameBuildCount / 3)]['id'] . " OR ID=" . $jobs[floor($SameBuildCount / 2) + 1]['id'] . ")";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
|
|||||||
Reference in New Issue
Block a user