1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-10 07:57:46 +00:00
Commit graph

502 commits

Author SHA1 Message Date
fb46a44e18 Begin correctly implementing packet obsfucation
I re-implemented Unscrambler, but in reverse! This currently only
affects names in the PlayerSpawn packet, it needs to be extended
into others to be considered complete.

See #9
2025-07-03 16:12:19 -04:00
thedax
8894e25da4
Update all but one opcode for 7.25h3 (#99) 2025-07-03 12:57:51 -04:00
thedax
bc7ab11deb
Lobby server: send back more accurate error messages for problems (#97)
* Lobby server: send back more accurate error messages for problems

* Send the dreaded 2002 error code instead. Exact error codes would probably be better.
-It is unknown if there's a list somewhere.
2025-07-02 21:59:25 -04:00
thedax
01b396a656
Refactor gamedata to use a more general get_item_info function (#96)
-You can search for items by id or name
-The logic is all centrally located, eliminating all of the duplicated loops everywhere
2025-07-02 17:30:48 +00:00
thedax
9bed7595cc
Implement items costing money now (#94)
-Includes an extra check for trying to bypass the client-side
-Update dependencies
-Include a message that selling isn't supported yet
-Display a message indicating an item was bought
2025-07-01 21:21:47 -04:00
927c093915 Send your completed quests list
We aren't going to be adding quests ever or anytime soon, so all you
can do right now is force every quest to unlock with the aptly named
!completeallquests.
2025-07-01 19:51:33 -04:00
The Dax
3b6fcb7ba1 Extend the Lua API:
-Implement GM command collect (subtracts gil from player), but the ingame command's params are unknown, Lua only
-Implement GM command inspect, but the IPC opcode for it is different than GMCommand and is thus far unimplemented, Lua only
-The Lua API can now access all of the player's inventory (read-only)
2025-07-01 13:06:49 -04:00
thedax
877ec335a9
Address four of "warning: variables can be used directly in the format! string" (#92) 2025-07-01 06:55:25 -04:00
The Dax
d14dd3ccd9 Address: "warning: the variable sequence is used as a loop counter" 2025-06-30 21:55:11 -04:00
The Dax
b0282eb6bc Address "warning: you seem to be trying to use match for destructuring a single pattern. Consider using if let" 2025-06-30 21:55:11 -04:00
The Dax
1fe3e3e81d Address "warning: using clone on type [u32; 10] which implements the Copy trait" 2025-06-30 21:55:11 -04:00
The Dax
1f065472d0 Address "warning: casting to the same type is unnecessary (u32 -> u32)" 2025-06-30 21:55:11 -04:00
The Dax
3fc863616c Address "warning: unneeded return statement" 2025-06-30 21:55:11 -04:00
3695ee4352 Begin implementing gil shops, add free item to inventory
Tested against the Florist in New Gridania, although we don't
deduct the item price from you and such.
2025-06-30 21:38:04 -04:00
thedax
5a580149b4
Document some opcodes related to shops and implement a generic gil shopkeeper script (#85)
Document some opcodes related to shops and implement a generic gil shopkeeper script
* You can now interact with shopkeepers, and if you have enough gil, you can attempt to purchase items
* Upon trying to buy items the event will auto-cancel for now, because we're missing implementations of several opcodes related to inventory management
2025-06-30 15:21:08 -04:00
f778f9a571 Support sending an arbitrary amount of event params
This ended up as a giant, disgusting match statement but I don't
really have anything better right now.
2025-06-28 16:17:54 -04:00
5b8a61c1ce Add the various sizes of EventScene
This isn't hooked up to the Lua API yet, it's just the
needed opcode bits.
2025-06-28 16:05:36 -04:00
2762407585 Rename EventReturnHandler to EventYieldHandler, make generic
This also makes EventScene generic for use in the future.
2025-06-28 15:57:45 -04:00
670d25a980 Disable sending exp again 2025-06-28 15:27:53 -04:00
fd4436db01 Fix a few more fields in PlayerStatus
Class is determined correctly now, and we now set the expansion
level too.
2025-06-28 15:23:56 -04:00
41d8424615 Read unknown packet data in more places 2025-06-28 15:15:45 -04:00
ff3a7d6835 Remove more leftover debugging code 2025-06-28 15:10:57 -04:00
d230a86844 Fix leftover test debugging thing 2025-06-28 15:01:26 -04:00
f46b62ad9e Store classjob EXP
This isn't sent in the PlayerStatus packet *yet*, only on
UpdateClassInfo. For some reason, passing it makes the client freak
out and I'm not sure why yet.
2025-06-28 14:57:21 -04:00
0a740198f8 Initial support for item glamours and condition
The only way to glamour items is to import them from Auracite, same
with condition. But these are actually sent to the client now!
2025-06-28 14:57:21 -04:00
Jules
fe234920f2
Use raw-dylib when linking to Oodle on Windows (#83)
This means that the static .lib is no longer required at compile time, but
the .dll is still required at runtime. On Linux, the .so is still
required at both compile time and runtime, because linking works
differently there.
2025-06-28 14:45:01 -04:00
66da9abc90 Fix bad assumption with EXP/Level array indices
They don't always correspond to their classjob id, because jobs share
the same EXP/Levels as their base classes.
2025-06-28 14:15:46 -04:00
8f61fc36bd Support importing even more data from Auracite
This includes unlocked class jobs, levels, your inventory and unlock
flags.
2025-06-28 14:15:46 -04:00
b2f14dffee Add the !item debug command to give items by name
Compared to the //gm item command which only accepts IDs.

Fixes #50
2025-06-28 11:22:21 -04:00
f1b9461eb2 Add the //gm item command back
I never actually finished the Lua version, oops.
2025-06-28 11:18:17 -04:00
99a165e405 When changing equip display flags, store that for new spawns
See #50
2025-06-28 11:13:11 -04:00
9a3652fb42 When equipping items, network that to other players
See #50
2025-06-28 11:13:11 -04:00
554d42a904 Equip the correct starting weapon for your selected classjob
This prevents all sorts of oopsies because the client will refuse
to equip certain items, if you happen to be using a Gladiator
weapon on an Archer or vice-versa.

See #50
2025-06-28 10:44:25 -04:00
61f0ccdacd Fix deleting characters in the lobby not working
This statement broke at some point, and the size of the custom IPC
was wrong too.
2025-06-28 10:43:53 -04:00
dfac7702fa Expose a zone's intended use ID in the Lua API 2025-06-28 10:27:56 -04:00
e6536da9dd Split up the command arguments on the Rust side
This removes some boilerplate code we need in every command to do
this ourselves.

See #65
2025-06-28 10:27:56 -04:00
ed1263d587 Pass all four arguments to GM command scripts
No GM command we have implemented currently uses these, but just
a little bit of future-proofing.
2025-06-28 10:27:56 -04:00
776bac9463 Add padding to the GMCommand IPC packet
This fixes the warning that the sizes don't match, because I think
there's padding at the end.
2025-06-28 10:27:56 -04:00
6951f9448d Port GM commands to Lua
This removes a ton of implementation overlap between the two
command systems. For example, we had two different implementations
of unlocking aetherytes which is just unnecessary.

On the flipside, this makes implementing new GM commands just as
easy as writing debug ones. I moved the existing debug Lua
implementations into their GM counterparts and updated the USAGE
accordingly.
2025-06-28 10:27:56 -04:00
2cbf70fbe5 Fix tests 2025-06-28 10:02:09 -04:00
6ecdae840c Continue parsing when encountering unknown packets
This reads the unknown packet data, just throwing it in a byte
buffer. This allows us to read the rest of the segmenets in
the packet, and fixes parsing.

Note that this still log spams with "wrong size" as we can't
determine the size of the unknown packet ahead of time. This is
easy to fix, but it's not a high priority yet.

Fixes #73
2025-06-28 08:48:59 -04:00
db2ee114a9 Fix the size of the aetheryte unlock bitmask
This should really be calculated instead of guessed, because I already
made a mistake. I didn't do that, only added a TODO for it.

Fixes #74
2025-06-28 08:22:01 -04:00
d3647a4b3b Fix unlocking all aetherytes
I also made it possible to toggle them off properly, that should be
saved now too.
2025-06-28 00:07:56 -04:00
74f32121ef Make size of bitmasks constants so they're easier to change, fix tests 2025-06-27 23:28:56 -04:00
5272439bca Store aetherytes in the database
This requires yet another database wipe, but this is worth it as you no
longer have to aetheryte unlock spam on login.
2025-06-27 23:28:56 -04:00
0b470dc28b Make unlocks persistent, fix player name in chat
The PlayerStatus struct shifted around recently, so I fixed the offsets
yet again. Unlocks should be persistent now, but this as usual requires
a database wipe, sorry!

I also included some refactors of the !unlock debug command that still
had references to the old unlock_action API.
2025-06-27 23:28:56 -04:00
The Dax
53748c33f0 Document the EventScene struct more: We'll support only two params for now.
We'll have a generic version soon™️, though.
2025-06-27 21:26:10 -04:00
2075da0c5e Fix tests and Cargo warnings 2025-06-27 17:59:40 -04:00
7b8177b27b Allow building for WebAssembly
This really only allows you to access the packet parsing bits, starting
the servers isn't possible for a variety of reasons.
2025-06-27 17:58:14 -04:00
05f909497c More unknown IPC handling fixes 2025-06-26 21:06:54 -04:00