mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-08 13:46:09 +00:00
Artifacts fixes part 4
Completely fixed the artifact of the fool and fixed all kind of artifact: +Deleted some useless .tpl files and merged into one (Stable) +The artifact of the fool effect won't be displayed if not active +Fixed a bug that permitted to have a great and a unique artefacts active at the same moment +Big reductions of code in a lot of files +Created some new methods to support artifacts +Fixed a bug that prevented the effect of the "Rivals confusion" to work correctly +Fixed a bug that prevented "The eagles eyes" artifact to work correctly for the attacker +Fixed the artifact of the fool of every kind, now it's calculated with a new method +Fixed the cranny capacity when a "Rivals confusion" artifact is active +Some minor bug fixing , improovements and optimization
This commit is contained in:
+16
-17
@@ -676,30 +676,29 @@ class Building {
|
||||
case 40:
|
||||
$wwlevel = $village->resarray['f99'];
|
||||
|
||||
if ( $wwlevel > 50 ) {
|
||||
$needed_plan = 1;
|
||||
} else {
|
||||
$needed_plan = 0;
|
||||
}
|
||||
if($wwlevel > 50) $needed_plan = 1;
|
||||
else $needed_plan = 0;
|
||||
|
||||
$wwbuildingplan = 0;
|
||||
$villages = $database->getVillagesID( $session->uid );
|
||||
foreach ( $villages as $village1 ) {
|
||||
$plan = count( $database->getOwnArtefactInfoByType2( $village1, 11 ) );
|
||||
if ( $plan > 0 ) {
|
||||
$villages = $database->getVillagesID( $session->uid );
|
||||
foreach($villages as $village1) {
|
||||
$plan = count($database->getOwnArtefactInfoByType2($village1, 11));
|
||||
if($plan > 0){
|
||||
$wwbuildingplan = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $session->alliance != 0 ) {
|
||||
$alli_users = $database->getUserByAlliance( $session->alliance );
|
||||
foreach ( $alli_users as $users ) {
|
||||
$villages = $database->getVillagesID( $users['id'] );
|
||||
if ( $users['id'] != $session->uid ) {
|
||||
foreach ( $villages as $village1 ) {
|
||||
$plan = count( $database->getOwnArtefactInfoByType2( $village1, 11 ) );
|
||||
if ( $plan > 0 ) {
|
||||
if($session->alliance != 0) {
|
||||
$alli_users = $database->getUserByAlliance($session->alliance);
|
||||
foreach($alli_users as $users) {
|
||||
$villages = $database->getVillagesID($users['id']);
|
||||
if($users['id'] != $session->uid) {
|
||||
foreach($villages as $village1) {
|
||||
$plan = count($database->getOwnArtefactInfoByType2($village1, 11 ));
|
||||
if($plan > 0) {
|
||||
$wwbuildingplan += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user