1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-17 10:47:44 +00:00

Rename GilShopRelatedUnk to UpdateInventorySlot

-This now matches Karashiiro/FFXIVOpcodes.
This commit is contained in:
The Dax 2025-07-13 14:53:37 -04:00 committed by Joshua Goins
parent eb9d08866e
commit ba1a92c9bc
4 changed files with 10 additions and 10 deletions

View file

@ -301,7 +301,7 @@
"size": 32
},
{
"name": "GilShopRelatedUnk",
"name": "UpdateInventorySlot",
"opcode": 435,
"size": 64
}

View file

@ -917,12 +917,12 @@ async fn client_loop(
//connection.player_data.inventory.add_in_next_free_slot(Item::new(*item_quantity, item_info.id));
connection.player_data.inventory.add_in_slot(Item::new(*item_quantity, item_info.id), &ContainerType::Inventory0, 0);
connection.send_gilshop_unk(0x07D0, 0, connection.player_data.inventory.currency.gil.quantity, 1).await;
connection.send_gilshop_item_update(0x07D0, 0, connection.player_data.inventory.currency.gil.quantity, 1).await;
connection.send_inventory_ack(u32::MAX, INVENTORY_ACTION_ACK_SHOP as u16).await;
// TODO: This is hardcoded to the first item slot in the inventory, fix this
connection.send_gilshop_unk(0, 0, *item_quantity, item_info.id).await;
connection.send_gilshop_item_update(0, 0, *item_quantity, item_info.id).await;
connection.send_gilshop_ack(*event_id, item_info.id, *item_quantity, item_info.price_mid).await;
let target_id = connection.player_data.target_actorid;

View file

@ -497,8 +497,8 @@ pub enum ServerZoneIpcData {
total_sale_cost: u32,
},
#[brw(little)]
#[br(pre_assert(*magic == ServerZoneIpcType::GilShopRelatedUnk))]
GilShopRelatedUnk {
#[br(pre_assert(*magic == ServerZoneIpcType::UpdateInventorySlot))]
UpdateInventorySlot {
/// Starts from zero and increases by one for each of these packets during this gameplay session
sequence: u32,
#[brw(pad_before = 4)]
@ -1013,8 +1013,8 @@ mod tests {
},
),
(
ServerZoneIpcType::GilShopRelatedUnk,
ServerZoneIpcData::GilShopRelatedUnk {
ServerZoneIpcType::UpdateInventorySlot,
ServerZoneIpcData::UpdateInventorySlot {
sequence: 0,
unk1_and_dst_storage_id: 0,
unk2_and_dst_slot: 0,

View file

@ -1027,7 +1027,7 @@ impl ZoneConnection {
.await;
}
pub async fn send_gilshop_unk(
pub async fn send_gilshop_item_update(
&mut self,
unk1_and_dst_storage_id: u16,
unk2_and_dst_slot: u16,
@ -1035,9 +1035,9 @@ impl ZoneConnection {
unk3_and_item_id: u32,
) {
let ipc = ServerZoneIpcSegment {
op_code: ServerZoneIpcType::GilShopRelatedUnk,
op_code: ServerZoneIpcType::UpdateInventorySlot,
timestamp: timestamp_secs(),
data: ServerZoneIpcData::GilShopRelatedUnk {
data: ServerZoneIpcData::UpdateInventorySlot {
sequence: self.player_data.shop_sequence,
unk1_and_dst_storage_id,
unk2_and_dst_slot,