Commit Graph

194 Commits

Author SHA1 Message Date
Martin Ambrus dc501d6984 fix: don't delete if we don't have any IDs
#313
2017-11-19 19:25:14 +01:00
Martin Ambrus 609a61fc3e fix: don't delete if we don't have any IDs
#313
2017-11-19 19:24:10 +01:00
Martin Ambrus 0df4de9413 fix: transaction did not speed things up + hero fields resetting fixed
#313
2017-11-19 19:08:47 +01:00
Martin Ambrus 97dba8b0f0 refactor: enclosing many updates into transaction for speed improvement
#313
2017-11-19 18:58:31 +01:00
Martin Ambrus 5d951f8e9e refactor: getVSumField() to cache data for multiple user IDs
#313
2017-11-19 18:55:47 +01:00
Martin Ambrus 24789507a7 refactor: getProfileVillages() takes multiple IDs
#313
2017-11-19 15:57:52 +01:00
Martin Ambrus 699781d130 refactor: for loops optimized
#313
2017-11-19 15:17:24 +01:00
Martin Ambrus 67d9a42506 refactor: a lot of Automation foreach loops updated
#313
2017-11-19 14:01:30 +01:00
Martin Ambrus 778f42b4f1 refactor: cycle optimizations and cache fixes
This one specifically fixes rescured prisoners not being sent back.
Other than this fix, there are some query optimizations included.

#313
2017-11-19 01:37:31 +01:00
Martin Ambrus 4d41769a76 refactor: final round of sendunitsComplete() optimizations
#313
2017-11-18 22:11:24 +01:00
Martin Ambrus 4172e30dd2 fix: Gaul traps do not work 2017-11-18 21:58:54 +01:00
Martin Ambrus d768929d18 fix: catapults do not work correctly or sometimes not at all 2017-11-18 20:42:26 +01:00
Martin Ambrus fffedc4170 fix: defender troops do not die during attack 2017-11-18 13:11:00 +01:00
Martin Ambrus dd030859cf fix: troops did not return to the village when evasion was set 2017-11-18 11:10:58 +01:00
Martin Ambrus 2041ad750e fix: hero movements got screwed up while doing DB caching stuff...
#313
2017-11-17 23:46:01 +01:00
Martin Ambrus db87ce88a7 refactor: getUnit() can take multiple IDs at once
#313
2017-11-17 20:23:01 +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 6ccc72350d fix: recountPop() already calls procClimbers() internally 2017-11-15 22:23:57 +01:00
Martin Ambrus c7acc523ea fix: prune methods to include storage multiplier
Also, the updateStore() method does not need to concern itself with
villages without warehouses and granaries, as they have already been
tended by prune methods beforehead.
2017-11-15 22:17:11 +01:00
Martin Ambrus 38c4172a43 fix: class must start with a constructor, we shouldn't be looking for it 2017-11-15 22:05:52 +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 785a371871 fix: alleviating the bad math, which is impossible to quick-fix for me 2017-11-13 19:04:24 +01:00
Martin Ambrus bdfe99b7f6 fix: alleviating the bad math, which is impossible to quick-fix for me 2017-11-13 19:03:59 +01:00
Martin Ambrus c6d9d264ce fix: this can sometimes go above current building level 2017-11-13 17:19:18 +01:00
Martin Ambrus 35512d16f0 refactor: 5th round of sendunitsComplete() optimizations 2017-11-13 17:02:58 +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 c07dd99627 fix: this should work but doesn't, so I'm reverting it back 2017-11-10 13:27:54 +01:00
Martin Ambrus b6652cbb32 fix: ban cleanup removes bans on users who are banned forever
#325
2017-11-09 23:41:51 +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 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 50f0cae495 refactor: 1st round of sendunitsComplete() optimizations 2017-11-08 23:43:28 +01:00
Martin Ambrus 0c44b93bc0 fix: this got commented-out by a debug mistake :-O :-/ :-( 2017-11-08 19:21:00 +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
Roy Shum aa570c1bcb fix resource limit (#322) 2017-11-08 17:29:23 +01:00
Martin Ambrus b85abeaf78 refactor: optimization of buildComplete() code 2017-11-08 16:57:58 +01:00
Martin Ambrus 5db951c135 refactor: optimization to update of oasis and village resources 2017-11-08 15:46:08 +01:00
Martin Ambrus 6fa9058c43 fix: attack duplication
Closes #259
2017-11-08 10:34:30 +01:00
Martin Ambrus 8e0b81d8dc fix: hero duplication on reinforcements with MySQL 5.7+ 2017-11-08 09:32:42 +01:00
Roy Shum 5b7bc2a5c3 improve performance on updatestore 2017-11-08 14:50:49 +08:00
Martin Ambrus 5f5dfb978e fix: here movement between villages requires hero to travel alone
Closes #272
2017-11-06 18:16:54 +01:00
Martin Ambrus 9514976c15 fix: attacks on oasis result in assigning them to Multihunter 2017-11-06 15:11:57 +01:00
Martin Ambrus 1301e1eb4a fix: use strings instead of undefined constants 2017-11-06 14:17:52 +01:00
Martin Ambrus 5a929457c0 fix: unable to determine attack type 2017-11-06 14:01:24 +01:00
Martin Ambrus ee285a4ed8 fix: units not returning from attack and staying as reinforcements 2017-11-05 09:17:43 +01:00
Martin Ambrus 57057384d3 refactor: SELECT * replaced by SELECT fieldname1, fieldname2 ...
So far in a few places.
2017-11-05 09:03:59 +01:00