General fixes

+Fixed a bug that showed "The village has been destroyed" two times, if
an artifact was conquered from Natars (or from a 0 popped village) and
there were catapults in the attack
This commit is contained in:
iopietro
2018-07-25 02:43:29 +02:00
parent ee0b4984c2
commit 84b00790a6
+1 -1
View File
@@ -2184,7 +2184,7 @@ class Automation {
// if the defender pop is 0 with no artefact, then destroy the village // if the defender pop is 0 with no artefact, then destroy the village
if($database->getVillageField($data['to'], "pop") == 0 || $targettribe == 5){ if($database->getVillageField($data['to'], "pop") == 0 || $targettribe == 5){
$can_destroy = $village_destroyed = 1; $can_destroy = $village_destroyed = 1;
$info_hero .= " The village has been destroyed."; if(strpos($info_cat, "The village has") === false) $info_hero .= " The village has been destroyed.";
} }
} }
else $info_hero = $hero_pic.",".$artifactError.$xp; else $info_hero = $hero_pic.",".$artifactError.$xp;