mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-04 03:44:23 +00:00
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
$latest="8";
|
||||
$latest="12";
|
||||
?>
|
||||
@@ -3848,11 +3848,11 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
$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']."");
|
||||
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']."'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user