mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-03 08:57:17 +00:00
Reports refactor Part 2
+Heroes are now divided by tribes in battle reports +Added to every report the support to read heroes from the battle report data Automation.php: +Added the hero data, to every battle reports +Fixed a bug that didn't count own dead defensive troops for general attacks, top 10 attackers, attackers and hero xp +Fixed a bug that didn't permit to add the rat enforcement to the village, from quest number 8 Battle.php: +Fixed a bug with catapults/rams that permitted to destroy level 1 buildings with only one catapults (even against 1000000 defensive troops) +Added a new function, for more readability +General minor improovementes and bug fixing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
//reinforcement is underattack
|
||||
$dataarray = explode(",",$message->readingNotice['data']);
|
||||
$colspan = (isset($dataarray[24]) && $dataarray[24] > 0) ? 10 : 11;
|
||||
$colspan = (isset($dataarray[24]) && $dataarray[24] > 0) ? 11 : 10;
|
||||
if ($database->getUserField($dataarray[0], 'username', 0) != "[?]") {
|
||||
$user_url = "<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0], 'id', 0)."\">".$database->getUserField($dataarray[0], 'username', 0)."</a>";
|
||||
}
|
||||
@@ -46,23 +46,23 @@ for($i = $start; $i <= ($start + 9); $i++) {
|
||||
if(isset($dataarray[24]) && $dataarray[24] > 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
|
||||
echo "</tr><tr><th>Troops</th>";
|
||||
for($i = 4; $i <= 13; $i++) {
|
||||
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
|
||||
else echo "<td>".$dataarray[$i]."</td>";
|
||||
}
|
||||
|
||||
if(isset($dataarray[24]) && $dataarray[24] > 0){
|
||||
echo "<td>$dataarray[24]</td>";
|
||||
}
|
||||
|
||||
echo "<tr><th>Casualties</th>";
|
||||
for($i = 14; $i <= 23; $i++) {
|
||||
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
|
||||
else echo "<td>".$dataarray[$i]."</td>";
|
||||
}
|
||||
if(isset($dataarray[24]) && $dataarray[24] > 0){
|
||||
if ($dataarray[25] == 0){$tdclass = 'class="none"';}
|
||||
if ($dataarray[25] == 0) $tdclass = 'class="none"';
|
||||
echo "<td $tdclass>$dataarray[25]</td>";
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user