mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-21 07:27: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 => {
|
GameMasterCommandType::ChangeWeather => {
|
||||||
connection.change_weather(*arg0 as u16).await
|
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 => {
|
GameMasterCommandType::ChangeTerritory => {
|
||||||
connection.change_zone(*arg0 as u16).await
|
connection.change_zone(*arg0 as u16).await
|
||||||
}
|
}
|
||||||
GameMasterCommandType::ToggleInvisibility => {
|
GameMasterCommandType::ToggleInvisibility => {
|
||||||
|
connection.player_data.gm_invisible = !connection.player_data.gm_invisible;
|
||||||
connection
|
connection
|
||||||
.actor_control_self(ActorControlSelf {
|
.actor_control_self(ActorControlSelf {
|
||||||
category:
|
category:
|
||||||
ActorControlCategory::ToggleInvisibility {
|
ActorControlCategory::ToggleInvisibility {
|
||||||
invisible: true,
|
invisible: connection.player_data.gm_invisible,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
|
|
|
@ -69,6 +69,11 @@ pub enum ActorControlCategory {
|
||||||
insufficient_gil: u32,
|
insufficient_gil: u32,
|
||||||
aetheryte_id: u32,
|
aetheryte_id: u32,
|
||||||
},
|
},
|
||||||
|
#[brw(magic=0x1Bu16)]
|
||||||
|
Flee {
|
||||||
|
#[brw(pad_before = 2)] // padding
|
||||||
|
speed: u16,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[binrw]
|
#[binrw]
|
||||||
|
|
|
@ -140,6 +140,7 @@ impl Default for ServerZoneIpcSegment {
|
||||||
pub enum GameMasterCommandType {
|
pub enum GameMasterCommandType {
|
||||||
SetLevel = 0x1,
|
SetLevel = 0x1,
|
||||||
ChangeWeather = 0x6,
|
ChangeWeather = 0x6,
|
||||||
|
Speed = 0x9,
|
||||||
ToggleInvisibility = 0xD,
|
ToggleInvisibility = 0xD,
|
||||||
ToggleWireframe = 0x26,
|
ToggleWireframe = 0x26,
|
||||||
ChangeTerritory = 0x58,
|
ChangeTerritory = 0x58,
|
||||||
|
|
|
@ -61,6 +61,7 @@ pub struct PlayerData {
|
||||||
|
|
||||||
pub teleport_query: TeleportQuery,
|
pub teleport_query: TeleportQuery,
|
||||||
pub gm_rank: GameMasterRank,
|
pub gm_rank: GameMasterRank,
|
||||||
|
pub gm_invisible: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Represents a single connection between an instance of the client and the world server
|
/// Represents a single connection between an instance of the client and the world server
|
||||||
|
|
Loading…
Add table
Reference in a new issue