mirror of
https://github.com/redstrate/Auracite.git
synced 2025-04-21 20:27:46 +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;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||||
|
|
||||||
namespace Auracite;
|
namespace Auracite;
|
||||||
|
|
||||||
|
@ -16,6 +17,13 @@ public class MiscStep : IStep
|
||||||
Plugin.package.is_novice = PlayerState.Instance()->IsNovice();
|
Plugin.package.is_novice = PlayerState.Instance()->IsNovice();
|
||||||
Plugin.package.is_returner = PlayerState.Instance()->IsReturner();
|
Plugin.package.is_returner = PlayerState.Instance()->IsReturner();
|
||||||
Plugin.package.player_commendations = PlayerState.Instance()->PlayerCommendations;
|
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();
|
Completed?.Invoke();
|
||||||
|
|
|
@ -73,6 +73,8 @@ public sealed class Plugin : IDalamudPlugin
|
||||||
public string? portrait_frame;
|
public string? portrait_frame;
|
||||||
public string? plate_frame;
|
public string? plate_frame;
|
||||||
public string? accent;
|
public string? accent;
|
||||||
|
|
||||||
|
public int voice;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Package? package;
|
public static Package? package;
|
||||||
|
|
|
@ -77,6 +77,8 @@ pub struct CharacterData {
|
||||||
pub plate_classjob_level: Option<i32>,
|
pub plate_classjob_level: Option<i32>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub search_comment: Option<String>,
|
pub search_comment: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub voice: Option<i32>,
|
||||||
|
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
pub face_url: String,
|
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 = Some(package.plate_class_job);
|
||||||
char_data.plate_classjob_level = Some(package.plate_class_job_level);
|
char_data.plate_classjob_level = Some(package.plate_class_job_level);
|
||||||
char_data.search_comment = Some(package.search_comment);
|
char_data.search_comment = Some(package.search_comment);
|
||||||
|
char_data.voice = Some(package.voice);
|
||||||
|
|
||||||
zip.start_file("plate-portrait.png", options)?;
|
zip.start_file("plate-portrait.png", options)?;
|
||||||
zip.write_all(
|
zip.write_all(
|
||||||
|
@ -330,7 +331,7 @@ pub async fn archive_character(
|
||||||
bust: package.bust_size as u8,
|
bust: package.bust_size as u8,
|
||||||
face_paint: package.facepaint as u8,
|
face_paint: package.facepaint as u8,
|
||||||
face_paint_color: package.facepaint_color as u8,
|
face_paint_color: package.facepaint_color as u8,
|
||||||
voice: 0, // TODO: need to get from game
|
voice: package.voice as u8,
|
||||||
},
|
},
|
||||||
timestamp,
|
timestamp,
|
||||||
comment: "Generated by Auracite".to_string(),
|
comment: "Generated by Auracite".to_string(),
|
||||||
|
|
|
@ -23,6 +23,7 @@ pub struct Package {
|
||||||
pub portrait_frame: Option<String>,
|
pub portrait_frame: Option<String>,
|
||||||
pub plate_frame: Option<String>,
|
pub plate_frame: Option<String>,
|
||||||
pub accent: Option<String>,
|
pub accent: Option<String>,
|
||||||
|
pub voice: i32,
|
||||||
|
|
||||||
// Appearance
|
// Appearance
|
||||||
pub race: i32,
|
pub race: i32,
|
||||||
|
|
Loading…
Add table
Reference in a new issue