From 5f4afedbd66e2156c6c17847b6e3094a7d74d0ba Mon Sep 17 00:00:00 2001 From: akshay9 Date: Sat, 20 Oct 2012 12:17:19 +0530 Subject: [PATCH 1/4] Latest update --- Admin/Templates/update_latest.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Admin/Templates/update_latest.tpl b/Admin/Templates/update_latest.tpl index e20fbc52..2658f203 100644 --- a/Admin/Templates/update_latest.tpl +++ b/Admin/Templates/update_latest.tpl @@ -1,3 +1,3 @@ \ No newline at end of file From fa4eeed2edc9780f7f83c937ad62c4ea2d32ebc8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Oct 2012 21:55:16 +0200 Subject: [PATCH 2/4] update --- Templates/Plus/10.tpl | 2 +- Templates/Plus/11.tpl | 2 +- Templates/Plus/12.tpl | 2 +- Templates/Plus/9.tpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Templates/Plus/10.tpl b/Templates/Plus/10.tpl index 78a0d84c..44ff814e 100644 --- a/Templates/Plus/10.tpl +++ b/Templates/Plus/10.tpl @@ -21,7 +21,7 @@ if (mysql_num_rows($MyGold)) { if (mysql_num_rows($MyGold)) { -if($golds['b2'] == 0) { +if($golds['b2'] < time()) { mysql_query("UPDATE ".TB_PREFIX."users set b2 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); } else { mysql_query("UPDATE ".TB_PREFIX."users set b2 = '".($golds['b2']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); diff --git a/Templates/Plus/11.tpl b/Templates/Plus/11.tpl index b511bb83..3914f63a 100644 --- a/Templates/Plus/11.tpl +++ b/Templates/Plus/11.tpl @@ -21,7 +21,7 @@ if (mysql_num_rows($MyGold)) { if (mysql_num_rows($MyGold)) { -if($golds['b3'] == 0) { +if($golds['b3'] < time()) { mysql_query("UPDATE ".TB_PREFIX."users set b3 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); } else { mysql_query("UPDATE ".TB_PREFIX."users set b3 = '".($golds['b3']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); diff --git a/Templates/Plus/12.tpl b/Templates/Plus/12.tpl index 106f2fca..3142525d 100644 --- a/Templates/Plus/12.tpl +++ b/Templates/Plus/12.tpl @@ -21,7 +21,7 @@ if (mysql_num_rows($MyGold)) { if (mysql_num_rows($MyGold)) { -if($golds['b4'] == 0) { +if($golds['b4'] < time()) { mysql_query("UPDATE ".TB_PREFIX."users set b4 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); } else { mysql_query("UPDATE ".TB_PREFIX."users set b4 = '".($golds['b4']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); diff --git a/Templates/Plus/9.tpl b/Templates/Plus/9.tpl index 2420d93a..cffba573 100644 --- a/Templates/Plus/9.tpl +++ b/Templates/Plus/9.tpl @@ -21,7 +21,7 @@ if (mysql_num_rows($MyGold)) { if (mysql_num_rows($MyGold)) { -if($golds['b1'] == 0) { +if($golds['b1'] < time()) { mysql_query("UPDATE ".TB_PREFIX."users set b1 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); } else { mysql_query("UPDATE ".TB_PREFIX."users set b1 = '".($golds['b1']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysql_error()); From acebd003fb1af759821e8a40b6b6f8c1c9c74682 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Oct 2012 22:53:56 +0200 Subject: [PATCH 3/4] update --- install/data/sql.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/install/data/sql.sql b/install/data/sql.sql index 6fffd9af..e4c0bba2 100644 --- a/install/data/sql.sql +++ b/install/data/sql.sql @@ -811,6 +811,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%hero` ( `defencebonus` tinyint(3) unsigned NOT NULL, `regeneration` tinyint(3) unsigned NOT NULL, `autoregen` int(2) NOT NULL, + `lastupdate` int(11) unsigned NOT NULL, `trainingtime` int(11) unsigned NOT NULL, `inrevive` tinyint(1) unsigned NOT NULL, `intraining` tinyint(1) unsigned NOT NULL, From d2c6606eae7681dd0ae52080fe37facca3c7434d Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Oct 2012 22:59:49 +0200 Subject: [PATCH 4/4] update --- GameEngine/Automation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index d9ec2f09..4cbe2062 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -3848,11 +3848,11 @@ $crannyimg = "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'].""); - mysql_query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100' WHERE `uid` = '".$hdata['uid']."'"); + mysql_query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100', `lastupdate` = ".$hdata['trainingtime']." WHERE `uid` = '".$hdata['uid']."'"); } if($villunits['hero'] == 0 && $hdata['trainingtime'] < time() && $hdata['intraining'] == 1){ mysql_query("UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".$hdata['wref'].""); - mysql_query("UPDATE ".TB_PREFIX."hero SET `intraining` = '0' WHERE `uid` = '".$hdata['uid']."'"); + mysql_query("UPDATE ".TB_PREFIX."hero SET `intraining` = '0', `lastupdate` = ".$hdata['trainingtime']." WHERE `uid` = '".$hdata['uid']."'"); } } }