mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-30 17:44:22 +00:00
improve market at least
This commit is contained in:
@@ -593,6 +593,8 @@
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
return $dbarray['fieldtype'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************
|
||||
Function to retrieve if is ocuped via ID
|
||||
@@ -1543,7 +1545,6 @@
|
||||
}
|
||||
|
||||
function getVillageByName($name) {
|
||||
$name = mysql_real_escape_string($name, $this->connection);
|
||||
$q = "SELECT wref FROM " . TB_PREFIX . "vdata where name = '$name' limit 1";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
|
||||
@@ -105,10 +105,13 @@ class Market {
|
||||
}
|
||||
if($database->getVillageState($id)) {
|
||||
$timetaken = $generator->procDistanceTime($coor,$village->coor,$session->tribe,0);
|
||||
$res = $resource[0]+$resource[1]+$resource[2]+$resource[3];
|
||||
if($res!=0){
|
||||
$reference = $database->sendResource($resource[0],$resource[1],$resource[2],$resource[3],$reqMerc,0);
|
||||
$database->modifyResource($village->wid,$resource[0],$resource[1],$resource[2],$resource[3],0);
|
||||
$database->addMovement(0,$village->wid,$id,$reference,time(),time()+$timetaken);
|
||||
$logging->addMarketLog($village->wid,1,array($resource[0],$resource[1],$resource[2],$resource[3],$id));
|
||||
}
|
||||
}
|
||||
}
|
||||
header("Location: build.php?id=".$post['id']);
|
||||
|
||||
Reference in New Issue
Block a user