Commit Graph

2692 Commits

Author SHA1 Message Date
iopietro f41666cabc New automation
+Separated Automation.php from the UI and users classes

NOTE: This is only a test, it'll not absolutely be as it is in this commit in the final version.
2018-05-22 23:37:28 +02:00
iopietro edeee02333 Some clean-up 2018-05-22 22:43:01 +02:00
iopietro a4a623bbfa General fixes
+Fixed a bug that calculated a wrong returning time if the attacker had
the tournament square in the village
2018-05-22 19:58:53 +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 12ba3ec154 General fixes
+Fixed a bug that didn't permit to edit your posts in a thread
2018-05-22 18:24:06 +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 e1b0dcf46e Updated game version 8.3.4 2018-05-21 17:51:46 +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 0d8ea38f30 Fixed #540 2018-05-21 17:04:21 +02:00
iopietro e8692733b9 General fixes
+Public forums won't be deleted anymore, if the server is resetted
through the admin panel
2018-05-21 16:51:23 +02:00
iopietro 628894f478 General fixes
+WWs aren't affected anymore by stronger building artifacts
+Walls damaging/destruction (wall bonus reduction) during a battle, is
now counted
+Added a button for normal acess users, for editing/sticking, etc. their
own topics (instead of directly display the topic "admin menu")
+Fixed some possible warnings
2018-05-21 16:45:54 +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 807b684e29 General alliances fixes
+Fixed some conditions for MHs
2018-05-20 17:08:42 +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 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 cbcc9b5262 Change other date formats to one view 2018-05-20 02:33:25 +03:00
iopietro 68f9282dc7 Changed all dates format 2018-05-20 00:30:37 +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
iopietro 37e70a165b Merge branch 'master' of https://github.com/Shadowss/TravianZ.git 2018-05-19 00:02:39 +02:00
iopietro 5ecf035cb3 Alliance fixes part 2
+Public forums are now displayed for every player on the server
+Fixed some security bugs that permitted to create thread and posts to
private forums
+Fixed some general bugs
2018-05-19 00:01:50 +02:00
Vladyslav 25b52f6b1a Changed information output in Newsbox 2
issue #541
2018-05-18 20:20:53 +03:00
iopietro b91e27381b General fixes
+Fixed a bug that didn't permit to display the bonus of some buildings
at level 0
+The cavalry training percentage bonus, provided by the horsedrinking
trough, is now displayed correctly
2018-05-18 17:23:54 +02:00
iopietro 0322a0ae49 General fixes
+Fixed a bug that permitted to see troops movement with a 0 level rally
point
+Fixed a bug that permitted to send attacks, enforcements, etc. with a 0
level rally point
+Fixed a bug that counted the moral bonus for attacks against WW
villages
+Fixed a bug that didn't permit to finish all buildings/researches, etc.
without a plus account
+Recoded part of Natars timer for being more generic
+Natars/Artifacts spawn, WW villages spawn, WW building plans spawn are
now based on the start date of the server and not on the installation
date
+Better indentation of some code
2018-05-18 15:46:15 +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 6909ba4e58 Fixed a medals bug
+First medals will now be given on the next Sunday (at 12 PM) from the
start of the server
2018-05-16 18:44:06 +02:00
iopietro f156c6bc80 Farm list fixes
+Fixed a bug that permitted to attack the same village where the
farmlist was created
2018-05-16 17:36:29 +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 656bd4f970 Fixed a spy bug
+Fixed a bug that didn't permit to detect upgraded (in the blachsmith)
spies
+Changed a debug function, from public to public static
2018-05-15 20:55:43 +02:00
iopietro 95cc6180a9 Fixed a catapult bug
+Fixed a bug that didn't recount building time for in waiting loop
buildings
+Fixed a bug that didn't remove a building from the waiting loop, if the
previous was destroyed by catapults
2018-05-15 20:20:38 +02:00
iopietro 5ef8a1d8d9 Merge branch 'master' of https://github.com/Shadowss/TravianZ.git 2018-05-14 23:14:19 +02:00
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
Vladyslav fde8bb1371 Update information output in Newsbox 2
issue #541
2018-05-14 22:15:33 +03:00
iopietro f92e4d3bb8 General fixes
+Increased the number of "Slight artifact of the fool" from 5 to 10
2018-05-13 22:55:38 +02:00
iopietro 26431b6cea General fixes
+Fixed a bug that didn't halved the catapults force when two buildings
were selected
2018-05-13 16:10:49 +02:00
iopietro bdd896573c General fixes
+Added WW building plans to the "Small artifacts" section of the
treasury
+Fixed a bug that permitted to maintain a building in queue when
destroyed by catapults
+Fixed a bug that didn't count the catapult destruction of a building in
building queue
2018-05-13 15:50:45 +02:00
iopietro 43cbd60f78 General fixes
+Added an image in: Natars/Artifacts spawn message, WW villages spawn
message and WW building plans spawn message
+Fixed a wrong time calculation when removing a building from the
construction queue, if there was present a master builder order
2018-05-13 00:21:07 +02:00
Shadow 04b40f07ab Fix blank page
Photo must be inserted
2018-05-11 11:46:03 +03:00
Shadow 77f919e718 FIX 2 2018-05-11 11:31:35 +03:00
Shadow ceef9e88ab FIX 2018-05-11 11:31:06 +03:00
Shadow db7ce71dfd WW village message 2018-05-11 11:26:50 +03:00
Shadow 8d7da83a6f Update message for WW Village Release
@iopietro must implement that text in separate messages.
2018-05-11 11:19:44 +03:00
Shadow 1a3bdafa3b Artifact update text
(Please verify the IMG code)
2018-05-11 11:05:15 +03: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 950fc61f8a General fixes
+A method in Building.php is now static
+Fixed timers in the market
+Fixed a bug that did take in account a wrong tournament square when
calculating the returning time of the troops
2018-05-10 20:50:29 +02:00
iopietro de74f4a0cb Hotfixes
+Fixed a bug that didn't permit to send the welcome message (I hate
global variables...)
2018-05-10 17:52:22 +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 ec63b04587 General fixes
+Fixed an exploit that permit to maintain the crop level constant if the
page was refreshed every second, with a negative production
2018-05-06 15:20:58 +02:00
iopietro bd033334c4 General fixes
+Fixed a little mistake in the starvation it works properly now
+A reinforced hero is now reassigned if his main village is conquered
+Population will now recount after a conquering
2018-05-06 15:02:38 +02:00