mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-10 14:46:09 +00:00
fix: village destroyed text displayed twice for 2-row catapults attack
#393
This commit is contained in:
@@ -1095,8 +1095,10 @@ 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.";
|
||||
if ($tbid > 0 || ($tbid == 0 && strpos($info_cat, 'The village has') === false)) {
|
||||
$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.";
|
||||
}
|
||||
|
||||
// embassy level was changed
|
||||
if ($tbgid==18){
|
||||
@@ -1117,8 +1119,10 @@ class Automation {
|
||||
elseif ($battlepart[4]==0)
|
||||
{
|
||||
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)." was not damaged.</td></tr></tbody>";
|
||||
if ($tbid > 0 || ($tbid == 0 && strpos($info_cat, 'The village has') === false)) {
|
||||
$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 ) . " was not damaged.</td></tr></tbody>";
|
||||
}
|
||||
} else {
|
||||
$info_cat = "" . $catp_pic . "," . $this->procResType( $tbgid, $can_destroy, $isoasis ) . " was not damaged.";
|
||||
}
|
||||
@@ -2744,7 +2748,7 @@ class Automation {
|
||||
else{
|
||||
if(isset($village_destroyed) && $village_destroyed == 1 && $can_destroy==1){
|
||||
//check if village pop=0 and no info destroy
|
||||
if (strpos($info_cat,"The village has")==0) {
|
||||
if (strpos($info_cat,"The village has") === false) {
|
||||
$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\" /> The village has been destroyed.</td></tr></tbody>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user