1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-05-20 09:47:44 +00:00
Commit graph

83 commits

Author SHA1 Message Date
94ed036431 Add script for the Teleport action
This makes the Teleport action functional now, although it looks pretty
rough as it warps you instantly instead of waiting for the action to
actually finish.
2025-05-11 10:12:02 -04:00
477380c8b9 When using the !spawnmonster command, send it to all players
You can't attack it and see it on other clients yet, that will take some
more plumbing.
2025-05-09 20:09:22 -04:00
2e50d1f7ad Move some common code out of ZoneConnection and into a new common module 2025-05-09 19:49:40 -04:00
dba4edc32d Remove some dead, unused code 2025-05-09 19:45:08 -04:00
95fb6a149f Remove ToServer::ActorSpawn
This should be handled in the global server state instead.
2025-05-09 19:42:23 -04:00
0139fbc8c6 Remove the now unused ToServer::ActorDespawned
This is handled in the much-better-named LeftZone message.
2025-05-09 19:30:37 -04:00
cbeaa83307 Implement basic zone isolation for multiplayer
Now you don't see every player from every zone, like some kind of
madman. The code still sucks, but it works.
2025-05-09 19:27:18 -04:00
9787126a1b Replace (most of) the remaining Excel parsing with Physis Sheets
The only one remaining is for Item data, but that can't be ported yet
because the new API only fetches the first page for now.
2025-05-09 18:35:44 -04:00
99c92d1b67 Update and use the nice, new Physis ColumnData API
Now the GameData::get_warp function looks much closer to how I want it
to!
2025-05-09 18:03:25 -04:00
fd1fbe7188 Start adding support for propagating actor control state
This begins figuring out how we are going to be propagating actor
control state: e.g. targets, poses, and other misc effects. I ended up
sending client triggers to the global server state, who then creates the
needed actor control packet for the other players.

Now players can see what other players are targeting!
2025-05-08 22:53:36 -04:00
f338530e6d Fix rotations sent to other players
There was two problems I was running into:
1. The move packet changed slightly, using a different way to encode the
rotation. In hindsight, it should seem obvious they would encode it the
same way for CommonSpawn and ActorMove.
2. write_quantized_rotation did it's order of operations wrong, and
it would spit out nonsensical rotations.

Both issues are fixed and you can see the other player's rotation
correctly now!
2025-05-08 21:52:50 -04:00
515ec59d92 Port classjob debug command to Lua 2025-05-06 22:03:31 -04:00
ca8d36e48c Fix remaining inn warps, prevent the player from getting stuck
This means the three ARR inns are now "functional" (as in, you can enter
and exit them.) I also added some code to give you control of your
character in case you hit an unimplemented event.
2025-05-05 23:45:22 -04:00
6dc8194aa8 Add inn bed handling, let event scripts decie when they are finished
The inn bed is the most complex script we have written so far, and needs
a little bit more logic to when it finishes. I also made it play the bed
animation, although you *will* sleep forever as we don't know how to
disconnect you yet.
2025-05-05 23:04:53 -04:00
fec6665d8d Make Limsa Inn warp functional
This was surprisingly easy, so now this works. You can't exit the inn
yet, though!
2025-05-05 22:04:39 -04:00
de5e6cfb94 Use Default trait in more segment construction 2025-05-02 23:38:44 -04:00
ff33bd446a Update IPC struct names and filenames to match their opcode name 2025-05-02 23:24:31 -04:00
76583ed744 Add config flag to disable outgoing packet compression 2025-05-02 22:41:31 -04:00
8d384c4bd0 Overhaul how we send inventory packets again
I wanted to add armory chest support but the current state of the
inventory was a little frustrating. Adding new containers was too
difficult, so I made the system *even more* generic and easier to use. I
have also split it up into it's own module with a nicer file layout.

Oh yeah, and armory chest works too now.
2025-05-02 16:15:54 -04:00
e7fb661244 Implement Fantasia and remaking your character
Everyone's favorite copying mechanism/purchasable item is now functional
in Kawari. The item doesn't disappear once you use it, because there's
no API for that yet.
2025-05-02 15:36:22 -04:00
5111a38424 Re-organize IPC segments into the ipc module
These were kind of scattered everywhere, instead we should move them
into their own module. Kawari's custom IPC is moved here too.
2025-05-02 00:47:11 -04:00
0f98bfde52 Implement Default trait for PacketSegment
This reduces a *ton* of places where I had to set
source_actor/target_actor to zero because it wasn't relevant.
2025-05-02 00:28:05 -04:00
fb69689f2a Change server_id field in IpcSegment to option 2025-05-02 00:17:15 -04:00
54fd1b90b1 Move chat connection initialization out of WorldConnection
I think this just causes more confusion, it's not really it's job to do
this.
2025-05-02 00:11:37 -04:00
f3f25eb219 Overhaul segment types, their names and their order 2025-05-02 00:03:36 -04:00
b426de677f Begin separating chat IPC, fix tests 2025-05-01 23:34:06 -04:00
5420225c74 Update world IPC packets with better fitting names, fields 2025-05-01 23:20:56 -04:00
ed8ccb86ee Move model id grabbing to Inventory, fixup ClientSelectData
I wanted to make the lobby screen reflect your currently equipped items,
but that doesn't yet for some reason. These are still good refactorings
though!
2025-04-30 23:05:43 -04:00
614e470669 Add an option to enable packet obsfucation for the World server
There's no point in doing this yet:
1. This *crashes* the client, nice. Most likely because we're not
actually obsfucating anything, only tricking the client into thinking we
were. Why this can crash the client is beyond me?
2. Obsfucation is still optional.
2025-04-30 22:37:57 -04:00
fa2caa6647 Make EquippedContainer iteratable, simplify sending equipped item code 2025-04-18 13:52:18 -04:00
e5672e91f2 Show the currently equipped weapon on your character
Oops, I was turning u64 model ids into u16 and then changing it to
either a u32/u16. That's stupid, but now it's fixed and we can display
weapons!
2025-04-18 13:20:25 -04:00
db877938ac Attempt to remove actors when killed
This doesn't work on the test monster yet - I don't know why, but this
is what it's supposed to do.
2025-04-18 01:38:47 -04:00
ba91ca4291 Fix various Clippy warnings 2025-04-14 16:24:46 -04:00
79f3ac73b6 Move player stat sending function to ZoneConnection 2025-04-14 16:18:03 -04:00
10c1369119 Add opcode for despawning actors, send that when changing zones
This is to workaround a bigger bug where I don't properly enclose actors
in their zone, so you can hit an assert while traveling between zones.
But this is something that has been needed anyway, and also fixes that.
2025-04-14 16:09:14 -04:00
ca94e26e1c Attempt to fix other player rotations
This doesn't work just yet, but I guess I'm getting closer.
2025-04-11 10:32:52 -04:00
e9ef724f05 Make get_primary_model_id return an Option 2025-04-11 08:36:17 -04:00
96bcdf1238 Fix various Clippy warnings 2025-04-11 08:32:55 -04:00
df1d0b2629 Remove disconnected clients from the client list 2025-04-01 22:24:58 -04:00
216778ea8b Add more inventory management
Instead of one single slot available in your inventory, all four pages
should be available now. Moving items around should be less buggy, and
it's now possible to discard items.

Items cannot stack still, and when given will always take up the next
free slot.
2025-04-01 21:37:41 -04:00
6d1e9d4e73 Add //gm lv command to set your current level 2025-04-01 20:39:57 -04:00
f1b674320e Send existing actors to any newly connecting client 2025-04-01 20:23:23 -04:00
268c157180 Send actual player data to other clients
Instead of a placeholder actor, you can now see the other player's
correct appearance.
2025-04-01 19:23:12 -04:00
4f8f0d1fe2 Add !spawnclone command, rename !spawnactor
Curiously the spawned clone shows up as a player, despite not using the
NPCSpawn packet. This might be a suitable workaround for the
PlayerSpawn packet being buggy from our side.
2025-04-01 19:15:08 -04:00
b1653f0808 Commit and restore inventory from the World databse 2025-04-01 18:49:42 -04:00
fed21b3617 Make various packet dumping optional, turned off by default
This creates a lot of clutter, and only really interesting to
developers.
2025-04-01 16:58:39 -04:00
822d1f5139 Add GM command to give items, support equipping from inventory
Now with this command and support for *one* inventory slot, you can
now freely equip items to your character for testing.
2025-03-31 23:23:29 -04:00
0c76d847d5 Allow unequipping items, add packet for updating equipped model ids
The unequipped item currently disappears into the aether, but this
works now!
2025-03-31 21:49:12 -04:00
eae962cc85 Multiple fixes attempting to fix packet errors
It doesn't unfortunately, there's still a bunch of errors when decoding
packets. These are all decent fixes though.
2025-03-30 21:42:46 -04:00
caf70ea469 Pass GameData into Zone, stop loading the same zone twice on login 2025-03-30 19:13:24 -04:00