mirror of
https://github.com/redstrate/Auracite.git
synced 2025-04-19 17:36:50 +00:00
Extract voice id from the game, add to chardat file
This commit is contained in:
parent
d7a30318cd
commit
70002bbe7a
5 changed files with 17 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||
|
||||
namespace Auracite;
|
||||
|
||||
|
@ -16,6 +17,13 @@ public class MiscStep : IStep
|
|||
Plugin.package.is_novice = PlayerState.Instance()->IsNovice();
|
||||
Plugin.package.is_returner = PlayerState.Instance()->IsReturner();
|
||||
Plugin.package.player_commendations = PlayerState.Instance()->PlayerCommendations;
|
||||
|
||||
var localPlayer = Plugin.ClientState.LocalPlayer;
|
||||
if (localPlayer != null)
|
||||
{
|
||||
var gameObject = (Character*)localPlayer.Address;
|
||||
Plugin.package.voice = gameObject->Vfx.VoiceId;
|
||||
}
|
||||
}
|
||||
|
||||
Completed?.Invoke();
|
||||
|
@ -34,4 +42,4 @@ public class MiscStep : IStep
|
|||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ public sealed class Plugin : IDalamudPlugin
|
|||
public string? portrait_frame;
|
||||
public string? plate_frame;
|
||||
public string? accent;
|
||||
|
||||
public int voice;
|
||||
}
|
||||
|
||||
public static Package? package;
|
||||
|
@ -131,4 +133,4 @@ public sealed class Plugin : IDalamudPlugin
|
|||
CurrentStep.Completed += NextStep;
|
||||
CurrentStep.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,6 +77,8 @@ pub struct CharacterData {
|
|||
pub plate_classjob_level: Option<i32>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub search_comment: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub voice: Option<i32>,
|
||||
|
||||
#[serde(skip)]
|
||||
pub face_url: String,
|
||||
|
|
|
@ -210,6 +210,7 @@ pub async fn archive_character(
|
|||
char_data.plate_classjob = Some(package.plate_class_job);
|
||||
char_data.plate_classjob_level = Some(package.plate_class_job_level);
|
||||
char_data.search_comment = Some(package.search_comment);
|
||||
char_data.voice = Some(package.voice);
|
||||
|
||||
zip.start_file("plate-portrait.png", options)?;
|
||||
zip.write_all(
|
||||
|
@ -330,7 +331,7 @@ pub async fn archive_character(
|
|||
bust: package.bust_size as u8,
|
||||
face_paint: package.facepaint as u8,
|
||||
face_paint_color: package.facepaint_color as u8,
|
||||
voice: 0, // TODO: need to get from game
|
||||
voice: package.voice as u8,
|
||||
},
|
||||
timestamp,
|
||||
comment: "Generated by Auracite".to_string(),
|
||||
|
|
|
@ -23,6 +23,7 @@ pub struct Package {
|
|||
pub portrait_frame: Option<String>,
|
||||
pub plate_frame: Option<String>,
|
||||
pub accent: Option<String>,
|
||||
pub voice: i32,
|
||||
|
||||
// Appearance
|
||||
pub race: i32,
|
||||
|
|
Loading…
Add table
Reference in a new issue