Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions core/src/ipc/zone/server/actor_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,15 @@ pub enum ActorControlCategory {
unk4: u32,
},

// TODO: There's a lot more spectator-related ACs
/// Initializes the SpectatorManager on the client.
#[brw(magic = 1600u32)]
InitializeSpectatorManager { row_id: u32, unk2: u32, unk3: u32 },

/// This actually shows the Spectator UI.
#[brw(magic = 1607u32)]
ShowSpectatorUI {},

/// Calls some method in PvPProfile, unsure what it does yet.
#[brw(magic = 1610u32)]
UnkPvPProfileRelated {
Expand Down
5 changes: 5 additions & 0 deletions core/src/ipc/zone/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,11 @@ pub enum ServerZoneIpcData {
OccultCrescentSetup {
unk1: [u8; 160],
},
SpectatorList {
object_ids: [ObjectId; 8],
#[brw(pad_after = 3)] // padding
unk1: u8,
},
}

#[cfg(test)]
Expand Down
4 changes: 4 additions & 0 deletions resources/data/opcodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,10 @@ ServerZoneIpcType:
comment: Pops open the custom UI for Occult Crescent among other things. Unsure if used for other public content.
opcode: 690
size: 160
- name: SpectatorList
comment: When sent, populates the spectator list for Crystalline Conflict matches. This is visible in the Duty Menu and the Spectator UI.
opcode: 944
size: 36
ClientZoneIpcType:
- name: InitRequest
comment: Sent by the client when they successfully initialize with the server, and they need several bits of information (e.g. what zone to load.)
Expand Down
22 changes: 20 additions & 2 deletions servers/world/src/zone_connection/zone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::{
};
use kawari::{
common::{
FestivalId, HandlerId, HandlerType, HouseId, HouseUnit, HousingFlag, LandData, Position,
PublicContentType, WarpType, timestamp_secs,
FestivalId, HandlerId, HandlerType, HouseId, HouseUnit, HousingFlag, LandData, ObjectId,
Position, PublicContentType, WarpType, timestamp_secs,
},
config::get_config,
constants::OBFUSCATION_ENABLED_MODE,
Expand Down Expand Up @@ -749,5 +749,23 @@ impl ZoneConnection {
.await;
}
}

// TODO: temporary, don't send in all instances
self.send_ipc_self(ServerZoneIpcSegment::new(
ServerZoneIpcData::SpectatorList {
object_ids: [
self.player_data.character.actor_id,
ObjectId::default(),
ObjectId::default(),
ObjectId::default(),
ObjectId::default(),
ObjectId::default(),
ObjectId::default(),
ObjectId::default(),
],
unk1: 1,
},
))
.await;
}
}
Loading