mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
General fixes
+Fixed a bug that didn't permit to create users' villages in small maps, from the admin panel
This commit is contained in:
@@ -135,7 +135,7 @@ WHERE id = ".(int) $uid) or die(mysqli_error($database->dblink));
|
||||
}
|
||||
|
||||
$database->updateUserField($uid,"act","",1);
|
||||
$wid = $database->generateBase($kid,0,false);
|
||||
$wid = $database->generateBase($kid);
|
||||
$database->setFieldTaken($wid);
|
||||
|
||||
//calculate random generate value and level building
|
||||
|
||||
+11
-11
@@ -1288,17 +1288,17 @@ class MYSQLi_DB implements IDbConnection {
|
||||
}
|
||||
|
||||
switch($sector){
|
||||
case 1:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x < -$wide1 and x > -$wide2) and (y > $wide1 and y < $wide2) and occupied = 0"; //x- y+
|
||||
break;
|
||||
case 2:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x > $wide1 and x < $wide2) and (y > $wide1 and y < $wide2) and occupied = 0"; //x+ y+
|
||||
break;
|
||||
case 3:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x < -$wide1 and x > -$wide2) and (y < -$wide1 and y > -$wide2) and occupied = 0"; //x- y-
|
||||
break;
|
||||
default:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x > $wide1 and x < $wide2) and (y < -$wide1 and y > -$wide2) and occupied = 0"; //x+ y-
|
||||
case 1:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x < -$wide1 and x > -$wide2) and (y > $wide1 and y < $wide2) and occupied = 0"; //x- y+
|
||||
break;
|
||||
case 2:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x > $wide1 and x < $wide2) and (y > $wide1 and y < $wide2) and occupied = 0"; //x+ y+
|
||||
break;
|
||||
case 3:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x < -$wide1 and x > -$wide2) and (y < -$wide1 and y > -$wide2) and occupied = 0"; //x- y-
|
||||
break;
|
||||
default:
|
||||
$q = "Select * from ".TB_PREFIX."wdata where fieldtype = 3 and (x > $wide1 and x < $wide2) and (y < -$wide1 and y > -$wide2) and occupied = 0"; //x+ y-
|
||||
}
|
||||
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
|
||||
Reference in New Issue
Block a user