Commit Graph

12 Commits

Author SHA1 Message Date
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 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