mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-22 18:06:37 +08:00
fix: village with palace becomes capital
This commit is contained in:
@@ -642,7 +642,7 @@ class Automation {
|
|||||||
if(file_exists("GameEngine/Prevention/build.txt")) {
|
if(file_exists("GameEngine/Prevention/build.txt")) {
|
||||||
unlink("GameEngine/Prevention/build.txt");
|
unlink("GameEngine/Prevention/build.txt");
|
||||||
}
|
}
|
||||||
global $database,$bid18,$bid10,$bid11,$bid38,$bid39;
|
global $database,$bid18,$bid10,$bid11,$bid38,$bid39,$session;
|
||||||
$time = time();
|
$time = time();
|
||||||
$array = array();
|
$array = array();
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."bdata where timestamp < $time and master = 0";
|
$q = "SELECT * FROM ".TB_PREFIX."bdata where timestamp < $time and master = 0";
|
||||||
@@ -686,6 +686,12 @@ class Automation {
|
|||||||
if($indi['type'] == 18){
|
if($indi['type'] == 18){
|
||||||
$this->updateMax($database->getVillageField($indi['wid'],"owner"));
|
$this->updateMax($database->getVillageField($indi['wid'],"owner"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($indi['type'] == 26 && $level=='1'){
|
||||||
|
// change capital to this city if we finished up building a palace
|
||||||
|
$database->query("UPDATE ".TB_PREFIX."vdata SET capital = 0 WHERE owner = ".(int) $session->uid);
|
||||||
|
$database->query("UPDATE ".TB_PREFIX."vdata SET capital = 1 WHERE owner = ".(int) $session->uid." AND wref = ".(int) $indi['wid']);
|
||||||
|
}
|
||||||
|
|
||||||
if($indi['type'] == 38) {
|
if($indi['type'] == 38) {
|
||||||
$max=$database->getVillageField($indi['wid'],"maxstore");
|
$max=$database->getVillageField($indi['wid'],"maxstore");
|
||||||
|
|||||||
Reference in New Issue
Block a user