Commit Graph

224 Commits

Author SHA1 Message Date
P0nk
fa3481fa99 Pass CommandContext to commands
CommandContext is the carrier of dependencies.
Currently, it only carries a DropProvider, but
it will grow bit by bit as more static singletons
and other similar structures get refactored.
2023-03-15 23:19:04 +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
0be48568d7 Get MakerItemCreateEntry from new info provider 2023-03-08 21:09:47 +01:00
P0nk
1fd0963401 Fix maker disassembly fee not being applied 2023-03-04 22:53:05 +01:00
P0nk
d2d4b442d2 Maker disassembly info to MakerInfoProvider
MakerProcessor is such a mess...
2023-03-04 22:33:34 +01:00
P0nk
6073b20d65 Cache MakerRecipe, move stimulant to MakerInfoProvider 2023-03-04 17:20:16 +01:00
P0nk
c0c0a2d2d9 Get maker reagent from PG db, rework processor (no statics) 2023-03-02 08:18:13 +01:00
P0nk
f89392b476 Refactor IdCommand 2023-02-04 19:46:09 +01:00
P0nk
cee82a08ba Remove ItemInformationProvider field in Character
This field prevented creation of Character mock in tests
2022-12-27 11:59:14 +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
c82881e6f2 Get rid of Character#sendNote, refactor usages of it 2022-12-26 18:09:09 +01:00
P0nk
4d480660b5 Rework sending notes to chr, get rid of the first method
Sending notes should not be the handled by Character
2022-12-26 18:07:41 +01:00
P0nk
1f4ce98998 Show notes using NoteDao 2022-12-26 18:07:41 +01:00
Matthew Hinds
32f6194a75 Adjusting name
Adjusting name and added it to the config
2022-10-13 21:27:57 +13:00
Matthew Hinds
dd260e7b2a Toggle the NX coupon loot notice
Added a toggle to the showHint that announces the NX gain on a NX coupon loot
2022-10-13 21:23:49 +13:00
P0nk
1a28fc98ac Commit to "tameness" name over "closeness" for pets, fix scripts 2022-09-15 17:12:21 +02:00
Windyboy
388ee5c805 Fix dead people could be revived with a party hp potion 2022-09-15 01:02:34 +08:00
P0nk
d31f4806fc Fix mob using attack with no diseaseSkill causing errors 2022-09-12 20:31:38 +02:00
P0nk
df5159e34c MobSkillFactory throws exception instead of returning null 2022-09-07 19:25:30 +02:00
P0nk
a6ec6adbb5 Combine type and skillLevel in MobSkill 2022-09-03 14:07:24 +02:00
P0nk
7a784a7938 Disease and MCSkill hold MobSkillType instead of int 2022-09-03 05:20:54 +02:00
P0nk
fba49e7eec MobSkillFactory takes MobSkillType instead of int as id argument 2022-09-03 04:52:55 +02:00
P0nk
84890ac308 Support sealing mob skill 2022-08-29 19:40:24 +02:00
Charlie Unfricht
3a16a724f5 Add forceEnjoy parameter to Pet.gainClosenessFullness to ignore existing fullness value 2022-08-17 16:39:21 -04:00
Windyboy
97f358f047 Analyze pet packet structure correctly 2022-08-17 14:07:39 +08:00
Charlie Unfricht
cd706c544b Fix bug where non-200 capped classes can't rebirth 2022-08-16 02:17:49 -04:00
Charlie Unfricht
b0b197a7a5 Update executeReborn to take in a job id 2022-08-16 02:11:38 -04:00
P0nk
d691dc1e18 Prefer Path.of() over Paths.get() 2022-08-11 19:01:40 +02:00
P0nk
229252cd63 Fix deprecations 2022-08-11 15:18:09 +02:00
P0nk
4fb632ecdb Remove monitored locks (fair), use basic version 2022-08-11 14:45:48 +02:00
P0nk
54878ebe8c Remove monitored locks with default fairness, use basic version 2022-08-11 14:26:23 +02:00
P0nk
8657b765b1 Remove monitored read/write locks, use basic version 2022-08-11 14:16:06 +02:00
P0nk
c7af125afc Remove FaceExpressionService
Face expressions are automatically defaulted back after 5 seconds by the client, anyway
2022-08-11 11:48:11 +02:00
truongdatnhan
7f7b28874f Remove comments 2022-08-11 16:08:45 +07:00
truongdatnhan
72a87cae43 Merge pull request #8 from truongdatnhan/eclipse
Removing unused comments
2022-08-11 16:05:10 +07:00
Đạt Nhân Trương
53914bbd32 Removing unused comments 2022-08-11 16:02:53 +07:00
truongdatnhan
68663146c8 Merge pull request #7 from truongdatnhan/eclipse
remove comments
2022-08-11 15:58:57 +07:00
Đạt Nhân Trương
8e395b0770 remove comments 2022-08-11 15:58:18 +07:00
truongdatnhan
d9fa632204 Merge pull request #6 from truongdatnhan/eclipse
Moving checking null for storage to when loading character
2022-08-11 01:35:38 +07:00
Đạt Nhân Trương
85e5356a9c Moving checking storage null to when loading char 2022-08-11 01:33:48 +07: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
Đạt Nhân Trương
f983b4dccf Clean up code & Upgrade syntax to new Java 2022-08-07 01:35:02 +07:00
Đạt Nhân Trương
571d804f50 Character storage won't get initialize at first time on server 2022-08-05 19:33:15 +07:00
P0nk
c2b28b5148 Merge branch 'master' into various-fixes 2022-08-03 07:43:02 +02:00
ronancpl7
905a0260a6 Wrap around hpDec schedules (#75)
* Wrap around hpDec schedules

Merges hpDec schedules at character into a world schedule.

* Patch hpDec timer reset on changing maps

Patch timer reset on changing maps with hpDec.

* Update Character.java

* Update Client.java

* Update World.java

Co-authored-by: Ronan Lana <rcpl2010@gmail.com>
2022-08-03 07:42:15 +02:00
P0nk
8ce3be5efb Merge branch 'master' into various-fixes 2022-08-03 07:04:44 +02:00
P0nk
5afb09d798 Refactor various minor things 2022-08-02 17:45:47 +02:00
Đạt Nhân Trương
a44744c05b Upgrade to Java NIO 2022-07-30 16:10:46 +07:00
P0nk
084e7b22fa Consolidate HexTool methods and add more tests 2022-02-14 19:48:21 +01:00