1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00

Send your character's actual levels during setup

This fixes their display in the Character window. Sometimes the display
is a bit bugged, but there's not much I can do about that right now.
This commit is contained in:
Joshua Goins 2025-06-21 11:50:09 -04:00
parent d04a2cb9c1
commit d821c838cb
2 changed files with 12 additions and 4 deletions

View file

@ -278,8 +278,7 @@ async fn client_loop(
timestamp: timestamp_secs(),
data: ServerZoneIpcData::PlayerStatus(PlayerStatus {
content_id: connection.player_data.content_id,
exp: [10000; 32],
levels: [100; 32],
exp: [0; 32],
name: chara_details.name,
char_id: connection.player_data.actor_id,
race: chara_details.chara_make.customize.race,
@ -290,6 +289,9 @@ async fn client_loop(
as u8,
nameday_day: chara_details.chara_make.birth_day as u8,
deity: chara_details.chara_make.guardian as u8,
current_class: connection.player_data.classjob_id,
current_job: connection.player_data.classjob_id,
levels: connection.player_data.classjob_levels.map(|x| x as u16),
..Default::default()
}),
..Default::default()

View file

@ -189,8 +189,14 @@ mod tests {
assert_eq!(player_setup.race, 1);
assert_eq!(player_setup.tribe, 2);
assert_eq!(player_setup.expansion, 5);
assert_eq!(player_setup.current_job, 1); // adventurer
assert_eq!(player_setup.current_job, 1); // gladiator
assert_eq!(player_setup.current_class, 1); // ditto
assert_eq!(player_setup.levels[1], 1); // adventurer
assert_eq!(
player_setup.levels,
[
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0
]
); // only GLA
}
}