mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-09 21:01:00 +00:00
Distance calculation optimization and bug fixing
-Removed a lot of redundant code and put into a function +Fixed a bug that permitted to found a new village in already founded village +Fixed a bug that permitted to found in an oasis +Fixed a bug that permitted to hack the time you need to found a new village +Fixed a bug that permitted to found a new village to an inexistent one
This commit is contained in:
@@ -78,14 +78,14 @@ if(isset($_POST['ft'])=='check' && (($_POST['send3'] > 1 && $_POST['send3'] <= 3
|
||||
$getvilowner = $database->getVillageField($getwref, "owner");
|
||||
$getvilcoor['y'] = $_POST['y'];
|
||||
$getvilcoor['x'] = $_POST['x'];
|
||||
$time = $generator->procDistanceTime($getvilcoor,$village->coor,$session->tribe,0);
|
||||
$time = $generator->procDistanceTime($getvilcoor, $village->coor, $session->tribe, 0);
|
||||
}
|
||||
else if(!empty($_POST['dname'])){
|
||||
$getwref = $database->getVillageByName($_POST['dname']);
|
||||
$getvilcoor = $database->getCoor($getwref);
|
||||
$getvilname = $database->getVillageField($getwref, "name");
|
||||
$getvilowner = $database->getVillageField($getwref, "owner");
|
||||
$time = $generator->procDistanceTime($getvilcoor,$village->coor,$session->tribe,0);
|
||||
$time = $generator->procDistanceTime($getvilcoor, $village->coor, $session->tribe, 0);
|
||||
}
|
||||
?>
|
||||
<td><a href="karte.php?d=<?php echo $getwref; ?>&c=<?php echo $generator->getMapCheck($getwref); ?>"><?php echo $getvilname; ?>(<?php echo $getvilcoor['x']; ?>|<?php echo $getvilcoor['y']; ?>)<span class="clear"></span></a></td>
|
||||
|
||||
Reference in New Issue
Block a user