Commit Graph

275 Commits

Author SHA1 Message Date
Emerson Freitas a7bdac8392 fix: harden troop processing race conditions (#98) (#138) 2026-03-17 20:13:14 +02:00
levi a0ef06a35f chore: harden php8 compatibility, optimize installer/croppers, and refresh docs/admin ux 2026-03-14 16:50:27 -03:00
Catalin Novgorodschi 260896570e Revert "vulnerability fixed and cleanup and refactor"
This reverts commit 2a44e76414.
2026-02-11 15:22:16 +02:00
Catalin Novgorodschi bb1ac523cc Merge branch 'master' of https://github.com/Shadowss/TravianZ 2026-02-11 15:17:21 +02:00
Catalin Novgorodschi 2a44e76414 vulnerability fixed and cleanup and refactor 2026-02-11 15:11:43 +02:00
lietuvis10 038465fe9a Update Database.php
Fixed chieftain training issue: when player reinforced their chiefs to other villages they could train more so no more unlimited chieftains :)
2025-12-14 15:27:46 +02:00
lietuvis10 bc296fb251 Update Database.php
Functions for automated Crop Finder population.
2025-10-27 17:15:43 +02:00
lietuvis10 432b92220f Update Database.php
fixed query.
2025-10-23 19:46:45 +03:00
Catalin Novgorodschi db3d9bfff1 Crop finder @lietuvis10
Fix crop_finder.php by @lietuvis10
2025-10-23 10:27:45 +03:00
Catalin Novgorodschi 59c1114b1c Change some text on license TravianZ 2025-02-11 11:22:22 +02:00
Catalin Novgorodschi ac6a99cb89 Update Database.php 2025-02-11 08:21:43 +02:00
221V adaec555db rewrite "please don't scream" sql 2025-02-03 19:47:39 +02:00
Catalin Novgorodschi 4471074fa3 Update Database.php 2024-10-31 11:35:54 +02:00
CarloFalco 27c0a2f10b Update Database.php
Fix issue "Building orders are canceled after the attack in WW village"
2024-07-13 17:19:46 +02:00
Catalin Novgorodschi 5da2154a77 Merge pull request #44 from osztenkurden/master
Fixes for multiple bugs
2024-05-15 12:54:45 +03:00
Hubert Walczak 3d95916c29 Fix for db throws and install process not going through 2023-07-09 12:03:56 +02:00
nixpc de804b9567 Whoops! 2023-07-06 23:14:27 +02:00
nixpc 1549f830aa Fix CVE-2023-36995 name change alliance 2023-07-06 23:13:22 +02:00
nixpc e39ca488a9 Fix CVE-2023-36995 2023-07-06 23:02:00 +02:00
Catalin Novgorodschi 3925a76e9b fix database 2022-02-21 09:15:37 +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
Vladyslav baf38dc6f9 Sorting of villages
+Fixed sorting of villages in the profile overview
of the player and in the side menu of the village
list (multivillage). Reduced to the real Travian.
2018-08-31 13:02:00 +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 d3a78a5ea5 Admin panel fixes
+Plus and bonuses duration, can now be decreased or resetted, by
inserting a negative value of days
+Artifacts and artifacts villages created on a user account, won't
contain any troops
+Some clean up
2018-07-27 02:25:08 +02:00
iopietro b9a442b423 General fixes
+Fixed a bug that would have killed all troops by starvation, if added
through the admin panel
2018-07-25 17:17: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
Vladyslav 642d90a73d General fixes
+Redesigned set of buildings in the center of the village of Natars with artifacts
+Rally point now correct displayed in the village overview of the admin panel

NOTE: To use this change, must recreate account Natars
2018-06-30 23:23:05 +03:00
Catalin Novgorodschi c9c9759664 Fix vacation mode
+now vacation mode fully work
+you cannot send ressource / attacks from User Profile 
(» Send troops. (Vacation mode on) )
(» Send merchant(s). (Vacation mode on) )
+you cannot send ressource from marketplace : 
(Player is on vacation mode. You cannot send resources to him.)
+you cannot attack him from rally point
(User is on vacation mode)
+also is display a message on player profile 
Player Shadow
This player is on VACATION.
+also is display an error message when you try to login
Vacation mode is still enabled

NOTE : must code the criteria from vacation mode

1. There are no moving troops
2. There are no troops that defend the villages of other players
3. No other player has reinforcements on you
4. You do not own a village with the Wonder of the World
5. You do not own an artifact
6. You are no longer in the beginner's protection
7. You do not have troops caught in the cells.
8. Your account is not being deleted.
2018-06-26 10:42:07 +03:00
Vladyslav dffdcc4411 Enable (Disable) some new features
+Enable (Disable) New forum post message
+Enable (Disable) Tribes images in profile
+Enable (Disable) MHs images in profile
+Enable (Disable) Display artifact in profile
+Minor changes

NOTE 1: To play this version of the game, you need to reinstall
the server OR you can simply add these lines of code into your file:
ameEngine/config.php

define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", False);
define("NEW_FUNCTIONS_TRIBE_IMAGES", False);
define("NEW_FUNCTIONS_MHS_IMAGES", False);
define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", False);

GameEngine/Admin/Mods/constant_format.tpl

define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", %NEW_FUNCTIONS_FORUM_POST_MESSAGE%);
define("NEW_FUNCTIONS_TRIBE_IMAGES", %NEW_FUNCTIONS_TRIBE_IMAGES%);
define("NEW_FUNCTIONS_MHS_IMAGES", %NEW_FUNCTIONS_MHS_IMAGES%);
define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", %NEW_FUNCTIONS_DISPLAY_ARTIFACT%);

NOTE 2: pay special attention to the fact that these are two
different records !!! If the records are entered incorrectly,
you will receive a non-working code!
2018-06-25 21:06:30 +03:00
iopietro c4d6d70128 General fixes
+Fixed a bug that showed deleted artifacts in the treasury
2018-06-22 12:57:05 +02:00
iopietro 10de3dd1b3 General fixes
+Fixed a little mistake

NOTE: In order to play this version of the game properly, you need to refresh your browser cache
2018-06-21 15:50:49 +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
iopietro 9efbe9ffd9 General fixes
+Fixed a bug that didn't permit to create users' villages in small maps,
from the admin panel
2018-06-15 02:31:37 +02:00
iopietro d96259afd8 General fixes
+You can no longer build WW if your and your alliance building plans
aren't active yet
+You can no longer remove the WW from the village if you remove it from
the building queue
+Spies from every tribe will now consume crop correctly, when returning
from a scouting attacks
+Spies from every tribe will now be displayed correctly, in the "Troops"
tab of dorf3.php, when returning from a scouting attack
+Building levels will now not be downgraded by 1 level, when conquering
a Natars' village
+Natars' villages with an artifact inside, will now be deleted if the
artifact is conquered (even if the pop isn't 0)
2018-06-09 03:03:01 +02:00
iopietro 4abb5c1354 A little mistake 2018-06-01 17:19:32 +02:00
iopietro 693d29c0f8 General fixes
+Fixed a bug that permitted to invite players already in an alliance
+Fixed a bug that didn't delete the alliance permissions when the
alliance was dispanded/dispersed or the user left the alliance by
destroying his embassy
+Added a new error which shows up when trying to invite someone already
in an alliance
2018-06-01 17:14:24 +02:00
iopietro d171ac02cc General fixes
+Fixed a bug that permitted to create threads and post in closed forums
(only who have the permission to manage the forum can do that)
+Fixed a bug that permitted to write posts to closed threads
+Fixed a bug that permitted to view not shared forums under certain
circumnstances
2018-05-30 20:10:59 +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
iopietro 5596472f0a General fixes
+Fixed a bug that didn't permit to delete/archive/unarchive messages
2018-05-27 12:38:51 +02:00
iopietro 11c3d44168 general fixes
+Fixed a bug that didn't permit to counquer an artifact in certain
circumstances with the new automation system
2018-05-25 17:45:05 +02:00
iopietro 8605996533 Fixed some Automation bug
+Fixed the (in)famous "doubling troops bug", this has been the oldest
bug I can remember, it lasted 7 years!!!
+Reworked the whole lock system, it's more maintanable and easy to read
now
+Removed some useless class fields, reworked some methods that depended
on them
2018-05-24 01:28:56 +02:00
iopietro fca22ac98b General fixes
+Fixed a bug that didn't permit to attack with catapults with the new
automation system
+Fixed a warning that could have been displayed in certain cases
2018-05-23 17:36:16 +02:00
iopietro c340eb267e General fixes
+Special chars can now be used in villages name
+Some clean-up
2018-05-22 19:16:35 +02:00
iopietro f0b9f32826 General fixes
+Moved "isWinner()" method from Automation.php to Session.php, it's now
triggered when activating plus function or entering in
plus1.php/build.php
+General clean-up and better indentation
+The tournament square bonus is now displayed correctly
2018-05-22 00:33:09 +02:00
iopietro 3a14da51e0 Alliance forum fixes part 5
+Confederation and shared forums are now visible to the confederation
alliances or selected alliances/users
+Sticked topics are now displayed first
+Fixed a bug that permitted to add confederated alliances/users to
shared forums
+Minor bug fixing
2018-05-20 21:45:14 +02:00
iopietro 34c8000e44 Alliance forum fixes part 4
+Public forums can now be created by MH only
+Public forums can only be edited by MH only (every MH)
+Fixed BBCode in forum posts
+Removed 8 unused columns from the database
+Removed about 150 lines of unused code in forum.tpl
+Minor improvements and bug fixing
2018-05-20 16:50:26 +02:00
Vladyslav b752e4c4f4 Merge branch 'master' of https://github.com/Shadowss/TravianZ 2018-05-20 01:14:01 +03:00
iopietro 4f98e14c29 Alliance forum fixes part 2
+Added the "Forum" link to the game menu (above Game Rules), player
without an alliance, will be able to access to public forums only
+All players can now open public forums (even without an alliance), post
to them, edit and delete them
+Added the possility to add alliances and players to the "Who can view
this forum" list, the graphic was present but there wasn't the database
and code support (conditions aren't coded yet)
+General fixes

NOTE: To play this version without reinstalling the server, you have to
run this simple query:

ALTER TABLE s1_forum_cat ADD (`display_to_alliances` text,
`display_to_users` text)
2018-05-19 22:04:51 +02:00
Vladyslav a956abee13 Change the date display
The date display was changed from 'm/d/Y' to 'd.m.Y'
2018-05-19 20:52:33 +03:00