Last fix for Hero T4 & V11

/*
|--------------------------------------------------------------------------
| FIX List
|--------------------------------------------------------------------------
|
| 1. Hero Attribute Points
|    - When adding attribute points to the hero, the page currently refreshes
|      after every click on the "+" button.
|    - Implement a faster allocation method (AJAX or similar) so multiple
|      points can be assigned without a full page refresh.
|    - The implementation must remain secure and not be exploitable
|      (validate requests server-side, prevent double submissions,
|      verify available points, etc.).
|
| 2. Hero Equipment Restrictions (Original Travian Behavior)
|    - Prevent equipping or unequipping hero items while the hero is:
|        • On an adventure.
|        • Attacking (alone or with troops).
|        • Away as reinforcements.
|
| 3. Oasis Navigation
|    - When opening an oasis (37_land.tpl), the 37_t4nav.tpl navigation
|      disappears.
|    - Include the navigation menu on the oasis page as well.
|
| 4. Auction House Redesign
|    - Redesign 37_auction.tpl to match the Merchant.png mockup.
|    - Keep the existing auction functionality exactly as it is.
|    - Only improve the UI/UX.
|    - You may crop and reuse graphics from Merchant.png.
|    - Add Gold ⇄ Silver exchange functionality.
|
| 5. Hero Item Bonuses (Highest Priority)
|    - Verify that hero equipment bonuses are applied correctly.
|    - Example:
|        • Helmet of the Ruler should reduce Barracks training time by 20%.
|        • Currently, training time remains unchanged whether the helmet
|          is equipped or not.
|    - Also verify:
|        • Stable training speed bonuses.
|        • Boots bonuses.
|        • Any other related hero equipment effects.
|
| 6. Adventures Page Redesign
|    - Redesign 37_adventures.tpl to match the Adventure.png mockup.
|    - Keep the "Expires in" column intact.
|
*/
This commit is contained in:
novgorodschi catalin
2026-07-23 15:16:51 +03:00
parent 34e3d88e39
commit 1e19f117ca
19 changed files with 620 additions and 29 deletions
+10
View File
@@ -54,6 +54,16 @@ define('CLEANUP_MESSAGES_DAYS', %CLEANUPMESSAGES%);
define('CLEANUP_INTERVAL', 3600);
define('CLEANUP_BATCH', 5000);
//////////////////////////////////
// ***** EROU *****//
//////////////////////////////////
// Regenerarea de BAZA a vietii eroului, in HP pe zi, independenta de punctele
// puse in atributul de regenerare (ca in Travian T4). Fara ea, un erou cu 0
// puncte in regenerare nu si-ar reface niciodata viata si ar muri inevitabil
// dupa destule aventuri. Se scaleaza cu viteza serverului, ca si regenerarea
// din atribute. 0 = dezactivata (comportamentul vechi).
define('HERO_BASE_REGEN', %HEROBASEREGEN%);
//////////////////////////////////
// ***** SERVER SETTINGS *****//
//////////////////////////////////
+8
View File
@@ -147,6 +147,14 @@ class Process {
$findReplace[$placeholder] = $value;
}
// Regenerarea de baza a vietii eroului (HP pe zi). Vezi HERO_BASE_REGEN.
$heroRegen = isset($_POST['hero_base_regen']) ? (int) $_POST['hero_base_regen'] : 10;
if ($heroRegen < 0) { $heroRegen = 0; }
if ($heroRegen > 100) { $heroRegen = 100; }
$findReplace["%HEROBASEREGEN%"] = $heroRegen;
$findReplace["%DOMAIN%"] = $_POST['domain'];
$findReplace["%HOMEPAGE%"] = $_POST['homepage'];
$findReplace["%SERVER%"] = $_POST['server'];
+1
View File
@@ -309,6 +309,7 @@ foreach($mechs as $k => $l){
<div><label>Delete unarchived reports after (days)</label><input class="input" name="cleanup_reports" id="cleanup_reports" value="14"></div>
<div><label>Delete chat messages after (days)</label><input class="input" name="cleanup_chat" id="cleanup_chat" value="7"></div>
<div><label>Delete messages erased by both sides (days)</label><input class="input" name="cleanup_messages" id="cleanup_messages" value="0"></div>
<div><label>Hero base regeneration (HP/day)</label><input class="input" name="hero_base_regen" id="hero_base_regen" value="10"></div>
</div>
<div class="f10" style="margin-top:8px;opacity:.75;">
Automation runs from cron.php instead of players' page loads. One cron invocation keeps working for