Commit Graph

1739 Commits

Author SHA1 Message Date
novgorodschi catalin 9240993447 Fix report share on global chat
Fix report share on global chat
2026-09-10 09:05:25 +03:00
novgorodschi catalin 1035f06fd9 Add some option to Global Chat
1. Report send to chat
2. Mentions in chat
2026-09-10 08:20:42 +03:00
novgorodschi catalin a7bb7d8dbd Hero T4 — First Adventure Horse Reward by @Sk4r7z fix #391
The first adventure now guarantees one tier-1 Riding Horse (item ID 70), replacing the random item reward.

Behavior:
The horse is added to the player’s inventory and included in the adventure report.
Experience, silver, and resource rewards remain unchanged.
Subsequent adventures use the existing random item rewards.
Eligibility is based on the player’s completed adventure history. Selling the horse or retraining the hero does not reset eligibility.
If the hero dies on the first adventure, all loot is forfeited, including the horse. The next adventure does not receive the guaranteed reward.
This change is not retroactive for players with completed adventures.
2026-09-09 14:34:40 +03:00
novgorodschi catalin 52ff1c66e7 Alliance Bonuses — Admin Panel Update by @Sk4r7z issue #390
The admin panel now supports viewing and editing alliance bonus levels for Recruitment, Philosophy, Metallurgy, and Commerce.

Changes:
The alliance overview displays each bonus’s level, percentage, accumulated resources, and upgrade status.
The edit page allows administrators to select individual bonuses and set their levels from 0 to 5.
Changing a bonus level cancels its current upgrade while preserving accumulated resources. Setting level 5 clears the remaining resources.
Submitted levels are validated on the server, and bonus updates are recorded in the admin log.
Administrator identity is taken from the authenticated session.
Alliances without members can now be displayed.
2026-09-09 14:10:49 +03:00
novgorodschi catalin c55642e3c2 Battle Resolution Fix Report by @Sk4r7z
Battle Resolution Fix Report

The reported issue affected attacks involving more than 2,000 troops. The supplied error log identifies an invalid defender tribe value as the immediate cause of the crash, but does not establish why it occurred with that troop count.

The invalid tribe produced unit names from u-9 to u0, causing undefined array key warnings followed by an invalid SQL query in modifyUnit().

The updated AutomationBattleResolution.php includes:

Tribe validation before combat: Invalid attacker, defender, or reinforcement tribe data leaves the attack pending and logs the issue before evasion or combat changes occur.
Earlier deleted-village handling: The existing troop return logic runs before resolving the deleted village’s owner, tribe, walls, or units.
Defensive casualty checks: Invalid tribes cannot generate negative unit column names. Missing defender unit rows return a zero-loss structure without submitting an empty update.
Reinforcement validation: Invalid player tribe data is no longer automatically treated as Nature. Only reinforcement rows explicitly originating from 0 use tribe 4.
Consistent hero reporting: Reinforcement hero losses use the validated tribe.
Code comments: Changes are documented in the file.

Validation: The complete file passed a PHP 8.3 grammar check using a parser. All 33 original methods were retained; three methods were modified and three validation helpers were added.
2026-09-09 13:37:24 +03:00
novgorodschi catalin 483f0ae30c Add Global Chat Options
Add Global Chat Options

1. emoji
2. Poll
3. Delete message
4. Edit message
2026-09-09 11:49:59 +03:00
novgorodschi catalin 009bba0ce6 Added Chatbox
Added Chatbox
2026-09-08 12:56:02 +03:00
novgorodschi catalin 2b61bd72c2 Some important fixes
Some important fixes
2026-09-07 11:43:45 +03:00
novgorodschi catalin c2253bdebc Add allianz to cannot modify after winner
Add allianz to cannot modify after winner
2026-09-04 12:50:27 +03:00
novgorodschi catalin 90c8d3dee6 Fix #384 #387
Fix #384 #387
2026-09-04 12:45:00 +03:00
novgorodschi catalin 7e3ffc4c2e Some important fixes!
Some important fixes!
2026-09-04 12:39:23 +03:00
novgorodschi catalin a7bb354015 Merge branch 'master' of https://github.com/Shadowss/TravianZ 2026-09-04 07:36:50 +03:00
novgorodschi catalin bbc5ae0252 Some important fixes 2026-09-04 07:36:42 +03:00
Frederico Luís 240815a9bb Fix oasis ownership after village destruction (#386) 2026-09-04 07:36:22 +03:00
novgorodschi catalin 1bab6640d0 Some hot fixes!!!
Some hot fixes!!!
2026-09-03 13:51:05 +03:00
novgorodschi catalin b572760ee7 Fix natar start time 2026-09-03 08:10:57 +03:00
novgorodschi catalin 71e73dde95 Some additional fixes
Some additional fixes
2026-09-01 07:56:14 +03:00
Ferywir 054fde6e66 chore(battle): repair double-encoded characters in comments (#381) 2026-08-25 10:14:16 +03:00
Ferywir 22477a5571 fix(combat): stop the dead hero being removed twice from the troop count [#379] (#380) 2026-08-25 10:13:24 +03:00
Catalin Novgorodschi dda489b26f Update Battle.php
Fix hero bug
2026-08-25 07:38:36 +03:00
novgorodschi catalin 0f58d238f1 Fix Natars
Fix Natars
2026-08-20 07:58:50 +03:00
novgorodschi catalin 8f14ed7647 Mark all as read
Mark all as read
2026-08-18 10:10:22 +03:00
novgorodschi catalin 971bb56efe Fix an error on paypal
Fix an error on paypal
2026-08-17 12:31:11 +03:00
novgorodschi catalin 0f81a2b25e Some additional fixes for PHP errors
Some additional fixes for PHP errors
2026-08-17 10:31:03 +03:00
novgorodschi catalin 9d81c8eaa0 Fix something wrong 2026-08-14 13:22:45 +03:00
Catalin Novgorodschi af4f695289 Fix instance config writer to use existing instance API 2026-08-14 11:25:09 +03:00
Catalin Novgorodschi ee49c796f6 Keep instance config isolated from canonical admin template 2026-08-14 11:21:35 +03:00
novgorodschi catalin 35f4075734 Fix some atomic exploit
Fix some atomic exploit
2026-08-13 11:51:54 +03:00
novgorodschi catalin 7bad451a83 New Mileston + New SendWelcome Message
New Mileston + New SendWelcome Message
2026-08-12 14:36:39 +03:00
novgorodschi catalin 633aa05090 Add something cool for barraks, stable and workshop
Add something cool for barraks, stable and workshop
2026-08-12 09:43:41 +03:00
novgorodschi catalin 7c6425578e Fix sitter
Fix sitter
2026-08-12 08:11:04 +03:00
novgorodschi catalin e7c9c61ef8 Add sitter permission
Add sitter permission
2026-08-11 12:20:59 +03:00
novgorodschi catalin adb29798e1 Fix some Natars issue
Fix some Natars issue
2026-08-11 10:22:14 +03:00
novgorodschi catalin 8c5a5b94ea Some important fixes PHP 8.1
Some important fixes PHP 8.1
2026-08-11 09:19:32 +03:00
novgorodschi catalin ac262db66f Some important fix and view
Some important fix and view
2026-08-11 08:31:17 +03:00
novgorodschi catalin ba9bb0f6f6 fix special char in Profile 2026-08-10 19:25:19 +03:00
novgorodschi catalin 853d4dcecb Add hero header & Auction image tribe 2026-08-10 16:20:36 +03:00
novgorodschi catalin 1ecbba0e26 Some fix and add protected players
Some fix and add protected players
2026-08-10 12:37:56 +03:00
novgorodschi catalin d325fce01f Some important fix 2026-08-10 10:34:49 +03:00
novgorodschi catalin da58de16b4 Some important fixes
Some important fixes
2026-08-10 09:08:09 +03:00
Catalin Novgorodschi 2095a59b7e @Ferywir fix 2026-08-09 20:56:01 +03:00
Ferywir 91a980fa3d fix(combat): keep the hero casualty when rams force a battle recalculation [#372] (#373)
When rams change the wall level, applyRamDamage() replays the whole battle
through calculateBattle(). That helper WRITES to the hero table, so the replay
applied the hero damage a second time: applyHeroBattleDamage() only looks up
heroes with dead = 0, so the hero who had just died on the first pass was no
longer found, the call returned null and casualties_attacker[11] was never set.

Consequences, all visible in the screenshots of the issue: the report showed the
hero alive and "gained XP" instead of "died", modifyAttack3() never decremented
t11, and returnunitsComplete() added the hero back to units.hero - a hero dead in
the hero table but still displayed in dorf1 and in the rally point. Defender
heroes were also charged their health damage twice.

calculateBattle() now takes an optional $previousHeroOutcome: when the caller
hands over the first pass result, the hero damage is not applied again and the
first verdict (attacker / defender / reinforcement heroes) is carried over.

Also:
- drop the temporary [TravianZ][EROU] error_log() debug traces;
- 37_revive.tpl: only render a revive row for a hero that is actually dead
  (the revive action itself was already gated on dead = 1).

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Catalin Novgorodschi <cata7007@gmail.com>
2026-08-09 20:20:37 +03:00
novgorodschi catalin 770fa9fd6b Fix some bugs 2026-08-09 19:37:51 +03:00
novgorodschi catalin 4f93cb52a2 Some final fix 2026-08-09 16:14:01 +03:00
Catalin Novgorodschi 935d8939cd Update Artifacts.php 2026-08-09 09:22:43 +03:00
novgorodschi catalin 14886294f0 fix 2026-08-09 07:48:36 +03:00
novgorodschi catalin 49fd8e8982 tix hero 2026-08-08 20:45:23 +03:00
novgorodschi catalin 3b305d85c4 fix hero 2026-08-08 19:16:17 +03:00
novgorodschi catalin 6980a9ac44 fix #372 2026-08-08 11:40:54 +03:00
novgorodschi catalin 5e2d1f9958 Fix #364
Fix #364
2026-08-05 14:45:18 +03:00