fix ww upgrade and ranking + fix bug with complete build with gold

This commit is contained in:
unknown
2012-05-08 15:13:37 +03:00
parent 0095dbe0b3
commit c41e6c8c30
7 changed files with 132 additions and 14 deletions
+15
View File
@@ -31,6 +31,20 @@ class Automation {
}
}
private function getWWRankInfo() {
global $database;
for ($i = 1; $i <= 40; $i++) {
$q = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE f99t = '40' or f".$i."t = '40'");
$ww = mysql_fetch_array($q);
if($ww['f99'] > 0){
$i = 99;
}
if(mysql_num_rows($q) > 0){
$database->setVillageLevel($ww['vref'], "wwlevel", $ww['f'.$i]);
}
}
}
public function procResType($ref) {
global $session;
switch($ref) {
@@ -166,6 +180,7 @@ class Automation {
$this->demolitionComplete();
}
$this->updateStore();
$this->getWWRankInfo();
}
function activeCropDead(){