Commit Graph

153 Commits

Author SHA1 Message Date
iopietro b58b762b12 General Fixes
+Completely reworked the "removeBuilding" function, it's now more
generic (for future uses)
+Fixed a bug that bugged the master builder time when a building was
removed from the construction queue
+Fixed a bug that bugged building times when a building was removed from
the queue, with a master builder order queued
+Fixed a bug that didn't permit to save the server settings from the
+MH/Admin panel
+Fixed a bug that did save the WW spawn time in the WW building plan
spawn time and vice versa
+General improovements and bug fixing
2018-05-14 23:14:10 +02:00
iopietro 2534fdf2a3 General fixes
-Removed the possibility to manual add Natars, WW Villages and WW
building plans
+The crop consumption in WW villages is now halved
2018-05-11 01:46:17 +02:00
iopietro 90221cf19f Natars automation system
+Natars will now spawn automatically, you can set how many day should
pass before the spawn of Natars (and artifacts), WW Villages and WW
building plans (Note: WW villages and WW building plans won't spawn
until the creation of the natar account)
+Added 3 timers under the left menu which indicate the spawn of
Natars/Artifacts, WW villages and WW building plans
+Added an option in the installation, to set the resource production of
oasis
+Fixed a bug that didn't permit to add multiple Units, Abtech and tech
rows with one query
+Added a new information to the Artifact of the fool, the next effect
reroll will now be displayed in his informations (in the treasury)
+Fixed a bug that dind't permit the correct timers flow in Dorf3.php
(Warehouse tab), they'll now flow correctly
+Timers and resources percentage of villages with a negative production
of crop will now be marked in red (in the Warehouse tab, Dorf3.php) and
will now be displayed in how much time the granary will be emptied
+Fixed a possible bug that prevented to add raids to farm lists
+Fixed a bug that didn't permit to create WW Villages from the
Multihunter control panel
+Reworked all timers, there will be only one timer field now (in
Session.php)
+Minor bug fixing and optimization

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

// ***** Natars Spawn Time
define("NATARS_SPAWN_TIME",260);
define("NATARS_WW_SPAWN_TIME",260);
define("NATARS_WW_BUILDING_PLAN_SPAWN_TIME",260);

// ***** Oasis production
define("OASIS_WOOD_MULTIPLIER",40);
define("OASIS_CLAY_MULTIPLIER",40);
define("OASIS_IRON_MULTIPLIER",40);
define("OASIS_CROP_MULTIPLIER",40);
define("OASIS_WOOD_PRODUCTION",OASIS_WOOD_MULTIPLIER*SPEED);
define("OASIS_CLAY_PRODUCTION",OASIS_CLAY_MULTIPLIER*SPEED);
define("OASIS_IRON_PRODUCTION",OASIS_IRON_MULTIPLIER*SPEED);
define("OASIS_CROP_PRODUCTION",OASIS_CROP_MULTIPLIER*SPEED);

P.S: from the next version, the possibility to add manual WWs, WW
building plans and to create the natar account will be REMOVED.
2018-05-10 17:45:27 +02:00
iopietro f7e05c9802 Optimizations
-Removed the "sort_type" 6 from the movement table, looted resources
will now be saved in the "sort_type" 4 returing attack.
This reduces a lot the spam in the tables "send" and "movement" of the
database
-Removed some useless methods in Database.php and Message.php
+Optimized report loading, own report will be loaded only once (and not
twice at random) and allied reports aren't loaded anymore
+Minor improovements and better indentation
2018-05-05 17:54:34 +02:00
iopietro cf74514451 General fixes
+Fixed an exploit that permitted to starts other players' farm lists
+Fixed an exploit that permitted to save our raids to other players'
farm lists
+Fixed an exploit that permitted to edit other players' farm lists
+Fixed a rounding upkeep bug
+Moved the whole startRaid.tpl to a new method in Units.php
+A lot of clean-up
+Improoved indentation
+In the raid list, the "carry" image will now show to the left of an
attack
+Fixed a bug that displayed the wrong loot to returning troops released
by traps
+General minor bug fixing and improovements
-Deleted a lot of redundant code
2018-05-04 22:12:18 +02:00
iopietro 56e280f436 Artifacts fixes part 4
Completely fixed the artifact of the fool and fixed all kind of
artifact:

+Deleted some useless .tpl files and merged into one (Stable)
+The artifact of the fool effect won't be displayed if not active
+Fixed a bug that permitted to have a great and a unique artefacts
active at the same moment
+Big reductions of code in a lot of files
+Created some new methods to support artifacts
+Fixed a bug that prevented the effect of the "Rivals confusion" to work
correctly
+Fixed a bug that prevented "The eagles eyes" artifact to work correctly
for the attacker
+Fixed the artifact of the fool of every kind, now it's calculated with
a new method
+Fixed the cranny capacity when a "Rivals confusion" artifact is active
+Some minor bug fixing , improovements and optimization
2018-04-26 20:37:47 +02:00
iopietro 0011d2abcb Artifacts fixes part 2
+Artifacts are now activated after a certain amount of time (based on
the official Travian Rules and the server speed) and not immediately
after the conquer
+Artifacts are now activated based on official Travian Rules, you can
only have 1 unique/account active artifacts

Changes in 27_show.tpl:
+Added the text "Can't be activated" to not-activable artifacts

Changes in Automation.php:
+Added a new method which activate activable artifacts

Changes in Database.php:
+Added some methods to support the new artifacts activation system
2018-04-25 15:13:24 +02:00
Martin Ambrus 879e4952ce fix: fail to delete heroes from a village that's being removed via Admin 2017-12-26 20:27:30 +01: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 0d65029db4 fix: adding new village via Admin generates incorrect fields 2017-12-01 19:26:30 +01:00
Martin Ambrus c0c11050d9 fix: WW villages created via Admin do not have any units
#392
2017-12-01 10:50:35 +01:00
Martin Ambrus 5354e185fa fix: natar WW villages created without units
#392
2017-12-01 10:43:23 +01:00
Martin Ambrus 571fb9019f fix: hero can be killed even if unit not present anywhere on the map
#371
2017-11-25 01:21:28 +01:00
Martin Ambrus 0134b0abe9 fix: old version cannot save config data anymore 2017-11-22 12:21:16 +01:00
Martin Ambrus 30fc76e85b fix: old version cannot save config data anymore 2017-11-22 12:20:05 +01:00
Martin Ambrus 645793dde2 refactor: s1_vdata queries cached and reused
#313
2017-11-20 10:10:29 +01:00
Martin Ambrus 0984c7ef34 fix: DB connection is global and tries 2 tested ways to connect
Some installations seem to support localhost:port for 1st parameter of
mysqli_connect(), others will only support the official parameters with
port towards the end. This fix tries them both - first the official one,
then the localhost:port one.

Also, there were a lot of mysqli_connect()'s inside Admin mods. These
now also use the central Database class.
2017-11-20 01:09:49 +01:00
Martin Ambrus 67d9a42506 refactor: a lot of Automation foreach loops updated
#313
2017-11-19 14:01:30 +01:00
Martin Ambrus bfc7a2b28a fix: keeping compatibility with older versions
#353
2017-11-17 23:18:40 +01:00
Martin Ambrus ffeeac3173 fix: database connection does not include port from config
#353
2017-11-17 22:48:43 +01:00
Martin Ambrus 312507fe9f feat: MySQL port into installation options
Closes #279
2017-11-07 12:30:32 +01:00
Martin Ambrus 8f009afc9d chore: this file is duplicated & needs to be copied over during install
Instead of having 2 same files on 2 different locations, copy&paste this
template when installing the game.
2017-11-07 11:41:18 +01:00
Martin Ambrus 8a7f12268c fix: logging works, tech log link added to Admin 2017-11-07 10:34:50 +01:00
Martin Ambrus 2bae5f21c6 fix: stating real punishment in log 2017-11-07 10:05:55 +01:00
fixMartin Ambrus 0ddb0e691b fix: new village added via Admin to bear player's username 2017-11-07 10:01:28 +01:00
Martin Ambrus 7f16182e76 fix: oasis can be deleted (un-conquered) via Admin
Closes #283
2017-11-06 21:15:23 +01:00
Martin Ambrus 4e91b02f07 fix: removing single medal from player
Relates to #283
2017-11-06 21:05:28 +01:00
Martin Ambrus 7bc1cb751c fix: All Artefact have the same image
Closes #255
2017-11-06 16:14:50 +01:00
Martin Ambrus 1767b591d4 refactor: online users in Admin sorted by 1) access, 2) username 2017-11-04 22:04:21 +01:00
Martin Ambrus 77fd3a7e5f refactor: online users in Admin sorted by 1) access, 2) lastupdate 2017-11-04 22:03:33 +01:00
Martin Ambrus a822504706 fix: counting queries optimization
Closes #300
2017-11-04 15:41:35 +01:00
Martin Ambrus b01d787627 fix: extra space making location header not work 2017-11-03 20:58:33 +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 c545304e69 fix: correct rules link
Closes #256
2017-11-02 13:40:40 +01:00
Martin Ambrus 945bb2f8c7 fix: too much gold for instant build & research
Fixes #257
2017-11-02 13:11:19 +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 4621c29e05 fix: admin session username stored in session 2017-10-28 09:40:23 +02:00
Martin Ambrus 6f7c70a0d7 refactor: autoprefixing class includes 2017-10-28 02:17:43 +02:00
Martin Ambrus 5bae1cfd54 fix: admin DB prefixes to try and find the unfindable database 2017-10-28 00:49:00 +02:00
Martin Ambrus 7def98f081 feat: Farms generation via Admin must be fair (= random all over map) 2017-10-25 18:42:13 +02:00
Martin Ambrus 30d3b9c4fa refactor: OOP code movements started :) 2017-10-25 13:38:38 +02:00
Martin Ambrus aab1010906 fix: super-strange id + 0 query that totally prevents the use of indexes 2017-10-24 09:55:18 +02:00
Martin Ambrus 53f54ce9e9 feat: Admins can be attacked, raided and traded with via config option 2017-10-22 20:28:03 +02:00
Martin Ambrus d9dc875772 fix: hero removal fixed in Admin 2017-10-22 17:41:19 +02:00
Martin Ambrus 965ba37f67 feat: Admins can see Support messages if set in config 2017-10-22 14:47:27 +02:00
Martin Ambrus e4d470693b fix: correction for message when resetting PLUS bonus in Admin 2017-10-22 13:58:18 +02:00
Martin Ambrus d5e5b40a6f fix: user field gets Multihunter only when really no ID or name given 2017-10-22 12:21:32 +02:00
Martin Ambrus 680cb209f4 fix: Enter when editing additional user info in Admin saves data 2017-10-22 00:06:07 +02:00
Martin Ambrus 77a1d9879d fix: Great Workshop shown as error in Admin (editing Village) 2017-10-21 22:38:01 +02:00
Martin Ambrus 78694da32b fix: player deleting & password checks work as intended 2017-10-21 11:30:38 +02:00