refactor: update offsets for 5.5

This commit is contained in:
Anna 2021-04-15 16:38:18 -04:00
parent dac91cb5ee
commit c666b2f07f
2 changed files with 14 additions and 5 deletions

View File

@ -18,15 +18,24 @@ namespace HUD_Manager {
private ClassJob? _job; private ClassJob? _job;
internal static byte GetStatus(Actor actor) { internal static byte GetStatus(Actor actor) {
return Marshal.ReadByte(actor.Address + 0x1980); // Updated: 5.5
// 40 57 48 83 EC 70 48 8B F9 E8 ?? ?? ?? ?? 81 BF ?? ?? ?? ?? ?? ?? ?? ??
const int offset = 0x19A0;
return Marshal.ReadByte(actor.Address + offset);
} }
internal static byte GetOnlineStatus(Actor actor) { internal static byte GetOnlineStatus(Actor actor) {
return Marshal.ReadByte(actor.Address + 0x195F); // Updated: 5.5
// E8 ?? ?? ?? ?? 48 85 C0 75 54
const int offset = 0x197F;
return Marshal.ReadByte(actor.Address + offset);
} }
internal static byte GetBardThing(Actor actor) { internal static byte GetBardThing(Actor actor) {
return Marshal.ReadByte(actor.Address + 0x195C); // Updated: 5.5
// E8 ?? ?? ?? ?? 48 8B CB E8 ?? ?? ?? ?? 0F B6 43 50
const int offset = 0x197C;
return Marshal.ReadByte(actor.Address + offset);
} }
public Statuses(Plugin plugin) { public Statuses(Plugin plugin) {

View File

@ -84,7 +84,7 @@ namespace HUD_Manager.Ui.Editor.Tabs {
continue; continue;
} }
void DrawSettingName(string name) { static void DrawSettingName(string name) {
ImGui.TextUnformatted(name); ImGui.TextUnformatted(name);
ImGui.TableNextColumn(); ImGui.TableNextColumn();
} }
@ -327,7 +327,7 @@ namespace HUD_Manager.Ui.Editor.Tabs {
ImGui.TableNextRow(); ImGui.TableNextRow();
} }
if (kind == ElementKind.StatusInfoEnhancements || kind == ElementKind.StatusInfoEnfeeblements || kind == ElementKind.StatusInfoOther) { if (kind is ElementKind.StatusInfoEnhancements or ElementKind.StatusInfoEnfeeblements or ElementKind.StatusInfoOther) {
var statusOpts = new StatusInfoOptions(kind, element.Options); var statusOpts = new StatusInfoOptions(kind, element.Options);
ImGui.TableNextColumn(); ImGui.TableNextColumn();