diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 5c1ca24e..2ded9d46 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -2478,22 +2478,19 @@ class Automation { } else { $xp=" gained ".$heroxp." XP from the battle"; } - if ($type=='3') { - $artifact = $database->getOwnArtefactInfo($data['to']); - if (!empty($artifact)) { + $artifact = $database->getOwnArtefactInfo($data['to']); + if (!empty($artifact)) { + if ($type=='3') { if ($database->canClaimArtifact($data['from'],$artifact['vref'],$artifact['size'],$artifact['type'])) { $database->claimArtefact($data['from'],$data['to'],$database->getVillageField($data['from'],"owner")); $info_hero = $hero_pic.",Your hero is carrying home a artefact".$xp; } else { $info_hero = $hero_pic.",".$form->getError("error").$xp; } - } - }else { - if (!empty($artifact)) { - $info_hero = $hero_pic.",Your hero could not claim the artefact during raid".$xp; + }else{ + $info_hero = $hero_pic.",Your hero could not claim the artefact during raid".$xp; } } - } }elseif($data['t11']>0) { if ($heroxp == 0) { $xp=" and no XP from the battle"; @@ -3257,6 +3254,15 @@ $wallimg = "query($q); + if(file_exists("GameEngine/Prevention/sendreinfunits.txt")) { unlink("GameEngine/Prevention/sendreinfunits.txt"); }