more fixes and changes

This commit is contained in:
unknown
2012-06-25 03:12:17 +03:00
parent ba3eba0cc7
commit 337717bcb1
14 changed files with 51 additions and 53 deletions
+1 -6
View File
@@ -95,13 +95,8 @@ class Market {
$reqMerc = ceil((array_sum($resource)-0.1)/$this->maxcarry);
if($this->merchantAvail() != 0 && $reqMerc <= $this->merchantAvail()) {
if(isset($post['x']) && isset($post['y']) && $post['x'] != "" && $post['y'] != "") {
$coor = array('x'=>$post['x'], 'y'=>$post['y']);
$id = $generator->getBaseID($coor['x'],$coor['y']);
}else if(isset($post['dname']) && $post['dname'] != "") {
$id = $database->getVillageByName($post['dname']);
$id = $post['getwref'];
$coor = $database->getCoor($id);
}
if($database->getVillageState($id)) {
$timetaken = $generator->procDistanceTime($coor,$village->coor,$session->tribe,0);
$res = $resource[0]+$resource[1]+$resource[2]+$resource[3];