diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 41037a65..f70bcb45 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -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); diff --git a/Templates/Notice/15.tpl b/Templates/Notice/15.tpl index c294673f..09ffb8f6 100644 --- a/Templates/Notice/15.tpl +++ b/Templates/Notice/15.tpl @@ -1,6 +1,7 @@ readingNotice['data']); +if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";} ?> @@ -22,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
- + @@ -34,6 +35,9 @@ $start = ($tribe-1)*10+1; for($i=$start;$i<=($start+9);$i++) { echo ""; } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + echo ""; +} echo ""; for($i=4;$i<=13;$i++) { if($dataarray[$i] == 0) { @@ -43,6 +47,9 @@ for($i=4;$i<=13;$i++) { echo ""; } } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + echo ""; +} echo ""; for($i=14;$i<=23;$i++) { if($dataarray[$i] == 0) { @@ -52,6 +59,10 @@ for($i=14;$i<=23;$i++) { echo ""; } } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + if ($dataarray[25]==0){$tdclass='class="none"';} + echo ""; +} ?>
Defender">getUserField($dataarray[0],"username",0); ?> in the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> in the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[24]
Casualties".$dataarray[$i]."$dataarray[25]
diff --git a/Templates/Notice/16.tpl b/Templates/Notice/16.tpl index c294673f..09ffb8f6 100644 --- a/Templates/Notice/16.tpl +++ b/Templates/Notice/16.tpl @@ -1,6 +1,7 @@ readingNotice['data']); +if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";} ?> @@ -22,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
- + @@ -34,6 +35,9 @@ $start = ($tribe-1)*10+1; for($i=$start;$i<=($start+9);$i++) { echo ""; } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + echo ""; +} echo ""; for($i=4;$i<=13;$i++) { if($dataarray[$i] == 0) { @@ -43,6 +47,9 @@ for($i=4;$i<=13;$i++) { echo ""; } } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + echo ""; +} echo ""; for($i=14;$i<=23;$i++) { if($dataarray[$i] == 0) { @@ -52,6 +59,10 @@ for($i=14;$i<=23;$i++) { echo ""; } } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + if ($dataarray[25]==0){$tdclass='class="none"';} + echo ""; +} ?>
Defender">getUserField($dataarray[0],"username",0); ?> in the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> in the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[24]
Casualties".$dataarray[$i]."$dataarray[25]
diff --git a/Templates/Notice/17.tpl b/Templates/Notice/17.tpl index c294673f..09ffb8f6 100644 --- a/Templates/Notice/17.tpl +++ b/Templates/Notice/17.tpl @@ -1,6 +1,7 @@ readingNotice['data']); +if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";} ?> @@ -22,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
- + @@ -34,6 +35,9 @@ $start = ($tribe-1)*10+1; for($i=$start;$i<=($start+9);$i++) { echo ""; } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + echo ""; +} echo ""; for($i=4;$i<=13;$i++) { if($dataarray[$i] == 0) { @@ -43,6 +47,9 @@ for($i=4;$i<=13;$i++) { echo ""; } } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + echo ""; +} echo ""; for($i=14;$i<=23;$i++) { if($dataarray[$i] == 0) { @@ -52,6 +59,10 @@ for($i=14;$i<=23;$i++) { echo ""; } } +if(isset($dataarray[24]) and $dataarray[24]!=0){ + if ($dataarray[25]==0){$tdclass='class="none"';} + echo ""; +} ?>
Defender">getUserField($dataarray[0],"username",0); ?> in the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> in the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[24]
Casualties".$dataarray[$i]."$dataarray[25]
diff --git a/Templates/a2b/sendback_1.tpl b/Templates/a2b/sendback_1.tpl index 0886908c..c94d83b8 100644 --- a/Templates/a2b/sendback_1.tpl +++ b/Templates/a2b/sendback_1.tpl @@ -106,7 +106,7 @@ $tocoor = $database->getCoor($enforce['vref']); echo"(".$enforce['u6'].")"; if($enforce['hero']>0){ ?> - Hero + Hero (".$enforce['hero'].")"; } diff --git a/Templates/a2b/sendback_3.tpl b/Templates/a2b/sendback_3.tpl index 00cfdc62..308d5860 100644 --- a/Templates/a2b/sendback_3.tpl +++ b/Templates/a2b/sendback_3.tpl @@ -106,7 +106,7 @@ $tocoor = $database->getCoor($enforce['vref']); echo"(".$enforce['u26'].")"; if($enforce['hero']>0){ ?> - Hero + Hero (".$enforce['hero'].")"; } diff --git a/Templates/a2b/sendback_4.tpl b/Templates/a2b/sendback_4.tpl index be2c09e8..e8a8a1ad 100644 --- a/Templates/a2b/sendback_4.tpl +++ b/Templates/a2b/sendback_4.tpl @@ -107,7 +107,7 @@ $tocoor = $database->getCoor($enforce['vref']); echo"(".$enforce['u36'].")"; if($enforce['hero']>0){ ?> - Hero + Hero (".$enforce['hero'].")"; } diff --git a/Templates/a2b/sendback_5.tpl b/Templates/a2b/sendback_5.tpl index 64e4895a..edc96727 100644 --- a/Templates/a2b/sendback_5.tpl +++ b/Templates/a2b/sendback_5.tpl @@ -105,7 +105,7 @@ $tocoor = $database->getCoor($enforce['vref']); echo"(".$enforce['u6'].")"; if($enforce['hero']>0){ ?> - Hero + Hero (".$enforce['hero'].")"; }