Martin Ambrus
d17d1f9b32
refactor: last round of database values caching
...
#313
2017-11-17 19:40:34 +01:00
Martin Ambrus
1318f34cba
refactor: Units class-related caching done
...
#313
2017-11-17 15:34:08 +01:00
Martin Ambrus
079c830b94
refactor: Technology class-related caching done
...
#313
2017-11-17 14:36:49 +01:00
Martin Ambrus
51f354542d
fix: village resources display outdated information on page load
2017-11-17 12:36:27 +01:00
Martin Ambrus
d0a882f136
fix: maxcrop & maxstore cannot be 0, nor it should be < lowest threshold
2017-11-16 21:49:22 +01:00
Martin Ambrus
d3ec209ad8
refactor: village-related methods now all optimized
2017-11-15 23:33:07 +01:00
Martin Ambrus
612661c9f0
refactor: units DB values caching
2017-11-15 23:20:14 +01:00
Martin Ambrus
a8b8664e07
fix: Automation::updateStore() shouldn't be called twice
2017-11-15 22:00:18 +01:00
Martin Ambrus
dab768f662
refactor: 1st round of database values caching
2017-11-15 16:01:00 +01:00
Martin Ambrus
e798635ebb
fix: setVillageLevel() tried to execute wrong SQL
...
+ some more methods for later refactor commit
2017-11-13 17:01:36 +01:00
Martin Ambrus
3d44226c92
refactor: more caching where possible
...
This also fixes "Multihunter" being stated as the one attacking
reinforcements in villages during battle (now stores real attacker ID).
2017-11-12 10:36:53 +01:00
Martin Ambrus
603d28f31a
fix: MySQL 5.7 compatibility + undefined variables
2017-11-10 14:07:32 +01:00
Martin Ambrus
dc22a45c8a
fix: time not selected in general stats, making casualties 0 per day
2017-11-09 23:54:55 +01:00
Martin Ambrus
29d638b7f7
refactor: 4th round of sendunitsComplete() optimizations + market fix
...
Sending units more than 1x (with PLUS) didn't work after the first
market refactor.
2017-11-09 21:38:30 +01:00
Martin Ambrus
2ba0500433
fix: this cannot be in production
2017-11-09 14:24:01 +01:00
Martin Ambrus
371c717702
refactor: 3rd round of sendunitsComplete() optimizations
2017-11-09 14:22:15 +01:00
Martin Ambrus
b1b1581f4c
refactor: 2nd round of sendunitsComplete() optimizations
2017-11-09 00:43:10 +01:00
Martin Ambrus
0a541d5bd3
fix: reverting possibility of settlers & chieftain creation side-by-side
...
Turns out we could conquer a village and then settle a new one without
having enough expansion slots. Thus this is a revert to original state,
where we can't train settlers with chieftain in village or chieftain
with settlers in village, if we don't have enough slots.
Closes #324
2017-11-09 00:08:40 +01:00
Martin Ambrus
50f0cae495
refactor: 1st round of sendunitsComplete() optimizations
2017-11-08 23:43:28 +01:00
Martin Ambrus
151553735d
refactor: setMovementProc() to take one or multiple IDs for update
2017-11-08 18:21:30 +01:00
Martin Ambrus
21d6874325
refactor: marketComplete() to use less queries and caching
2017-11-08 18:12:54 +01:00
Martin Ambrus
159de207c9
refactor: get and set multiple fields at once
2017-11-08 17:46:18 +01:00
Martin Ambrus
c638c67624
refactor: preparation to take batches of data in prepared statements
2017-11-08 13:49:58 +01:00
Martin Ambrus
59c7fdd3c0
refactor: Nature no longer sends automated notification, Taskmaster does
2017-11-08 11:02:15 +01:00
Martin Ambrus
312507fe9f
feat: MySQL port into installation options
...
Closes #279
2017-11-07 12:30:32 +01:00
Martin Ambrus
9db31ff311
fix: wrong forum link field
2017-11-05 16:03:51 +01:00
Martin Ambrus
ee017adb40
refactor: most of broad SELECTs updated
...
Closes #301
2017-11-05 14:35:19 +01:00
Martin Ambrus
f485f69e0a
fix: clear all remaining village troops when conquering a village
...
Closes #269
2017-11-05 00:08:22 +01:00
Martin Ambrus
a822504706
fix: counting queries optimization
...
Closes #300
2017-11-04 15:41:35 +01:00
Martin Ambrus
36bfb2b8f7
fix: alliance deletion check
2017-11-04 10:32:30 +01:00
Martin Ambrus
3f612d6e36
fix: alliance cannot be created
...
This only happens on newer MySQL versions where column type vs inserted
type are being checked (so we cannot insert empty string into an int
column, even if that column has a default value).
Fixes #249
2017-11-04 09:26:45 +01:00
Martin Ambrus
fea7b0937f
fix: could not train more settlers if we have 1 settler already trained
2017-11-03 22:04:15 +01:00
Martin Ambrus
23eed5da53
fix: unable to train settlers if chieftan is present
...
It is debatable whether or not to allow this, since chieftan would be of
no use once we have 3 settlers and settle a new village. However, if we
accidentally created a chieftan, we can't train settlers until we send
the chieftan to his death.
I think this move could be a predule to a later game mechanics, where
chieftan could fight (talk, actually) against chieftan, if one is
present in village, so taking a village over isn't so easy.
2017-11-03 17:23:29 +01:00
Martin Ambrus
bfaf97f998
fix: AND instead of second WHERE
2017-11-03 00:01:20 +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
585edfc356
fix: this error report should not be here
2017-11-02 13:27:38 +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
3432aa92e6
fix: forgotten eviction of the old alliance leader without an Embassy
2017-11-01 23:21:01 +01:00
Martin Ambrus
8a3591a8b0
refactor: alliance and Embassy mechanics refactoring, stage 3 of 3
...
Battle results logic now accounts for Embassy destruction as per new
alliance and Embassies game mechanics.
2017-11-01 21:37:09 +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
65485714c3
fix: replacement for mysqli_stmt_get_result() for non-mysqlnd servers
...
Closes #258
2017-10-30 10:08:23 +01:00
Martin Ambrus
5d91de0e14
feat: new Embassy logic for demolitions and alliance quitting
2017-10-29 23:06:25 +01:00
Martin Ambrus
69da66c410
feat: forum notification message has a user link for one who was posting
2017-10-29 13:14:33 +01:00
Martin Ambrus
eca2c9105c
fix: undefined indexes and variables
2017-10-28 02:18:00 +02:00
Martin Ambrus
a9bf045a82
fix: no default means no-future-proof
2017-10-28 01:18:47 +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
3200cf2c3c
fix: multi_query doesn't block next queries anymore
2017-10-27 19:34:19 +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
Martin Ambrus
91736e6209
fix: dang, type hinting is only for PHP7... bleee :P
2017-10-26 11:43:08 +02:00