diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php
index 5184314b..2ae5f073 100644
--- a/GameEngine/Automation.php
+++ b/GameEngine/Automation.php
@@ -3849,10 +3849,15 @@ $crannyimg = "
modifyHero("lastupdate",time(),$hdata['heroid']);
}
}
- while($hdata['experience'] > $hero_levels[$hdata['level']+1] && $hdata['level'] < 100){
- mysql_query("UPDATE " . TB_PREFIX ."hero SET level = level + 1 WHERE heroid = '".$hdata['heroid']."'");
+ $herolevel = $hdata['level'];
+ for($i = $herolevel+1; $i < 100; $i++){
+ if($hdata['experience'] > $hero_levels[$i]){
+ mysql_query("UPDATE " . TB_PREFIX ."hero SET level = $i WHERE heroid = '".$hdata['heroid']."'");
+ if($i < 99){
mysql_query("UPDATE " . TB_PREFIX ."hero SET points = points + 5 WHERE heroid = '".$hdata['heroid']."'");
}
+ }
+ }
$villunits = $database->getUnit($hdata['wref']);
if($villunits['hero'] == 0 && $hdata['trainingtime'] < time() && $hdata['inrevive'] == 1){
mysql_query("UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".$hdata['wref']."");
diff --git a/GameEngine/Building.php b/GameEngine/Building.php
index 28b06904..19596f57 100644
--- a/GameEngine/Building.php
+++ b/GameEngine/Building.php
@@ -677,7 +677,6 @@ class Building {
if($jobs['wid']==$village->wid){
$wwvillage = $database->getResourceLevel($jobs['wid']);
if($wwvillage['f99t']!=40){
- $ww = 0;
$level = $jobs['level'];
if($jobs['type'] != 25 AND $jobs['type'] != 26 AND $jobs['type'] != 40) {
$finish = 1;
@@ -717,6 +716,10 @@ class Building {
}
}
}
+ $wwvillage1 = $database->getResourceLevel($village->wid);
+ if($wwvillage1['f99t']!=40){
+ $ww = 0;
+ }
if($ww == 0){
$database->finishDemolition($village->wid);
$technology->finishTech();
diff --git a/Templates/Build/15_1.tpl b/Templates/Build/15_1.tpl
index 0ff19492..03d8edb0 100644
--- a/Templates/Build/15_1.tpl
+++ b/Templates/Build/15_1.tpl
@@ -31,9 +31,15 @@ if($village->resarray['f'.$id] >= DEMOLISH_LEVEL_REQ) {
echo "";
echo "
";
echo "Demolition of ".$building->procResType($VillageResourceLevels['f'.$Demolition['buildnumber'].'t']).": ".$generator->getTimeFormat($Demolition['timetofinish']-time())."";
- ?>
-
+ if($session->gold >= 2) {
+ if($session->access!=BANNED){
+ ?>
+ ";
} else {
echo "
diff --git a/Templates/Plus/5.tpl b/Templates/Plus/5.tpl
index 38f13d7e..fa8e59cd 100644
--- a/Templates/Plus/5.tpl
+++ b/Templates/Plus/5.tpl
@@ -20,7 +20,7 @@ include("Templates/Plus/pmenu.tpl");
2) Copy your personal REF-Link and share it!
Your personal REF Link:
- anmelden?id=ref_uid; ?>
+ anmelden.php?id=ref_uid; ?>
Progress of your invited friends
diff --git a/Templates/Plus/invite.tpl b/Templates/Plus/invite.tpl
index e353dd78..dd48269a 100644
--- a/Templates/Plus/invite.tpl
+++ b/Templates/Plus/invite.tpl
@@ -23,7 +23,7 @@ include("Templates/Plus/pmenu.tpl");
2) Copy your personal REF-Link and share it!
Your personal REF Link:
- anmelden?id=ref_uid; ?>
+ anmelden.php?id=ref_uid; ?>
Progress of your invited friends
diff --git a/Templates/Profile/profile.tpl b/Templates/Profile/profile.tpl
index 3b100591..783d2793 100644
--- a/Templates/Profile/profile.tpl
+++ b/Templates/Profile/profile.tpl
@@ -53,7 +53,7 @@ include("menu.tpl"); ?>