fix: embassy destruction status text on an incorrect line in a report

#393
This commit is contained in:
Martin Ambrus
2017-12-02 10:55:24 +01:00
parent a948537056
commit 9474a60313
+26 -12
View File
@@ -1084,11 +1084,6 @@ class Automation {
$database->setMaxCropForVillage($data['to'], $buildarray[$tblevel]['attri']);
}
// embassy level was changed
if ($tbgid==18){
$info_cat .= $database->checkEmbassiesAfterBattle($data['to'], false);
}
// oasis cannot be destroyed
$pop=$this->recountPop($data['to'], false);
if ($isoasis == 0) {
@@ -1101,9 +1096,21 @@ class Automation {
if ($isSecondRow) {
$info_cat .= "<br><tbody class=\"goods\"><tr><th>Information</th><td colspan=\"11\">
<img class=\"unit u".$catp_pic."\" src=\"img/x.gif\" alt=\"Catapult\" title=\"Catapult\" /> ".$this->procResType($tbgid,$can_destroy,$isoasis)." destroyed.</td></tr></tbody>";
<img class=\"unit u".$catp_pic."\" src=\"img/x.gif\" alt=\"Catapult\" title=\"Catapult\" /> ".$this->procResType($tbgid,$can_destroy,$isoasis)." destroyed.";
// embassy level was changed
if ($tbgid==18){
$info_cat .= $database->checkEmbassiesAfterBattle($data['to'], false);
}
$info_cat .= "</td></tr></tbody>";
} else {
$info_cat = "" . $catp_pic . ", " . $this->procResType( $tbgid, $can_destroy, $isoasis ) . " destroyed.";
// embassy level was changed
if ($tbgid==18){
$info_cat .= $database->checkEmbassiesAfterBattle($data['to'], false);
}
}
}
// building/field not damaged
@@ -1161,11 +1168,6 @@ class Automation {
if ( $tbgid == 11 || $tbgid == 39 ) {
$database->setMaxCropForVillage( $data['to'], $buildarray[ $tblevel ]['attri'] );
}
// embassy level was changed
if ( $tbgid == 18 ) {
$info_cat .= $database->checkEmbassiesAfterBattle( $data['to'], false );
}
}
$fieldsToSet = ["f" . $tbid];
@@ -1191,9 +1193,21 @@ class Automation {
if ($isSecondRow) {
$info_cat .= "<br><tbody class=\"goods\"><tr><th>Information</th><td colspan=\"11\">
<img class=\"unit u".$catp_pic."\" src=\"img/x.gif\" alt=\"Catapult\" title=\"Catapult\" /> ".$this->procResType($tbgid,$can_destroy,$isoasis).$info_cata."</td></tr></tbody>";
<img class=\"unit u".$catp_pic."\" src=\"img/x.gif\" alt=\"Catapult\" title=\"Catapult\" /> ".$this->procResType($tbgid,$can_destroy,$isoasis).$info_cata;
// embassy level was changed
if ( $tbgid == 18 ) {
$info_cat .= $database->checkEmbassiesAfterBattle( $data['to'], false );
}
$info_cat .= "</td></tr></tbody>";
} else {
$info_cat = "" . $catp_pic . "," . $this->procResType( $tbgid, $can_destroy, $isoasis ) . $info_cata;
// embassy level was changed
if ( $tbgid == 18 ) {
$info_cat .= $database->checkEmbassiesAfterBattle( $data['to'], false );
}
}
}
}