Commit Graph
100 Commits
Author SHA1 Message Date
P0nk 23a8a33e5f Move transaction handling to CharacterSaver 2024-09-13 23:59:29 +02:00
P0nk 758347f7bc Small refactor of disconnectInternal for readability 2024-09-13 23:23:35 +02:00
P0nk 1b6c0167de Fix buddy staying online in buddy list if dc in cash shop 2024-09-13 23:17:42 +02:00
P0nk 8bce0922d9 Fix broken global drops since merge from master 2024-09-13 23:02:12 +02:00
P0nk f41268cdde Handle disconnect solely in TransitionService 2024-09-13 22:59:55 +02:00
P0nk 719b079cbc Refactor unnecessary wrapper boolean 2024-09-13 21:47:52 +02:00
P0nk 7bd5fa387d Merge branch 'refs/heads/master' into feat/postgresql-database 2024-09-13 21:29:50 +02:00
P0nk 09a75e89c9 Merge branch 'refs/heads/master' into feat/postgresql-database
# Conflicts:
#	src/main/java/server/life/MonsterInformationProvider.java
#	src/main/java/server/maps/MapleMap.java
2024-09-03 17:45:27 +02:00
P0nk 559fe2d550 Merge branch 'refs/heads/master' into feat/postgresql-database
# Conflicts:
#	config.yaml
#	docker-compose.yml
#	pom.xml
#	src/main/java/client/Character.java
#	src/main/java/client/Client.java
#	src/main/java/client/MonsterBook.java
#	src/main/java/client/command/commands/gm0/BuyBackCommand.java
#	src/main/java/client/processor/stat/AssignAPProcessor.java
#	src/main/java/config/ServerConfig.java
#	src/main/java/net/server/channel/Channel.java
#	src/main/java/net/server/channel/handlers/AbstractDealDamageHandler.java
#	src/main/java/net/server/channel/handlers/BuddylistModifyHandler.java
#	src/main/java/net/server/channel/handlers/CloseRangeDamageHandler.java
#	src/main/java/net/server/channel/handlers/EnterMTSHandler.java
#	src/main/java/net/server/channel/handlers/NPCTalkHandler.java
#	src/main/java/net/server/channel/handlers/RangedAttackHandler.java
#	src/main/java/net/server/channel/handlers/SummonDamageHandler.java
#	src/main/java/net/server/channel/handlers/UseCashItemHandler.java
#	src/main/java/net/server/handlers/login/CreateCharHandler.java
#	src/main/java/net/server/world/World.java
#	src/main/java/scripting/npc/NPCConversationManager.java
#	src/main/java/server/ItemInformationProvider.java
#	src/main/java/server/life/Monster.java
#	src/main/java/server/life/MonsterInformationProvider.java
#	src/main/java/server/maps/MapleMap.java
#	src/main/java/tools/PacketCreator.java
#	src/test/java/service/NoteServiceTest.java
#	src/test/java/testutil/Any.java
2024-09-02 20:43:55 +02:00
P0nk dbf1a1bb36 Fix global drops thread issue
This randomly caused global drops to stop working after a while.
Originally reported by Crabo of MapleHorizons.
2024-08-28 21:22:47 +02:00
P0nk 5064ee936a Fix staggered exploding mesos
Thanks teto: "the staggering should only go up to 400ms [attack.attackDelay + (index++ % 5) * 100], and the total delay should be capped at 1000ms according to the BMS implementation"
2024-08-27 07:41:24 +02:00
P0nk acac203e42 Scheduler free timing for reactor drops 2024-08-20 20:32:33 +02:00
P0nk cdd1c8cb61 Proper timing on removing exploded meso
No longer using scheduling on server side but rather
a delay value inherent to the "remove item from map" packet.
2024-08-20 20:13:01 +02:00
P0nk 439753eb6d Fix drop delay for Meso Explosion 2024-08-20 19:44:16 +02:00
P0nk e30700de66 Fix drop delay from summon attack 2024-08-17 21:27:43 +02:00
P0nk 994d1723b6 Remove unnecessary "spawn loot on animation" feature
No longer needed since item drop timing is now dictated by the client
since two commits back.
2024-08-17 19:14:04 +02:00
P0nk 2d40a89c55 Overload damageMonster for when no delay is needed 2024-08-17 19:13:38 +02:00
P0nk 802cc2b5f5 Use delay from packets for drop timing 2024-08-17 19:13:36 +02:00
P0nk 2ffca90d29 Add attack delay to AttackInfo
Meant to be used in item drop packet for timing handled by the client
rather than scheduling item drop packets on the server.
2024-08-14 07:45:06 +02:00
P0nk cad10c4d5c Remove rebirth system 2024-07-19 17:16:14 +02:00
P0nk 3850b63cec Add migration for <v0.14.0 to fix shop dc 2024-07-17 19:24:19 +02:00
P0nk a7df8a4f49 Remove banish scroll from WZ files 2024-07-17 18:50:44 +02:00
P0nk 7071b13e41 Remove banish scroll from shops 2024-07-17 18:39:50 +02:00
P0nk 2324ae7f9e Refactor BanishInfo - make it a record 2024-07-17 18:11:50 +02:00
P0nk 402163c33d Remove "banishable town scroll" feature 2024-07-17 17:45:38 +02:00
P0nk 3356e42e71 Remove "spikes avoid banish" feature 2024-07-16 20:17:21 +02:00
P0nk 205e263255 Specify required Java version 2024-07-16 20:16:26 +02:00
P0nk 5a4bdd343c Fix Energy charge crashing certain other players
Crabo in #bug-report (2024-06-10):
"(...) this will crash everyone in the map besides the bucc and 1 character, when a bucc (or TB) charges energy and a character with an ID that's a multiple of 102 is in the same map (and the energy reaches that number so if character ID is 204 it will reach that after 2 hits and DC the whole map besides the bucc and that char with id 204).
 Thanks to others for helping me fix it. Thought I'd report it!"
2024-06-16 19:09:21 +02:00
P0nk 1791365e0f Fix able to get package from Cash shop surprise
Packages aren't real items and crash the client.
2024-06-16 16:06:29 +02:00
P0nk 5aeed01e38 Fix not using the selected Cash shop surprise
If you have multiple, it would always use the first one. Now it uses whichever you select (as expected).
2024-06-16 15:08:48 +02:00
P0nk 6ab1af99da Add tests for CashShopSurpriseHandler 2024-06-16 13:56:54 +02:00
P0nk c7b2d218ef Fix count not being updated after last Cash shop surprise 2024-06-16 12:59:30 +02:00
P0nk 01ae462b72 Refactor CashShop - add constants for cash types 2024-06-16 12:19:16 +02:00
P0nk b67b29def5 Fix cash shop surprise count not properly updated on usage
This reverts the hacky solution made in db82cbcfae
2024-06-15 08:31:24 +02:00
P0nk 4e743128e9 Remove all wildcard imports 2024-05-22 08:33:44 +02:00
P0nk 2ed35db216 Add IntelliJ code style settings (no wildcard imports) 2024-05-22 08:06:46 +02:00
P0nk 9fe6ba4483 Add new wz files zip (reduced size by ~400mb)
Removed: Base.wz, Effect.wz, Morph.wz, Sound.wz, TamingMob.wz
2024-05-21 22:47:47 +02:00
P0nk dee8651e61 Add DevtestCommand to easily test without restarting server 2024-05-21 21:36:54 +02:00
P0nk 948a9de667 Remove Spirit of Rock die sound 2024-05-21 20:23:34 +02:00
P0nk d55437ddf3 Remove subway whistle 2024-05-21 19:56:09 +02:00
P0nk 98fd8c13d4 Remove brazil anthem 2024-05-21 19:54:30 +02:00
P0nk 04a92fe0c1 Remove buyback custom feature 2024-05-21 19:44:25 +02:00
P0nk dc1a712f52 Re-add section about running from jar 2024-05-10 22:26:04 +02:00
P0nk 7a6d3e1b68 Add feature request issue template 2024-05-10 21:29:09 +02:00
P0nk 970fb3155f Complement pom.xml 2024-05-09 22:29:15 +02:00
P0nk 0eb78e2d9e Use root db user by default 2024-05-09 22:08:28 +02:00
P0nk 7d42870abd Fix sql script not being runnable on newer versions of MySQL 2024-05-09 21:26:09 +02:00
P0nk c7b9e0eee3 Major rewrite of README 2024-05-09 21:11:53 +02:00
P0nk c5089881b3 Tidy pom
mvn tidy:pom
2024-05-09 14:24:03 +02:00
P0nk 9c1406f75d Update pull request template 2024-05-09 12:33:50 +02:00
P0nk 92226483be Merge branch 'refs/heads/master' into feat/project-update 2024-05-09 12:30:14 +02:00
P0nk f61fee829a Upgrade Java version and dependencies 2024-05-09 11:45:16 +02:00
P0nk 851b57e8ef Fix able to gain infinite slots with clean slate scroll
And remove a GM config option.
Thanks Crabo for the suggested solution.
2024-02-05 08:34:36 +01:00
P0nk a7d03cf8c0 Merge branch 'master' into feat/postgresql-database 2024-02-04 15:12:14 +01:00
P0nk 033d91ed71 Merge branch 'master' into feat/postgresql-database
# Conflicts:
#	config.yaml
#	src/main/java/config/ServerConfig.java
2023-11-08 21:21:07 +01:00
P0nk 0aee9d7c3f Fix unable to create playernpc
The initialization of the running world counters depended on worlds already having been initialized, so I made that dependency more explicit.
2023-09-19 12:56:51 +02:00
P0nk a49c1703ae Remove developer player npc 2023-09-18 23:26:37 +02:00
P0nk 392a350eab Merge branch 'master' into feat/postgresql-database
# Conflicts:
#	docker-compose.yml
2023-08-20 18:30:52 +02:00
P0nk f33df59f49 Move some Client#forceDisconnect calls to TransitionService 2023-08-11 22:00:33 +02:00
P0nk cd75e85bec Move some autoban logic to new BanService 2023-08-10 22:52:09 +02:00
P0nk cb31121fe7 Disconnect client with TransitionService 2023-08-10 21:58:55 +02:00
P0nk d5682a5f65 Add client disconnection logic to TransitionService
Problem: disconnecting requires access to CharacterSaver,
which is not available in Client.
Having it in a service like this solves that problem.

Next step is to migrate all calls to Client#disconnect and Client#forceDisconnect
to their TransitionService counterparts.
2023-08-08 21:51:12 +02:00
P0nk f6d06ba82a Extract "char list" from Client to handler 2023-08-06 21:14:32 +02:00
P0nk bbee8d7caa Merge chr name + id wrappers into new CharacterIdentity record 2023-08-06 20:35:26 +02:00
P0nk 5b5888cf65 Remove unused stuff in Client 2023-08-06 20:11:32 +02:00
P0nk 48d9aaa871 Clean up Client - visibleWorlds & canRequestCharlist
canRequestCharlist is a relic from the past when "View all char"
functionality was hacked together with wrong packets.

visibleWorlds I'm less sure about. I suppose it's useful if you add world
(via command) while someone is still on the login screen.
But the functionality of adding/removing worlds live is a recipe for disaster
and will eventually (likely) be removed.
2023-08-06 20:02:39 +02:00
P0nk f44083aeba Refactor Client#finishLogin 2023-08-06 17:26:34 +02:00
P0nk 810dbcc1d7 Remove "reward points" feature 2023-08-06 16:55:58 +02:00
P0nk 449ab01bc2 Remove "vote points" feature 2023-08-06 16:55:34 +02:00
P0nk 2686b2b02d Disconnect client by throwing exception in handler
This makes it easier to add checks in handlers, which should improve security over time.
I think this approach is more readable and testable than calling Client#disconnect straight up,
while it also decentralizes the handling.
2023-08-06 15:48:49 +02:00
P0nk e9819fac87 Save cooldowns and diseases as part of normal flow 2023-08-04 16:34:59 +02:00
P0nk 4e39142fb3 Direct almost all chr saving through CharacterSaver
Client#disconnectInternal remains.
Had to remove some configurable save points to keep it simple.
2023-08-04 16:14:51 +02:00
P0nk e52f646558 Fix batch insert monster cards
batch.add() clears all bindings, unlike vanilla JDBC
2023-08-04 15:38:14 +02:00
P0nk 02d4ff524a Fix global drops not dropping
No longer able to shuffle the list since DropProvider
return an unmodifiable list in the case of global drops.
2023-08-04 15:23:02 +02:00
P0nk 05b7ec77c8 Add ChannelService to handle cc'ing 2023-08-04 15:01:49 +02:00
P0nk f6aa8ceba6 Rewrite MonsterBook, touch up chr loading
Temporarily disabled loading monster cards from db
2023-07-25 21:27:35 +02:00
P0nk b3ec325e95 Add monster card table and initial dao 2023-07-25 18:46:03 +02:00
P0nk e31465a1b5 Add MonsterCard 2023-07-25 17:52:38 +02:00
P0nk 84ad5b4db8 Remove scroll generator (custom feature)
This allowed me to remove the getCardTierSize db query
2023-07-25 17:20:16 +02:00
P0nk 855b66c459 Merge branch 'master' into feat/postgresql-database 2023-07-25 17:03:35 +02:00
P0nk 46f767d79c Merge branch 'master' into feat/postgresql-database 2023-05-29 15:56:53 +02:00
P0nk 785f74ed21 Fix HelpCommand not working without static CommandsExecutor 2023-03-31 07:59:43 +02:00
P0nk 699da37f06 Simplify NPC script start 2023-03-31 07:33:49 +02:00
P0nk c3badba73b Convert ShopItem to record 2023-03-30 07:07:33 +02:00
P0nk 5f0e9a355b Move Shop stuff to own package 2023-03-30 06:47:07 +02:00
P0nk 39d759595d Get shop as Optional 2023-03-30 06:41:13 +02:00
P0nk fe9dd75a23 Instantiate shops in ShopFactory 2023-03-29 21:59:00 +02:00
P0nk 2139147dcd Add getShop to DAO, preparing to refactor shop loading 2023-03-29 21:14:19 +02:00
P0nk c71ca7f4d5 Inject ShopFactory 2023-03-29 20:51:31 +02:00
P0nk 705efb4340 Remove access to shops from scripts 2023-03-29 20:38:34 +02:00
P0nk ec1450cec1 Rewrite Mo NPC script to be GMS-like 2023-03-29 19:54:59 +02:00
P0nk 290bf78db3 Notes about difficulties of DI for scripts 2023-03-18 16:04:01 +01:00
P0nk 02c1fe46f3 Remove custom shops
These custom shops we introduced in HeavenMS.
2082014 - Asia selling scrolls
9201101 - T-1337 selling special potions
2023-03-18 15:14:00 +01:00
P0nk 7315dd80fc Remove redundant scripts for Ariant weapon & armor merchants 2023-03-18 15:08:06 +01:00
P0nk a496c0f2b4 Add ShopDao 2023-03-18 14:32:21 +01:00
P0nk ab0239ba84 Add shop and shop_item PG tables with data 2023-03-17 20:53:16 +01:00
P0nk f2f3abdb32 Move last pieces of monster drops to DropProvider 2023-03-16 18:55:33 +01:00
P0nk 5a35b55d7a Cache continent drops 2023-03-16 18:03:43 +01:00
P0nk 02aa4a237f Global monster drops are retrieved from DropProvider (postgres db) 2023-03-16 18:00:21 +01: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