mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Fixed deleting trade routes after village is conquered
This commit is contained in:
@@ -2654,7 +2654,10 @@ class Automation {
|
||||
//remove oasis related to village
|
||||
$units->returnTroops($data['to'],1);
|
||||
$chiefing_village = 1;
|
||||
|
||||
|
||||
//Remove trade routes related to village
|
||||
$database->deleteTradeRoutesByVillage($data['to']);
|
||||
|
||||
// update data in the database
|
||||
$database->clearExpansionSlot($data['to']);
|
||||
$database->setVillageLevel($data['to'], $newLevels_fieldNames, $newLevels_fieldValues);
|
||||
|
||||
@@ -4367,7 +4367,14 @@ References: User ID/Message ID, Mode
|
||||
$q = "DELETE FROM " . TB_PREFIX . "route where id = $id";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
function deleteTradeRoutesByVillage($id) {
|
||||
list($id) = $this->escape_input((int) $id);
|
||||
|
||||
$q = "DELETE FROM " . TB_PREFIX . "route where `from` = $id";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
function addBuilding($wid, $field, $type, $loop, $time, $master, $level) {
|
||||
list($wid, $field, $type, $loop, $time, $master, $level) = $this->escape_input((int) $wid, $field, (int) $type, (int) $loop, (int) $time, (int) $master, (int) $level);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user