mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-19 17:51:02 +00:00
more update for new ally owner when the previous one get delete from the game
This commit is contained in:
@@ -145,7 +145,7 @@ class Automation {
|
|||||||
|
|
||||||
public function Automation() {
|
public function Automation() {
|
||||||
|
|
||||||
|
$this->procClimbers();
|
||||||
$this->ClearUser();
|
$this->ClearUser();
|
||||||
$this->ClearInactive();
|
$this->ClearInactive();
|
||||||
$this->oasisResoucesProduce();
|
$this->oasisResoucesProduce();
|
||||||
@@ -410,7 +410,7 @@ class Automation {
|
|||||||
$newleader = $newowner['id'];
|
$newleader = $newowner['id'];
|
||||||
$q = "UPDATE " . TB_PREFIX . "alidata set leader = ".$newleader." where id = ".$alliance."";
|
$q = "UPDATE " . TB_PREFIX . "alidata set leader = ".$newleader." where id = ".$alliance."";
|
||||||
$database->query($q);
|
$database->query($q);
|
||||||
$database->updateAlliPermissions($newleader, 1, 1, 1, 1, 1, 1, 1, 1, 1);
|
$database->updateAlliPermissions($newleader, $alliance, "Leader", 1, 1, 1, 1, 1, 1, 1);
|
||||||
}
|
}
|
||||||
$database->deleteAlliance($alliance);
|
$database->deleteAlliance($alliance);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."hero where uid = ".$need['uid'];
|
$q = "DELETE FROM ".TB_PREFIX."hero where uid = ".$need['uid'];
|
||||||
@@ -3837,7 +3837,7 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
|||||||
foreach($harray as $hdata){
|
foreach($harray as $hdata){
|
||||||
if((time()-$hdata['lastupdate'])>=1){
|
if((time()-$hdata['lastupdate'])>=1){
|
||||||
if($hdata['health']<100 and $hdata['health']>0){
|
if($hdata['health']<100 and $hdata['health']>0){
|
||||||
$reg = $hdata['health']+$hdata['regeneration']*5*SPEED/86400*(time()-$hdata['lastupdate']);
|
$reg = $hdata['health']+$hdata['regeneration']*5*ceil(SPEED/10)/86400*(time()-$hdata['lastupdate']);
|
||||||
if($reg <= 100){
|
if($reg <= 100){
|
||||||
$database->modifyHero("health",$reg,$hdata['heroid']);
|
$database->modifyHero("health",$reg,$hdata['heroid']);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user