catching up (#4)

* fix: all languages added to installer

* fix: all languages added to installer and Admin

* fix: max crop/resources reset to level 1 value temporarily

This happened when level 1 granary / warehouse was built because of
a missing + sign in a formula.

#374

* chore: some more badges and thanks to JetBrains :)

* chore: one more badge :P

* chore: cleanup

* fix: Multihunter should have access to villages info

* fix: troops duplicate for certain tribes via raid lists

* fix: no need for WW Building Plan to start building a WW

#337

* fix: natar WW villages created without units

#392

* fix: sendunits.txt file could not be opened from Admin

* fix: WW villages created via Admin do not have any units

#392

* fix: WW building plans must be in player's village to start building WW

#337

* fix: hero training and revival misbehaving

* fix: spending hero points subtracts these from all player's heroes

#341

* fix: 2nd row of catapults firing when not allowed

#393

* fix: 2nd wave of catapults destroys targets and villages incorrectly

#393

* fix: adding new village via Admin generates incorrect fields

* chore: create default users with bcrypt enabled by default

* fix: in-game Support login fails

* fix: wrong password verify check allows for any login
This commit is contained in:
Martin Ambrus
2017-12-01 19:57:57 +01:00
committed by GitHub
parent 23c0f4f8f7
commit a321906d41
10 changed files with 166 additions and 126 deletions
+63 -41
View File
@@ -8,7 +8,8 @@
| Copyright: TravianX Project All rights reserved |
\*-------------------------------------------------------*/
$hero_info = $units->Hero($session->uid, 0, true);
$hero_info = $units->Hero($session->uid);
$heroes = $units->Hero($session->uid, 1);
$define['reset_level'] = 3; // Until which level you are able to reset your points
?>
@@ -22,47 +23,70 @@
<p class="build_desc"><?php echo HEROSMANSION_DESC; ?></p>
<?php
if($hero_info['unit'] == 1) {
$name = U1;
} else if($hero_info['unit'] == 2) {
$name = U2;
} else if($hero_info['unit'] == 3) {
$name = U3;
} else if($hero_info['unit'] == 5) {
$name = U5;
} else if($hero_info['unit'] == 6) {
$name = U6;
} else if($hero_info['unit'] == 11) {
$name = U11;
} else if($hero_info['unit'] == 12) {
$name = U12;
} else if($hero_info['unit'] == 13) {
$name = U13;
} else if($hero_info['unit'] == 15) {
$name = U15;
} else if($hero_info['unit'] == 16) {
$name = U16;
} else if($hero_info['unit'] == 21) {
$name = U21;
} else if($hero_info['unit'] == 22) {
$name = U22;
} else if($hero_info['unit'] == 24) {
$name = U24;
} else if($hero_info['unit'] == 25) {
$name = U25;
} else if($hero_info['unit'] == 26) {
$name = U26;
<?php
if ($hero_info) {
if ( $hero_info['unit'] == 1 ) {
$name = U1;
} else if ( $hero_info['unit'] == 2 ) {
$name = U2;
} else if ( $hero_info['unit'] == 3 ) {
$name = U3;
} else if ( $hero_info['unit'] == 5 ) {
$name = U5;
} else if ( $hero_info['unit'] == 6 ) {
$name = U6;
} else if ( $hero_info['unit'] == 11 ) {
$name = U11;
} else if ( $hero_info['unit'] == 12 ) {
$name = U12;
} else if ( $hero_info['unit'] == 13 ) {
$name = U13;
} else if ( $hero_info['unit'] == 15 ) {
$name = U15;
} else if ( $hero_info['unit'] == 16 ) {
$name = U16;
} else if ( $hero_info['unit'] == 21 ) {
$name = U21;
} else if ( $hero_info['unit'] == 22 ) {
$name = U22;
} else if ( $hero_info['unit'] == 24 ) {
$name = U24;
} else if ( $hero_info['unit'] == 25 ) {
$name = U25;
} else if ( $hero_info['unit'] == 26 ) {
$name = U26;
}
$name1 = $hero_info['name'];
} else {
$name = 'Mr. Nobody';
$name1 = 'unknown';
}
$name1 = $hero_info['name'];
if(isset($_GET['land'])) {
include("37_land.tpl");
include_once("37_land.tpl");
} else {
if($hero_info === false){
include("37_train.tpl");
}elseif($hero_info['intraining'] == 1){
$timeleft = $generator->getTimeFormat($hero_info['trainingtime'] - time());
$include_training = true;
$include_revive = false;
foreach ($heroes as $hdata) {
if ($hdata['dead'] == 1) {
$include_revive = true;
}
if ($hdata['inrevive'] == 1) {
$name1 = $hdata['name'];
$include_training = false;
}
}
if($hero_info === false && $include_revive){
include_once("37_revive.tpl");
}
if ($hero_info === false && $include_training) {
include_once("37_train.tpl");
} else if($hero_info['intraining'] == 1) {
$timeleft = $generator->getTimeFormat($hero_info['trainingtime'] - time());
?>
<table id="distribution" cellpadding="1" cellspacing="1">
<thead>
@@ -85,9 +109,7 @@
</table>
<?php
}
if($hero_info !== false AND $hero_info['dead'] == 1 AND $hero_info['intraining'] == 0){
include("37_revive.tpl");
}
if($hero_info !== false AND $hero_info['dead'] == 0 AND $hero_info['trainingtime'] <= time() AND $hero_info['inrevive'] == 0 AND $hero_info['intraining'] == 0){
include("37_hero.tpl");
}