mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-13 16:16:07 +00:00
fix some hero problems
This commit is contained in:
@@ -978,8 +978,12 @@ class Automation {
|
||||
$notlife1 = $dead[$start]+$dead[$start+1]+$dead[$start+2]+$dead[$start+3]+$dead[$start+4]+$dead[$start+5]+$dead[$start+6]+$dead[$start+7]+$dead[$start+8]+$dead[$start+9];
|
||||
$life= ''.$enforce['u'.$start.''].','.$enforce['u'.($start+1).''].','.$enforce['u'.($start+2).''].','.$enforce['u'.($start+3).''].','.$enforce['u'.($start+4).''].','.$enforce['u'.($start+5).''].','.$enforce['u'.($start+6).''].','.$enforce['u'.($start+7).''].','.$enforce['u'.($start+8).''].','.$enforce['u'.($start+9).''].'';
|
||||
$life1 = $enforce['u'.$start.'']+$enforce['u'.($start+1).'']+$enforce['u'.($start+2).'']+$enforce['u'.($start+3).'']+$enforce['u'.($start+4).'']+$enforce['u'.($start+5).'']+$enforce['u'.($start+6).'']+$enforce['u'.($start+7).'']+$enforce['u'.($start+8).'']+$enforce['u'.($start+9).''];
|
||||
$lifehero = $enforce['hero'];
|
||||
$notlifehero = $dead['hero'];
|
||||
$totallife = $enforce['hero']+$life1;
|
||||
$totalnotlife = $dead['hero']+$notlife1;
|
||||
//NEED TO SEND A RAPPORTAGE!!!
|
||||
$data2 = ''.$database->getVillageField($enforce['from'],"owner").','.$to['wref'].','.addslashes($to['name']).','.$tribe.','.$life.','.$notlife.'';
|
||||
$data2 = ''.$database->getVillageField($enforce['from'],"owner").','.$to['wref'].','.addslashes($to['name']).','.$tribe.','.$life.','.$notlife.','.$lifehero.','.$notlifehero.'';
|
||||
if($scout){
|
||||
for($i=1;$i<=10;$i++)
|
||||
{
|
||||
@@ -992,9 +996,9 @@ class Automation {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if($notlife == 0){
|
||||
if($totalnotlife == 0){
|
||||
$database->addNotice($database->getVillageField($enforce['from'],"owner"),$from['wref'],$ownally,15,'Reinforcement in '.addslashes($to['name']).' was attacked',$data2,$AttackArrivalTime);
|
||||
}else if($life1 > $notlife1){
|
||||
}else if($totallife > $totalnotlife){
|
||||
$database->addNotice($database->getVillageField($enforce['from'],"owner"),$from['wref'],$ownally,16,'Reinforcement in '.addslashes($to['name']).' was attacked',$data2,$AttackArrivalTime);
|
||||
}else{
|
||||
$database->addNotice($database->getVillageField($enforce['from'],"owner"),$from['wref'],$ownally,17,'Reinforcement in '.addslashes($to['name']).' was attacked',$data2,$AttackArrivalTime);
|
||||
|
||||
Reference in New Issue
Block a user