Commit Graph
51 Commits
Author SHA1 Message Date
P0nk 045bcf6dc5 Set up Slf4j and Log4j2 for logging
All logs are kept in the "logs" directory as before.
The most recent logs (up to 20MB) are kept in cosmic-log.log in the root of "logs".
Previous logs (either from previous server starts or logfiles that exceeded max size of 20MB) are stored away in directories according to their creation date.
2021-04-07 18:40:46 +02:00
RubenD96 e8d2256683 Fix exploit for negative itemId's in PetExcludeItemsHandler 2021-04-07 17:26:55 +02:00
RubenD96 28707fa0f3 Fix exploit for invalid skill macro name length 2021-04-07 17:26:49 +02:00
P0nk 2f34b3ed8b Fix ranking update query using a keyword for field name
"Rank" is a reserved keyword in MySQL 8.
This caused an SQLSyntaxErrorException during the task run.
2021-04-06 21:12:23 +02:00
P0nk 02256e04ed Fix SQL type conversion error during ranking move update
Caused by prior upgrade to MySQL 8 which seems more strict when it comes to type conversions.
2021-04-06 21:11:56 +02:00
P0nk b80d98f36e Add descriptions to all gm 6 commands 2021-04-06 20:08:57 +02:00
P0nk 3b59f95f20 Add descriptions to all gm 5 commands 2021-04-06 20:05:21 +02:00
P0nk f25539f389 Add descriptions to all gm 4 commands 2021-04-06 20:04:20 +02:00
P0nk f9fcc79565 Add descriptions to all gm 3 commands 2021-04-06 20:00:43 +02:00
P0nk a9b23552b0 Add descriptions to all gm 2 commands 2021-04-06 19:51:20 +02:00
P0nk 3cd23a07e2 Add descriptions to all gm 1 commands 2021-04-06 19:42:38 +02:00
P0nk 70d895fef5 Add descriptions to all gm 0 commands 2021-04-06 19:42:38 +02:00
P0nk 69635f5e6c refactor: use try-with-resources for db operations in various places 2021-04-05 00:19:59 +02:00
P0nk 4ec4600406 refactor: use try-with-resources for Fredrick db operations 2021-04-05 00:13:32 +02:00
P0nk e13c313839 refactor: use try-with-resources for db operations in various handlers 2021-04-05 00:11:42 +02:00
P0nk 429f82e4fe refactor: use try-with-resources for nx coupon db operations 2021-04-05 00:09:51 +02:00
P0nk 0334391e33 refactor: use try-with-resources for fm shop db operations 2021-04-05 00:07:40 +02:00
P0nk 80e193398c refactor: use try-with-resources for ban db operations 2021-04-04 23:59:24 +02:00
P0nk 8b686b60f1 refactor: use try-with-resources for ranking db operations 2021-04-04 23:56:46 +02:00
P0nk f1ff0cb55f refactor: use try-with-resources for wedding ring db operations 2021-04-04 23:48:56 +02:00
P0nk cb518863b0 refactor: use try-with-resources for various world wide db operations 2021-04-04 23:45:40 +02:00
P0nk 6b6558af01 refactor: use try-with-resources for perma npc/mob db operations 2021-04-04 23:34:35 +02:00
P0nk 59014b86bf refactor: use try-with-resources for monster book db operations 2021-04-04 23:26:15 +02:00
P0nk 9d70f4de04 refactor: use try-with-resources for ring db operations 2021-04-04 23:15:52 +02:00
P0nk 8ceba9fbee refactor: use try-with-resources for PlayerNPC db operations 2021-04-04 23:12:39 +02:00
P0nk 5cb69910bd refactor: use try-with-resources for pet db operations 2021-04-04 22:54:25 +02:00
P0nk 0b91b02f80 refactor: use try-with-resources for monster information db operations 2021-04-04 22:50:09 +02:00
P0nk 50b76bf2ec refactor: use try-with-resources for item information db operations 2021-04-04 22:43:06 +02:00
P0nk de14c5782d refactor: use try-with-resources for item saving & loading db operations 2021-04-04 22:28:52 +02:00
P0nk fc34d54cdd refactor: use try-with-resources for buddy list db operations 2021-04-04 21:48:52 +02:00
P0nk 8c41f713a6 refactor: use try-with-resources for character saving db operations 2021-04-04 21:29:18 +02:00
P0nk 2b0d918401 refactor: use try-with-resources for new character db operations 2021-04-04 21:29:18 +02:00
P0nk b56e1d501f refactor: use try-with-resources for character db operations
Covers everything in MapleCharacter except saving a character, and inserting a new character.
This commit got a bit too big...
2021-04-04 21:29:17 +02:00
P0nk 7e206d4589 refactor: use try-with-resources for client db operations 2021-04-04 16:49:01 +02:00
P0nk 0c267f8eee refactor: use try-with-resources for Duey db operations 2021-04-04 16:12:46 +02:00
P0nk 817a518e82 refactor: use try-with-resources for guild db operations 2021-04-04 15:50:53 +02:00
P0nk e322b05707 refactor: use try-with-resources for various server db operations 2021-04-04 15:35:17 +02:00
P0nk 3ca9311cb0 refactor: use try-with-resources for cash id db operations 2021-04-04 15:21:17 +02:00
P0nk 5899cce9d8 refactor: use try-with-resources for alliance db operations 2021-04-04 15:19:32 +02:00
P0nk b350fedc66 refactor: use try-with-resources for login db operations 2021-04-04 14:59:19 +02:00
P0nk 8ddfe05dd6 refactor: use try-with-resources for cash shop db operations 2021-04-04 14:54:54 +02:00
P0nk 6639188c5a refactor: use try-with-resources for BBS db operations 2021-04-04 14:40:15 +02:00
P0nk a36c7c5057 Fix loading pet ignores slowly
Explained by me on Discord, 20 February 2020:

"Found a bug that causes characters to load slower based on the number of items in their inventory.
Every item causes a query to be executed in the db. On my local machine,
the specific section of code is now ~40ms faster when loading 1 character full of items.

Here is what I'm referring to:
"AND petid IS NOT NULL"
should be
"AND petid > 0" or something similar

Basically, the petid field is not a boolean. The check will always pass since -1 is not null,
and the number -1 is used to indicate if the item is a pet or not."
2021-04-03 15:52:07 +02:00
P0nk 90687007f5 Rework Docker support
- Use multi-stage build for the application image
- Utilize connection pool init timeout for waiting on database container startup,
"docker-compose-wait" dependency is no longer required
- Override database host through environment variable - used in docker-compose
- Rename database scripts for explicit ordering (db container loads them alphabetically)
2021-04-03 14:59:37 +02:00
P0nk 8b7e989fed Use native way for connection pool init timeout 2021-04-02 20:16:57 +02:00
P0nk 08a0407417 Explicitly set scrolling mode where ResultSet is used for scrolling 2021-04-02 16:41:44 +02:00
P0nk 754ab67de7 Change default birthday and tempban to fix conversion issue
ResultSet#getLong on a timestamp field is not allowed
2021-04-02 16:12:57 +02:00
P0nk 7169a74e94 Make connection pool init timeout configurable 2021-04-02 15:14:55 +02:00
P0nk 45331d17b0 Set up connection pool and enforce usage of it
Attempt to initialize connection pool on startup until a timeout.
2021-04-02 14:20:45 +02:00
P0nk 05bd668cc2 Upgrade to MySQL 8
Workaround for exception thrown by ResultSet#beforeFirst():
"Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY"
2021-04-02 14:09:49 +02:00