diff --git a/GameEngine/Session.php b/GameEngine/Session.php index e277ec0b..dba168d5 100755 --- a/GameEngine/Session.php +++ b/GameEngine/Session.php @@ -353,6 +353,33 @@ function __construct() { exit; } + // Constantele de miscare pentru aventuri sunt definite in + // Data/hero_items.php, care se incarca doar la nevoie (din HeroItems, + // HeroAdventure etc.). Sesiunea poate rula inaintea lor, asa ca luam + // valorile cu rezerva in loc sa presupunem ca exista. + $advOut = defined('MOVEMENT_ADVENTURE_OUT') ? (int) MOVEMENT_ADVENTURE_OUT : 20; + $advBack = defined('MOVEMENT_ADVENTURE_BACK') ? (int) MOVEMENT_ADVENTURE_BACK : 21; + + // Partea de aventuri se adauga DOAR cu functiile T4 pornite: pe un + // server care nu a rulat migrarea, tabela hero_adventure nu exista, iar + // o interogare esuata ar face herocount null - adica exact efectul pe + // care il reparam aici (eroul declarat disparut si ucis). + $adventureTerms = ''; + + if (defined('NEW_FUNCTIONS_HERO_T4') && NEW_FUNCTIONS_HERO_T4) { + $adventureTerms = ' + + + IFNULL((SELECT COUNT(*) FROM ' . TB_PREFIX . 'movement + WHERE ' . TB_PREFIX . 'movement.proc = 0 + AND ((' . TB_PREFIX . 'movement.sort_type = ' . $advOut . ' + AND ' . TB_PREFIX . 'movement.`from` IN(' . $villageIDs . ')) + OR (' . TB_PREFIX . 'movement.sort_type = ' . $advBack . ' + AND ' . TB_PREFIX . 'movement.`to` IN(' . $villageIDs . ')))), 0) + + + IFNULL((SELECT COUNT(*) FROM ' . TB_PREFIX . 'hero_adventure + WHERE uid = ' . (int) $this->uid . ' AND status = 1), 0)'; + } + $q = ' SELECT IFNULL((SELECT SUM(hero) FROM ' . TB_PREFIX . 'enforcement WHERE `from` IN(' . $villageIDs . ')), 0) + @@ -367,7 +394,7 @@ function __construct() { WHERE ' . TB_PREFIX . 'movement.`to` IN(' . $villageIDs . ') AND ' . TB_PREFIX . 'movement.ref = ' . TB_PREFIX . 'attacks.id AND ' . TB_PREFIX . 'movement.proc = 0 - AND ' . TB_PREFIX . 'movement.sort_type = 4), 0) + AND ' . TB_PREFIX . 'movement.sort_type = 4), 0)' . $adventureTerms . ' AS herocount'; $heroUnitRegisters = mysqli_fetch_array( diff --git a/gpack/travian_t4/img/g/bg16.jpg b/gpack/travian_t4/img/g/bg16.jpg index 7d897706..e2bfa03c 100644 Binary files a/gpack/travian_t4/img/g/bg16.jpg and b/gpack/travian_t4/img/g/bg16.jpg differ diff --git a/gpack/travian_t4/img/g/bg17.jpg b/gpack/travian_t4/img/g/bg17.jpg index d11535fe..6163bebb 100644 Binary files a/gpack/travian_t4/img/g/bg17.jpg and b/gpack/travian_t4/img/g/bg17.jpg differ diff --git a/gpack/travian_t4/img/g/bg18.jpg b/gpack/travian_t4/img/g/bg18.jpg index 0d480fb5..cc961c5c 100644 Binary files a/gpack/travian_t4/img/g/bg18.jpg and b/gpack/travian_t4/img/g/bg18.jpg differ diff --git a/gpack/travian_t4/img/g/bg19.jpg b/gpack/travian_t4/img/g/bg19.jpg index 8e0f5047..77e49ca5 100644 Binary files a/gpack/travian_t4/img/g/bg19.jpg and b/gpack/travian_t4/img/g/bg19.jpg differ diff --git a/img/hero/adv_back.gif b/img/hero/adv_back.gif index 1d1241ad..8f4cd841 100644 Binary files a/img/hero/adv_back.gif and b/img/hero/adv_back.gif differ diff --git a/img/hero/adv_out.gif b/img/hero/adv_out.gif index 64037248..cf1d92ef 100644 Binary files a/img/hero/adv_out.gif and b/img/hero/adv_out.gif differ diff --git a/img/hero/res_all.png b/img/hero/res_all.png index a243590c..c404bfac 100644 Binary files a/img/hero/res_all.png and b/img/hero/res_all.png differ