Commit Graph

62 Commits

Author SHA1 Message Date
TravianZ Patcher eb64bba1e7 fix(quest): grant no-tasks shipment reward atomically [#129]
The "no tasks" quest mode delivers a Plus + gold shipment on claim
(case '91', and the final case '97'). The reward was granted with a
non-atomic read-modify-write:

    $gold = getUserField('gold'); $gold += 15; updateUserField('gold', $gold);

and the quest pointer / timer were advanced unconditionally. Under the
many concurrent ajax requests the game fires, a request that read gold/
plus before the claim and wrote the user row back after it would clobber
the freshly granted reward. The quest_time write (a literal value) still
survived, so the UI advanced to the next shipment countdown while the
player received neither Plus nor gold -- exactly the sporadic symptom in
the report.

Fix: gate the grant on an atomic conditional advance
(UPDATE ... SET quest = 91 WHERE quest = 90) and apply the reward with
in-place SQL increments (gold = gold + 15, plus = IF(plus > now, ...)),
matching the idiom already used in Templates/Plus/*.tpl. This makes the
claim idempotent (duplicate/concurrent requests grant nothing extra) and
immune to the lost-update race. Also fixes a latent case where an expired
Plus timestamp was extended in the past instead of reset to now.

Applied to both quest_core.tpl and quest_core25.tpl.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 18:32:01 +03: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 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 ed0fc6be2c Incremental refactor Building and Ranking
Incremental refactor Building and Ranking
2026-05-12 11:35:15 +03:00
Catalin Novgorodschi 8901c36c06 Incremental Refactor Templates 2
Incremental Refactor Templates 2
2026-05-07 08:24:40 +03:00
hdmaniak 15c06aefe3 Fix infinite gold hack in extended quest 2026-03-05 11:28:01 +01:00
Catalin Novgorodschi 59c1114b1c Change some text on license TravianZ 2025-02-11 11:22:22 +02:00
221V 8fb900524a tr - use readable keys 2024-12-11 19:15:07 +02:00
Shadow 4c68d8dd39 Update to version 8.3.5
Many Fixes
2022-02-18 13:56:17 +02:00
Shadow 4c116aefea update 2019-05-06 09:18:20 +03:00
Shadow 5bc1633182 Block folder accces
+404 error
2018-06-13 11:17:18 +03:00
iopietro c2f4d43b7e Reports refactor Part 2
+Heroes are now divided by tribes in battle reports
+Added to every report the support to read heroes from the battle report
data

Automation.php:
+Added the hero data, to every battle reports
+Fixed a bug that didn't count own dead defensive troops for general
attacks, top 10 attackers, attackers and hero xp
+Fixed a bug that didn't permit to add the rat enforcement to the
village, from quest number 8

Battle.php:
+Fixed a bug with catapults/rams that permitted to destroy level 1
buildings with only one catapults (even against 1000000 defensive
troops)
+Added a new function, for more readability

+General minor improovementes and bug fixing
2018-04-20 21:23:57 +02:00
Vladyslav 9f0e0e9136 Fixed more little bug in quest
Now all the images correspond to quests
2018-04-09 20:44:04 +03:00
Vladyslav 09340fb0c5 Fixed a little bug in quest
In the expanded quest "Task 24: Granary to Level 3", a warehouse image was displayed instead of an image of the granary
2018-04-09 17:01:03 +03:00
iopietro 9e44c1cd6d Some replacements
+Replaced all $GLOBALS['link'] with $database->dblink
-Removed Templates/links.tpl from build.php (it's already in
Templates/menu.tpl)
2018-04-08 19:55:28 +02:00
Pietro a6e09cf2c1 Fixed a bug in the map
Enforcements/scouts/attacks are now tracked in the map if you've a plus account.
2018-04-04 15:40:33 +02:00
Martin Ambrus d72290bb35 fix: changing village name to the same name in Quest 3 marks quest as OK 2017-11-26 14:39:36 +01:00
Martin Ambrus c7d737e345 fix: actually checking for a rat now in the rat quest 2017-11-25 10:11:15 +01:00
Martin Ambrus b9cdba81fb fix: cannot progress beyond quest 10 in classic set
#366
2017-11-25 01:11:07 +01:00
Martin Ambrus 4a7ab1f81a fix: quests do not progress
#354
2017-11-20 11:06:54 +01:00
Martin Ambrus 66132a7cdf refactor: Session.php only included once, login procedure optimization
#313
2017-11-20 00:39:37 +01:00
Martin Ambrus bec487cad5 fix: only including village file once 2017-11-17 12:36:45 +01:00
Martin Ambrus d7c38c7c39 fix: undefined indexes 2017-11-08 17:45:41 +01:00
Martin Ambrus a25f69f7ed fix: undefined indexes 2017-11-08 17:41:52 +01:00
Martin Ambrus 28f56cd9f6 fix: undefined index 2017-11-08 17:38:34 +01:00
Martin Ambrus 51f1d183eb fix: quest 6 does not send a message with original quests set
Closes #315
2017-11-08 08:54:12 +01:00
Martin Ambrus c9150f9d42 fix: quest-guy disappears on extended quests in "play no tasks" choice 2017-11-06 21:40:35 +01:00
Martin Ambrus e92d075060 fix: double-including confing results in redefining constants 2017-11-06 14:12:32 +01:00
Martin Ambrus cda7548cb1 fix: undefined indexes 2017-11-02 12:53:10 +01:00
Martin Ambrus e8e0cc89d3 fix: don't allow players to go back in quests 2017-10-28 19:51:14 +02:00
Martin Ambrus 133a5126f9 fix: Multihunter's Quest now always solvable 2017-10-28 18:54:37 +02:00
Martin Ambrus 6f5b464160 fix: quest 1 reloads page to show wood 1 once finished and dialog closes 2017-10-22 17:08:34 +02:00
Martin Ambrus ee467fe734 fix: sanitization of username in session where used directly in queries 2017-10-17 13:18:26 +02:00
Martin Ambrus ac5d3538f8 fix: mysqli_error needs MySQLi connection as parameter 2017-10-17 13:05:13 +02:00
Martin Ambruš 6c95d26dee fix: undefined variables handling 2017-10-05 16:49:03 +02:00
Martin Ambrus 59f6d5adb2 fix: Multihunter could never progress beyond Quest 4 2017-10-04 17:22:31 +02:00
Martin Ambrus 9261a4a4b2 Merge branch 'master' of https://github.com/evader1337/TravianZ into evader1337-master
# Conflicts:
#	GameEngine/Database/db_MYSQL.php
#	Templates/Build/avaliable.tpl
#	Templates/Message/inbox.tpl
2017-08-28 14:18:24 +02:00
TPLinux 3d182dc366 Change fetch time to server speed if > 5 2017-06-30 03:17:19 +00:00
evader1337 2d26af7c46 Trying to fix this monstrosity #2 2016-09-13 18:54:25 +02:00
Pietro 1a75425246 Quest exploit fix
I've fixed at 100% this exploit
2015-09-03 16:11:05 +02:00
cosme12 c271b32f61 Quest exploit fix 2015-08-29 14:38:16 -03:00
Shadow b94e054bdd Merge pull request #134 from sempoi/patch-22
Update mapscroll2.tpl
2014-03-10 08:29:48 +02:00
sempoi 37d4d564c9 Update mapscroll2.tpl 2014-03-08 20:24:03 +08:00
sempoi c52ec838a3 Update mapscroll.tpl 2014-03-08 20:21:20 +08:00
Shadow 19b89d433c quest update 2014-03-03 09:53:56 +02:00
Shadow 2057a7b429 Update quest_core.tpl 2014-01-20 12:44:24 +02:00
armando1980 08f2b0394b quest_core.tpl fix lang ok by: Armando
All texts are in the lang folder

todos los textos estan en la carpeta lang
2013-12-09 00:32:43 -05:00
Shadow b4e74fe31c Merge pull request #6 from Fannybaws/Task15
Tweak the wording of Task 15
2013-12-01 23:29:03 -08:00
KFCSpike d9d192d8eb Tweak the wording of Task 15 2013-12-01 12:43:29 +00:00
KFCSpike 75e1f2567b Tweak the wording of Task 14 2013-12-01 12:30:21 +00:00