Commit Graph

69 Commits

Author SHA1 Message Date
P0nk
fe9dd75a23 Instantiate shops in ShopFactory 2023-03-29 21:59:00 +02:00
P0nk
c71ca7f4d5 Inject ShopFactory 2023-03-29 20:51:31 +02:00
P0nk
cc88d382e6 Monster drops are retrieved from DropProvider (postgres db)
This commit emphasizes the need for events to be reworked.
This is the chain of constructors the DropProvider has to pass through to reach MapleMap:
Channel -> EventScriptManager -> EventManager -> EventInstanceManager -> MapManager -> MapleMap
2023-03-16 08:31:38 +01:00
P0nk
eed94ec34a Refactor CommandsExecutor - is no longer static singleton
Preparing for change in Command#handle,
which is going to take a CommandContext as an additional argument.
This way we can pass in command dependencies in a safe way
instead of requiring them to access static methods.
2023-03-15 22:56:40 +01:00
P0nk
703ae30a27 Move "steal item" logic to DropProvider 2023-03-15 22:22:14 +01:00
P0nk
c0c0a2d2d9 Get maker reagent from PG db, rework processor (no statics) 2023-03-02 08:18:13 +01:00
P0nk
f6f3c9c3e3 Initiate Postgres connection pool on startup 2023-02-25 00:11:33 +01:00
P0nk
8bb825ef02 Add Docker compose support for Postgres 2023-02-24 23:42:13 +01:00
P0nk
f1192279bf Add Flyway, run db migration in local PostgreSQL db
First step in my plan to switch away from MySQL.
2023-02-24 21:49:00 +01:00
P0nk
387437cada Workaround for Guild dependence on NoteDao 2022-12-27 11:05:00 +01:00
P0nk
af14da987e Replace FredrickProcessor dependence on NoteDao 2022-12-27 11:04:11 +01:00
P0nk
389b3ad2a4 Add NoteService to handle note operations
NoteService should be the only class with access to NoteDao;
nowhere else should NoteDao be accessed directly.

Channel dependencies are static in PacketProcessor, for now.
Ideally they would be injected in the constructor,
but since the constructor is private and I don't want to open
up that can of worms, I'll leave it like this.
At the very least, now we have a way of injecting services into
the handlers. This will make further restructuring way easier.
2022-12-27 10:34:55 +01:00
P0nk
618f312b84 Remove thread tracker system 2022-08-11 14:57:26 +02:00
P0nk
7e848618e8 Stop using monitored locks in Server 2022-08-11 12:07:38 +02:00
Đạt Nhân Trương
0ef3e69638 Clean up code, replace switch and try-with-resource where possible. 2022-08-07 21:51:10 +07:00
P0nk
2b680c02c8 Mute GraalVM warning spam on startup 2022-08-03 07:57:01 +02:00
P0nk
89ababc5c0 Fix logs being cut off during shutdown 2022-06-19 07:58:17 +02:00
P0nk
513c9b615d Rework View all characters - fix packet and limit max chrs
Thanks to Lehava#4668 for finding the packet structure
2022-03-26 15:51:16 +01:00
P0nk
aceb410331 Stop using java.util.logging.Logger, start using slf4j 2022-02-10 21:49:47 +01:00
P0nk
2bbfd46105 Stop logging with System.out.println, start using slf4j 2022-02-10 21:40:54 +01:00
P0nk
8b630f7357 Migrate yet another batch of FilePrinter users to Slf4j
One FilePrinter.printError() method removed, one more to go
2022-02-09 21:05:22 +01:00
P0nk
0c60606b4e Migrate another batch of FilePrinter users to slf4j.Logger
Another FilePrinter method removed.
2022-02-08 21:08:59 +01:00
P0nk
451d86b5b4 Bump log4j to 2.15.0
2.14.1 and earlier (famously) contains a RCE exploit.
2021-12-11 17:59:41 +01:00
P0nk
4cf3135d48 Fix family loading on server startup
Worlds need to be initialized before families due to an interdependency
2021-11-18 21:17:33 +01:00
P0nk
cdc17ef3dd Use TimeUnit for time calculations 2021-09-10 19:08:58 +02:00
P0nk
6be6ea9927 Reformat and clean up "net" package 2021-09-09 23:26:02 +02:00
P0nk
ca4bcd80d1 Rename and clean up MapleSkillbookInformationProvider 2021-09-09 22:49:57 +02:00
P0nk
fef273ecc9 Rename and clean up MapleQuest 2021-09-09 22:42:02 +02:00
P0nk
a20267aee9 Rename and clean up MaplePlayerNPCFactory 2021-09-09 22:13:34 +02:00
P0nk
5a6ed83545 Rename and clean up MapleExpeditionBossLog 2021-09-09 21:59:43 +02:00
P0nk
803911c10f Rename and clean up MapleGuildCharacter 2021-09-09 21:35:06 +02:00
P0nk
559d3a42b3 Rename and clean up MapleGuild 2021-09-09 21:34:29 +02:00
P0nk
5e5f7b12ca Rename and clean up MapleAlliance 2021-09-09 21:33:36 +02:00
P0nk
3370152d58 Rename and clean up MapleFamily 2021-09-09 21:16:56 +02:00
P0nk
b07e6799dc Rename and clean up MapleClient 2021-09-09 21:13:48 +02:00
P0nk
7dc3a2159a Rename and clean up MapleCharacter 2021-09-09 21:09:45 +02:00
P0nk
7c61df6887 Rename and clean up MapleCashidGenerator 2021-09-09 20:53:51 +02:00
P0nk
eb2f464826 Remove removal of cryptography restrictions
This is no longer needed as of Java 9
2021-09-09 20:37:53 +02:00
P0nk
8f6860d7d7 All packet creating methods now create Packet instead of byte[]
This commit got way too big...
- Remove deprecated methods for sending packets
- Favor OutPacket & Packet over MaplePacketLittleEndianWriter, LittleEndianWriter, and byte array
- Split up some packet creating methods into separate classes
2021-08-21 01:36:51 +02:00
P0nk
8c4d3092a7 Remove "Maple" prefix from MapleSessionCoordinator name 2021-08-18 15:47:01 +02:00
P0nk
94e1125eca Move some remaining bits and pieces to netty implementation, start cleaning up 2021-07-13 21:54:07 +02:00
P0nk
5a7d8e6b1f Use MapleClient for session management
First working version of the Netty implementation,
but there's a lot remaining to be done.
2021-07-11 18:56:45 +02:00
P0nk
86224f5152 Merge branch 'master' into netty 2021-07-11 15:20:00 +02:00
P0nk
14a405adb2 Consistent handling of wz files and their paths 2021-07-10 17:49:04 +02:00
P0nk
b19f65f7ee Encapsulate ip address logic in new class 2021-06-26 23:40:59 +02:00
P0nk
9638d5c417 Initial Netty implementation for networking
Split into 1 LoginServer and 1 ChannelServer per channel.

There is still a lot of cleanup and refactoring to be done.
Currently, the reliance on IoSession holding client state
is the most pressing issue to be addressed.
2021-06-23 18:20:08 +02:00
P0nk
5a5110d905 Use existing connection for loading new year + family
Move async tasks earlier for lower chance of having to wait
2021-04-16 20:41:17 +02:00
P0nk
8335e77f2e Load developer room async on startup 2021-04-13 22:44:20 +02:00
P0nk
dd7c2a697a Load skillbook source information async on startup 2021-04-13 08:14:11 +02:00
P0nk
055ee01ae9 Load quests async on startup 2021-04-12 22:05:57 +02:00