241 Commits

Author SHA1 Message Date
novgorodschi catalin 21d50a1bc6 Fix warsim security issue & hero building
Fix warsim security issue & hero building
2026-06-26 09:10:47 +03:00
novgorodschi catalin fe6ff01396 Fix Some PHP 8+ view error in Build & Credits
Fix Some PHP 8+ view error in Build & Credits

TO DO :  Full audit in build directory
2026-06-25 10:54:58 +03:00
Ferywir e13586a2d7 fix(market): reject resource sends above the warehouse stock (#277) 2026-06-24 17:25:55 +03:00
Ferywir e432eeef95 fix(rally-point): show incoming hero column for attacks [#267] (#274) 2026-06-24 06:59:24 +03:00
Ferywir 228397d011 feature(rally-point): bold the "?" for incoming stacks below rally point level [#249] (#251)
On the rally point incoming tab, the number of an incoming unit type is never
revealed: it is always shown as a "?". When that stack is smaller than the
defender's rally point (gid 16) level, the "?" is rendered in solid black
bold, matching original Travian behaviour (e.g. rally point level 20 and an
incoming 19 praetorians shows a bold "?"). The eyesight artifact still reveals
which troop types are present (0 for the absent ones). Scope: village
attacks/raids only.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 13:40:59 +03:00
Ferywir f581add125 feature(rally-point): mark incoming attacks + show per-troop travel time [#245] (#248) 2026-06-22 06:54:41 +03:00
Ferywir 6edd4cc4a9 Fix(market): restore "max per merchant" click in send-resources tab
The marketplace send tab (17.tpl) was refactored with an empty <script>
block, which dropped the `haendler` (available merchants) and `carry`
(per-merchant capacity) globals that add_res()/upd_res() in unx.js rely on.
Without them `ic = haendler * carry` evaluates to NaN, so clicking the
"(capacity)" link next to a resource (or the resource icon) no longer fills
the input. Restore the two globals so the max-per-merchant fill works again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 15:27:49 +03:00
Ferywir dc971770e1 fix(market): harden NPC resource distribution against NaN [#211]
On some servers the NPC ("merchant") distribution screen could lock on
"Rest: NaN", hiding the trade button and making the NPC unusable. The "Rest"
value never returned to 0, so the player could not complete the trade.

Two layers of hardening:

* Client (Templates/Build/17_3.tpl):
  - add a safe npcDiv() helper (returns 0 on a 0 divisor or non-finite value)
    and route every division in portionOut() through it, so Infinity/NaN can no
    longer leak into the inputs;
  - in calculateRest(), coerce "Rest"/overall to a finite value (fall back to
    the total when org4 cannot be parsed) so the submit button can always
    reappear once the distribution is balanced;
  - coerce each resource, $totalRes, $maxstore and $maxcrop to a valid,
    non-negative integer before they reach the page/JS, so a resource computed
    as NaN/INF cannot poison org4/summe in the first place.

* Server (Market::tradeResource): clamp each requested amount to [0, maxstore]
  (crop to maxcrop) before persisting, so a forged or corrupted POST can no
  longer write out-of-range resources.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:38:46 +02:00
Ferywir dc8641c13f fix(market): raise resource input maxlength so high-speed servers can send full convoys
The send/trade-route resource fields were capped at maxlength="5", limiting
input to 99,999 per resource. On high-speed servers a single convoy carries far
more (e.g. Teutons: 1000 x speed), so players could not fill their merchants.
Raise the cap to maxlength="9" (~1 billion), which covers any server speed.
The server already validates against available resources and merchant capacity,
so no server-side change is needed and no over-send is possible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 17:47:46 +03:00
Ferywir 6d57cd7fe1 feat(preferences): apply auto-completion (village name suggestions) [#198]
Honour the per-user auto-completion checkboxes on the rally point and the
marketplace, where the target village is typed by name (dname field):
  - v1: own villages
  - v2: villages in the surroundings of the active village
  - v3: villages of the player's alliance members

A new Database::getAutoCompleteVillages() builds the bounded, de-duplicated
name list from the enabled categories (system accounts excluded). A shared
Templates/villageAutocomplete.tpl renders a native <datalist> consumed by
the dname input via list="dnameSuggest"; nothing is emitted when every box
is unchecked, keeping the previous behaviour. Removes the "not coded yet"
tag from the auto-completion section in the preferences form.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 09:28:20 +02:00
Ferywir 5d366284e6 l10n: full interface translation (FR/RO/IT/ZH) + EN fallback hardening (#186) 2026-06-09 10:28:59 +03:00
novgorodschi catalin b495dcb559 Some fix
Some fix
2026-06-02 12:58:20 +03:00
novgorodschi catalin 1d1f1dc72a Fix + Redesign
Fix some error programing code and redesign special medals, tribe medals, mh medals, taskmaster medals, natars medals, nature medals, protection medals, etc. Add some language code in Profile.php and preference.tpl. Change some description in struct database for Nature and Taskmaster
2026-05-28 12:25:28 +03:00
novgorodschi catalin 31c475e644 Fix + Credits + Start Language Coding
Fix Artefacts + Credits + Start Language Coding
2026-05-27 12:26:24 +03:00
novgorodschi catalin 55e6dd60b5 Refactor + BugFix
1. Fix a bug in Admin Panel that you can edit by yourself your rank, now you cannot edit your rank anymore.

2. Now Alliance Leader can edit his own Position

3. Fix negative value on Demolition Building, now in database at lvl is appear new level not -1

4. Refactor Ajax map, now all is alligned (Ajax folder and Map folder)

5. Fix bug from Palace (when change capital now Automation recount population automaticaly on old capital and new capital)
2026-05-18 09:18:35 +03:00
Catalin Novgorodschi 8901c36c06 Incremental Refactor Templates 2
Incremental Refactor Templates 2
2026-05-07 08:24:40 +03:00
hdmaniak d2a3fb3aa7 Fix hero bonus race condition using atomic SQL 2026-03-27 10:45:31 +01:00
hdmaniak2 0684a60c67 Fix: Hide hero training/revive when Heros mansion is level 0 (#147)
Co-authored-by: hdmaniak <bombo15.forum@gmail.com>
2026-03-26 08:20:35 +02:00
hdmaniak2 68426cf13d Fix manual links for marketplace and cranny 2026-02-24 21:11:37 +01:00
221V 98e8d3a666 tr - rm doublings + fix desc keys 2024-12-11 16:42:57 +02:00
221V 365aba27bf tr - unify - artifact to artefact 2024-12-11 16:21:16 +02:00
221V 422f8d28ef tr - fix key 2024-12-11 15:53:13 +02:00
221V ff22a74095 tr -- rm dublicates 2024-12-11 15:44:50 +02:00
221V a0a0059f68 fix u49 2024-10-09 17:34:24 +03:00
221V 130ae40327 fix u43 2024-10-09 17:33:31 +03:00
221V b851713b32 fix u39 2024-10-09 17:32:14 +03:00
Catalin Novgorodschi 5da2154a77 Merge pull request #44 from osztenkurden/master
Fixes for multiple bugs
2024-05-15 12:54:45 +03:00
saulius 840cd62f1e Update 37_hero.tpl
bug ciange
2023-10-12 16:16:40 +03:00
Hubert Walczak cbd343e369 Fixed city walls and rallypoint incorrect availability 2023-07-07 05:54:01 +02:00
fanmuchen 6b5d02097a Localization Reference Added
Some of the templates failed to refer to the localization in /GameEngine/Lang/. Proper reference was created.
2022-04-01 14:50:33 +08:00
fanmuchen 1aa16452c8 Add files via upload
Some of the templates failed to refer to the localization in /GameEngine/Lang/. Proper reference was created.
2022-04-01 14:44:40 +08:00
Shadow 4c68d8dd39 Update to version 8.3.5
Many Fixes
2022-02-18 13:56:17 +02:00
Vladyslav 22548258f0 Minor changes and additions
+Added the ability to Enable (Disable) the display of the targets of the catapults in the rally point
+Added the display of the village with a wonder of the world (as is done with the display of artifacts) in the viewing player profiles. Also this function is Enabled (Disable) during installation and in the admin panel.
2018-08-27 18:15:53 +03:00
iopietro f032523e1c Generale fixes
+Fixed a bug that didn't return reinforcements in counquered oasis, if
it was released by the owner, or from the admin panel
+Changed the catapults and rams formulas (still not completed at 100%),
thanks to Kirilloid!
+Changed the Natars' capital default coordinates
2018-07-28 15:07:52 +02:00
iopietro 77136a9784 Artifacts update and optimizations
+Added the "Artifacts" section in the Admin Panel, which contains two
options: return a deleted artifact to the Natars and create new
Artifacts, assigned to a specified player
+Return to Natars coded, in the village section of the Admin Panel
+Moved a lot of functions and costants from Automation.php to the "new"
class Artifacts.php
+Optimized a lot the whole Natars creation process, decreased the number
of query of about 600
+Optimized a lot the function which deletes a player's account, it's now
executed almost instantly, even with players with a lot of villages
+Redesigned the map spawn system, using a more Travian-like village
distribution
+Fixed a bug that did show a broken village in the artifact chronology,
if that village was destroyed
+Reduced the amount of redundant code (about 230 lines) for
27_1.tpl/27_2.tpl and 27_3.tpl
+Fixed a bug that permitted to build the Great Granary and the Great
Warehouse in the whole account, with only a village effect artifact
+Fixed a bug in the Admin Panel map that didn't permit to show village
informations, if that village contained single quotes in its name
2018-07-24 03:04:25 +02:00
iopietro c4d6d70128 General fixes
+Fixed a bug that showed deleted artifacts in the treasury
2018-06-22 12:57:05 +02:00
iopietro fc562d92dd Merge branch 'master' of https://github.com/Shadowss/TravianZ
Conflicts:
	Templates/Profile/overview.tpl
2018-06-21 15:01:56 +02:00
iopietro c574a71b3a General fixes
+Fixed a bug that didn't delete artifacts when a player deleted his
account
+Added "(artifact)" if a village has an artifact in the village overview
+Added the artifact section in the multihunter panel (return to natars
doesn't work yet)

NOTE: To play this version of the game, you have to run this query first
(where "s1_" is the prefix of your server):

ALTER TABLE `s1_artefacts` ADD `del` TINYINT(1) NULL DEFAULT '0' AFTER
`lastupdate`;
ALTER TABLE `testtravian`.`s1_artefacts` ADD INDEX
`active-owner-conquered-del` (`active`, `owner`, `conquered`, `del`);
2018-06-21 14:43:47 +02:00
Shadow 135f8fa24f Little mistake in market
+fix vacation in market.
+for the moment is a problem in database (not register vacation in database)
2018-06-21 15:24:14 +03:00
Vladyslav a547938514 Change the date display
In the code, the dates have a variety of display formats so everything can not be displayed at once. It is possible that somewhere else there are dates in other display formats.
2018-06-17 15:28:58 +03:00
Shadow 5bc1633182 Block folder accces
+404 error
2018-06-13 11:17:18 +03:00
iopietro 79eb6a73d6 General fixes
+Removed almost all "BANNED" controls to template and .php UI files. The
control will be done only once and in the Session class
2018-06-11 02:22:22 +02:00
iopietro f264cb6b8d General fixes
+Oases are now displayed in the players profile
+Fixed a bug that showed a wrong localization in the Castle
2018-06-10 00:41:18 +02:00
Vladyslav 75a6bd3376 Change the date display in the treasury 2018-06-09 16:14:16 +03:00
iopietro b7f958b203 General fixes
+Changed error control priority in the Armoury and Blacksmith
2018-06-06 02:25:49 +02:00
Vladyslav f81e918ca0 NPC button no longer appears when total resources is not enough pary 2
This hotfix fixes the bug described in comment: https://github.com/Shadowss/TravianZ/issues/544#issuecomment-394587340
All fixed according to the example pull request #442
2018-06-05 21:06:59 +03:00
iopietro b12f4d4497 General fixes
+Fixed a bug that didn't permit to see a defender hero in a spy report
+Fixed a bug that only permitted to revive the last hero on the hero
list
2018-05-31 15:23:48 +02:00
iopietro 36b790d08a General fixes
+Fixed a bug that permitted to attack occupied oasis (even through the
farmlist) even if the oasis' owner was banned
+Rewritten some code in Units.php, for a better errors handling
+Fixed some errors that could have showed sometimes
+Fixed a bug that didn't permit to send an attack under certain
circumstances
+Villages/oasis with X = 0 or Y = 0 as a coordinates, can now be raided
+You are now be able to send resources with the merchants, at villages
with X = 0 or Y = 0 as a coordinates
2018-05-29 18:57:14 +02:00
Vladyslav cbcc9b5262 Change other date formats to one view 2018-05-20 02:33:25 +03:00
iopietro b91e27381b General fixes
+Fixed a bug that didn't permit to display the bonus of some buildings
at level 0
+The cavalry training percentage bonus, provided by the horsedrinking
trough, is now displayed correctly
2018-05-18 17:23:54 +02:00