From 121415b163c554e6f8aad396fd5f59c2cb14c626 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 1 Apr 2025 21:53:10 -0400 Subject: [PATCH] Add !classjob debug command to change your class/job This is the workaround for lack of a proper class/job switch when equipping different weapons. --- USAGE.md | 1 + src/world/chat_handler.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/USAGE.md b/USAGE.md index 02992eb..e175926 100644 --- a/USAGE.md +++ b/USAGE.md @@ -93,6 +93,7 @@ These special debug commands start with `!` and are custom to Kawari. * Territory `182`, Event `1245187` plays the Ul'dah opening sequence * Territory `183`, Event `1245186` plays the Gridania opening sequence * `!spawnclone`: Spawn a clone of yourself +* `!classjob `: Changes to another class/job ### GM commands diff --git a/src/world/chat_handler.rs b/src/world/chat_handler.rs index db38d54..6246f80 100644 --- a/src/world/chat_handler.rs +++ b/src/world/chat_handler.rs @@ -321,7 +321,6 @@ impl ChatHandler { } "!spawnclone" => { // spawn another one of us - let player = &connection.player_data; let mut common = connection @@ -348,6 +347,12 @@ impl ChatHandler { }) .await; } + "!classjob" => { + let parts: Vec<&str> = chat_message.message.split(' ').collect(); + + connection.player_data.classjob_id = parts[1].parse::().unwrap(); + connection.update_class_info().await; + } _ => tracing::info!("Unrecognized debug command!"), } }