mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-20 23:17:45 +00:00
Implement GM speed command, and make GM invis command actually toggle invis status
This commit is contained in:
parent
749b499db6
commit
1edcdf3de6
4 changed files with 20 additions and 1 deletions
|
@ -568,15 +568,27 @@ async fn client_loop(
|
|||
GameMasterCommandType::ChangeWeather => {
|
||||
connection.change_weather(*arg0 as u16).await
|
||||
}
|
||||
GameMasterCommandType::Speed => {
|
||||
// TODO: Maybe allow setting the speed of a targeted player too?
|
||||
connection
|
||||
.actor_control_self(ActorControlSelf {
|
||||
category:
|
||||
ActorControlCategory::Flee {
|
||||
speed: *arg0 as u16,
|
||||
},
|
||||
})
|
||||
.await
|
||||
}
|
||||
GameMasterCommandType::ChangeTerritory => {
|
||||
connection.change_zone(*arg0 as u16).await
|
||||
}
|
||||
GameMasterCommandType::ToggleInvisibility => {
|
||||
connection.player_data.gm_invisible = !connection.player_data.gm_invisible;
|
||||
connection
|
||||
.actor_control_self(ActorControlSelf {
|
||||
category:
|
||||
ActorControlCategory::ToggleInvisibility {
|
||||
invisible: true,
|
||||
invisible: connection.player_data.gm_invisible,
|
||||
},
|
||||
})
|
||||
.await
|
||||
|
|
|
@ -69,6 +69,11 @@ pub enum ActorControlCategory {
|
|||
insufficient_gil: u32,
|
||||
aetheryte_id: u32,
|
||||
},
|
||||
#[brw(magic=0x1Bu16)]
|
||||
Flee {
|
||||
#[brw(pad_before = 2)] // padding
|
||||
speed: u16,
|
||||
}
|
||||
}
|
||||
|
||||
#[binrw]
|
||||
|
|
|
@ -140,6 +140,7 @@ impl Default for ServerZoneIpcSegment {
|
|||
pub enum GameMasterCommandType {
|
||||
SetLevel = 0x1,
|
||||
ChangeWeather = 0x6,
|
||||
Speed = 0x9,
|
||||
ToggleInvisibility = 0xD,
|
||||
ToggleWireframe = 0x26,
|
||||
ChangeTerritory = 0x58,
|
||||
|
|
|
@ -61,6 +61,7 @@ pub struct PlayerData {
|
|||
|
||||
pub teleport_query: TeleportQuery,
|
||||
pub gm_rank: GameMasterRank,
|
||||
pub gm_invisible: bool,
|
||||
}
|
||||
|
||||
/// Represents a single connection between an instance of the client and the world server
|
||||
|
|
Loading…
Add table
Reference in a new issue