Commit Graph

34 Commits

Author SHA1 Message Date
Martin Kalabek e61177614e fix missing prefixes for oasis troops regen sql 2024-10-10 20:05:14 +02:00
Shadow 4c116aefea update 2019-05-06 09:18:20 +03: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 5bc1633182 Block folder accces
+404 error
2018-06-13 11:17:18 +03:00
iopietro c9332ea67d General fixes
+Changed the Multihunter's tribe from 0 to Romans (1)
+Added an option to the Multihunter's panel map which shows all
artefacts on the map
2018-06-06 01:29:42 +02:00
iopietro 3d5239c163 Added some indexes
You can add them without reinstalling the whole server, by executing
this query (where "s1_" is the prefix of your server):

ALTER TABLE `s1_forum_cat` ADD INDEX `display_to_alliances`
(`display_to_alliances`(11));
ALTER TABLE `s1_forum_cat` ADD INDEX `display_to_users`
(`display_to_users`(11));
ALTER TABLE `s1_forum_cat` ADD INDEX `sorting` (`sorting`);
2018-05-21 17:43:17 +02:00
iopietro 877762ea6e General fixes
+Updated installation SQL struct

NOTE: To play this version without reinstalling the server, you need to
run this query (where "s1_" is the prefix of the server):

ALTER TABLE `s1_forum_topic`
  DROP `alliance0`,
  DROP `player0`,
  DROP `coor0`,
  DROP `report0`;

ALTER TABLE `s1_forum_post`
  DROP `alliance0`,
  DROP `player0`,
  DROP `coor0`,
  DROP `report0`;
2018-05-20 16:56:37 +02: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
iopietro e5d823cda0 Alliance forum fixes part 1
Fixed the majority of security issues:

+Fixed a bug that permitted to edit, delete and create a forum in any
alliance, without any permissions
+Fixed a bug that permitted to edit, create and delete any kind of
thread, with any kind of permission
+Fixed a bug that permitted to edit, modify and delete every kind of
post, without any kind of permission
+Fixed a bug that din't permit to create posts and threads
+Fixed a bug that permitted to create forum and threads with empty
name/topic
+Fixed a bug that permitted to move a thread to an invalid forum
+Fixed a bug that permitted to create an invalid type of forum
+Fixed a bug that didn't permit to move forums, to the top and the
bottom of their forum type (in reality, it wasn't even coded)
+Added a sorting column for supporting the "move to top/bottom"
functionality
+Minor improvements and bug fixing/code indentation/removal of redundant
code

NOTE: For playing this version, you HAVE to add a new column to the table "s1_forum_cat", you can simply do that by running this query (where "s1_" is the prefix of your server): ALTER TABLE s1_forum_cat ADD `sorting` int(11) NOT NULL AFTER `id`
2018-05-18 00:28:48 +02:00
iopietro bdd3bfd41c Farmlist improvements and fixes
+Troops while adding/editing a raid lists are now inside of a table,
this is a graphic enhancement
+Reduced the X and Y textboxes size while adding/editing a raid list
+Fixed a bug that didn't permit to add a raid list
+Fixed a bug that did permit to insert spies in raid lists
+The farmlists graphic is now more clear, "Add raid" and "Start raid"
are now two general buttons, instead of having two buttons for raid list
+"Select all" checkbox, will select all raid without refreshing the page
(through JS)
+Moved the function "getDistance" to Database.php
+Removed a lot of redundant code from crop_finder.php
+Removed rams, catapults, chiefs and settlers from the raid list,
because the first three can't even loot resources
+Removed trooplist2.tpl because of a more general unique template file
(trooplist.tpl)
+Some minor improvements and bug fixing

IMPORTANT NOTE: if you don't want to reinstal the whole server, you can
simply run this little query (where "s1_" is the prefix of your server):

ALTER TABLE `s1_raidlist` DROP `t7`, DROP `t8`, DROP `t9`, DROP `t10`;
2018-05-16 16:49:25 +02:00
iopietro 26cb03cdb6 Artifacts fixing part 1
+Added a new table in the database, called "artefacts_chrono" which
stores the chronology of all artifacts
+Added the support for the artifacts chronology in 27_show.tpl
+Added the support for interacting with the artifacts chronology table in Database.php
+Cleaned the code in 27_show.tpl
+Some minor improovements and bug fixing
2018-04-23 20:34:28 +02:00
Shadow d4e19c7127 update medals accounts 2018-01-23 10:07:52 +02:00
Alex Stoica 1a71fdbc60 Add WW win correct date 2018-01-07 16:48:22 +00:00
Martin Ambrus b261212d12 fix: expansion slots not being cleared up upon village destruction
#400
2017-12-02 16:17:47 +01:00
Martin Ambrus 55a5238a6d chore: create default users with bcrypt enabled by default 2017-12-01 19:32:03 +01:00
Martin Ambrus 6d0e95670b refactor: messages and reports only loaded on pages where needed
#313
2017-11-17 21:00:00 +01:00
Martin Ambrus d17d1f9b32 refactor: last round of database values caching
#313
2017-11-17 19:40:34 +01:00
Martin Ambrus e2612efbf8 refactor: date column really can't be varchar 2017-11-17 17:20:05 +01:00
Martin Ambrus 282d7f9db8 refactor: real hero check to use a lot less queries 2017-11-17 13:28:21 +01:00
Martin Ambrus 9b0d7995e3 refactor: index for ww_attacks 2017-11-08 15:46:24 +01:00
Martin Ambrus 43029480ae fix: nothing from var folder should be publicly readable 2017-11-03 16:52:03 +01:00
Martin Ambrus 90f8982245 fix: hero dying and revival doesn't work correctly with multiple heroes 2017-11-02 23:59:03 +01:00
Martin Ambrus cdfb3ece4a fix: typo in unique index
Fixes #263
2017-11-02 13:24:43 +01:00
Martin Ambrus 7c67e1e7b9 fix: only 1 hero can exist and is deleted upon new hero training start
Closes #261
2017-11-02 11:05:26 +01:00
Martin Ambrus c9038e20b8 refactor: alliance and Embassy mechanics refactoring, stage 2 of 3
Everything is now prepared for the last stage, where the code to handle
Embassy destruction during a battle will be added and tested :)

A few Embassy-demolition-related issues have been ironed-out in this
commit as well.
2017-11-01 00:16:52 +01:00
Martin Ambrus f5c3e029b5 feat: access log config setting and a real get-post-cookie logger
This is a very naive and primitive logger of user requests to the game.
To be used on systems where access to webserver's log data is not
available (especially if the webserver doesn't store POST data as well).
2017-10-28 18:59:16 +02:00
Martin Ambrus 1525771ee9 fix: correction in generation of units in oasis 2017-10-28 15:15:30 +02:00
Martin Ambrus 6226412825 fix: coordinates were still generated in wrong descension 2017-10-28 11:08:35 +02:00
Martin Ambrus 2cfb84ebe2 fix: world data generation now returns the correct number of records 2017-10-28 10:30:53 +02:00
Martin Ambrus 7689e73280 refactor: new market DB index 2017-10-27 23:05:29 +02:00
Martin Ambrus 1cc610802b fix: data generation starts and continues in a different way
It goes from -100, 100 through -99, 100 all the way up to 100, -100.
Anything else breaks the map coordinates.
2017-10-27 22:44:32 +02:00
Martin Ambrus 5a967055f4 refactor: using indexed temporary table as array works speed wonders :) 2017-10-27 21:04:16 +02:00
Martin Ambrus 0d84b5f3b4 fix: MySQL variables can't be used inside IN statements as such
So, if we want to do something like "WHERE abc IN ( @ids )", where @ids
would contain a string of "1,2,3", we can't and would need to use
FIND_IN_SET() function instead.
2017-10-27 19:36:27 +02:00
Martin Ambrus 1066fff9a2 refactor: installation happens at MySQL side
A lot has happened here. Here's the list:

1. autoloader was added that should prevent various "failed to open
stream" errors when trying to load new classes

2. PHP-based data generation was replaced by MySQL-based one, hopefully
fixing the installation problems when insert payload it too high and the
DB wouldn't populate with some users

3. thanks to step 2, the installation should be really almost
instantenious, instead of waiting a long time for many SQL connections
and queries to populate the world

4. World Data & Oasis generation and population is done in 1 step now
2017-10-27 18:27:03 +02:00