mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-30 15:17:13 +00:00
fixed bug "No troops has been selected"
This commit is contained in:
@@ -11,14 +11,14 @@ $WrefCoor = $database->getCoor($Wref);
|
|||||||
$WrefX = $WrefCoor['x'];
|
$WrefX = $WrefCoor['x'];
|
||||||
$WrefY = $WrefCoor['y'];
|
$WrefY = $WrefCoor['y'];
|
||||||
$type = $database->getVillageType2($Wref);
|
$type = $database->getVillageType2($Wref);
|
||||||
$oasistype = $type['oasistype'];
|
$oasistype = $to['oasistype'];
|
||||||
$vdata = $database->getVillage($Wref);
|
$vdata = $database->getVillage($Wref);
|
||||||
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
|
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
|
||||||
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
|
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
|
||||||
$WrefX = $_POST['x'];
|
$WrefX = $_POST['x'];
|
||||||
$WrefY = $_POST['y'];
|
$WrefY = $_POST['y'];
|
||||||
$type = $database->getVillageType2($Wref);
|
$type = $database->getVillageType2($Wref);
|
||||||
$oasistype = $type['oasistype'];
|
$oasistype = $to['oasistype'];
|
||||||
$vdata = $database->getVillage($Wref);
|
$vdata = $database->getVillage($Wref);
|
||||||
}
|
}
|
||||||
if($_POST['x']=="" && $_POST['y']=="" && $_POST['target_id'] == ""){
|
if($_POST['x']=="" && $_POST['y']=="" && $_POST['target_id'] == ""){
|
||||||
@@ -27,7 +27,7 @@ $vdata = $database->getVillage($Wref);
|
|||||||
$errormsg .= "Enter the correct coordinates.";
|
$errormsg .= "Enter the correct coordinates.";
|
||||||
}elseif($oasistype == 0 && $vdata == 0){
|
}elseif($oasistype == 0 && $vdata == 0){
|
||||||
$errormsg .= "There is no village on those coordinates.";
|
$errormsg .= "There is no village on those coordinates.";
|
||||||
}elseif($troops == 0){
|
}elseif($troops == "0"){
|
||||||
$errormsg .= "No troops has been selected.";
|
$errormsg .= "No troops has been selected.";
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ foreach($arraywref as $row){
|
|||||||
$towref = $row["towref"];
|
$towref = $row["towref"];
|
||||||
$tocoor = $database->getCoor($towref);
|
$tocoor = $database->getCoor($towref);
|
||||||
$totype = $database->getVillageType2($towref);
|
$totype = $database->getVillageType2($towref);
|
||||||
$tooasistype = $totype['oasistype'];
|
$tooasistype = $to['oasistype'];
|
||||||
if($tooasistype == 0){
|
if($tooasistype == 0){
|
||||||
$tovname = $database->getVillageField($towref, 'name');
|
$tovname = $database->getVillageField($towref, 'name');
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user