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
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.
-Introduce a printf helper command which can print the sending command's name for you,
and treats the message as a format string if additional params follow
According to the decompiled Lua code, they sometimes can return
negative numbers (like -1, to indicate an error.) I also improved
the debug display of these in the server log a bit.
I figured out a few of these while figuring out the crystal bell
event, although their purpose is still generally unknown. It doesn't
really affect anything functionally as the event still works as
well as it did before.
I also fixed the crystal bell scenes so they don't finish the event
prematurely, although it looks weird without the hairstyle menu. But
that still isn't figured out yet.
I just wasted a few minutes trying to connect, only to realize my
client is too old. I thought we declined in these situations
already, but I guess not?
-Global.lua is no longer a catch-all dumping ground for registering actions and events
Instead, Global.lua will actually contain useful global constants and functions
-Init.lua will take over the role of being the initial script run when doing reloads or booting the servers
-Actions.lua will take over registering all actions
-Items.lua will take over registering all items
-Commands.lua will take over registering all text commands
-Events.lua will take over registering all warps, openings/quests, aetherytes, etc.
To this end, event ids now live in organized tables to reduce error-prone copy paste clutter
If we get enough actions, items or commands, we can move those to tables too.
- Summoning bell now tells you you're not authorized
- Armoire shows prompt but "remove items" option softlocks
- Crystal Bell cutscenes work slightly better but still default to not authorized
- Bed now plays cutscenes with proper fade to black, and dreamfitting works when forced in onTalk