mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-24 03:57:15 +00:00
Merge pull request #51 from Fannybaws/ArtefactCaptureCapital
Artefact capture from capital
This commit is contained in:
@@ -2483,7 +2483,7 @@ class Automation {
|
|||||||
if ($type=='3') {
|
if ($type=='3') {
|
||||||
if ($database->canClaimArtifact($data['from'],$artifact['vref'],$artifact['size'],$artifact['type'])) {
|
if ($database->canClaimArtifact($data['from'],$artifact['vref'],$artifact['size'],$artifact['type'])) {
|
||||||
$database->claimArtefact($data['from'],$data['to'],$database->getVillageField($data['from'],"owner"));
|
$database->claimArtefact($data['from'],$data['to'],$database->getVillageField($data['from'],"owner"));
|
||||||
$info_hero = $hero_pic.",Your hero is carrying home a artefact".$xp;
|
$info_hero = $hero_pic.",Your hero is carrying home an artefact".$xp;
|
||||||
} else {
|
} else {
|
||||||
$info_hero = $hero_pic.",".$form->getError("error").$xp;
|
$info_hero = $hero_pic.",".$form->getError("error").$xp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3303,13 +3303,14 @@ class MYSQL_DB {
|
|||||||
$form->addError("error","Max num. of great/unique artefacts. Your hero could not claim the artefact and");
|
$form->addError("error","Max num. of great/unique artefacts. Your hero could not claim the artefact and");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (($type == 1 && ($villageartifact || $accountartifact)) || (($type == 2 || $type == 3)&& $accountartifact)) {
|
if (($type == 1 && ($villageartifact || $accountartifact)) || (($type == 2 || $type == 3)&& $accountartifact)){
|
||||||
if($this->getVillageField($from,"capital")==1) {
|
return TRUE;
|
||||||
$form->addError("error","Ancient Construction Plan cannot kept in capital village");
|
// if($this->getVillageField($from,"capital")==1) {
|
||||||
return FALSE;
|
// $form->addError("error","Ancient Construction Plan cannot kept in capital village");
|
||||||
}else{
|
// return FALSE;
|
||||||
return TRUE;
|
// }else{
|
||||||
}
|
// return TRUE;
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
$form->addError("error","Your level treasury is low. Your hero could not claim the artefact");
|
$form->addError("error","Your level treasury is low. Your hero could not claim the artefact");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user