fix: use correct agent

This commit is contained in:
Anna 2022-08-25 22:25:07 -04:00
parent 76e97d5d0a
commit e5d5f6d136
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0
2 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,10 @@ internal unsafe class GameFunctions {
[Signature("48 8D 0D ?? ?? ?? ?? BD ?? ?? ?? ?? E8 ?? ?? ?? ?? 84 C0 75", ScanType = ScanType.StaticAddress)]
private readonly IntPtr _titleList;
internal GameFunctions(Plugin plugin) {
[Signature("BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 41 8B 4D 08", Offset = 1)]
private uint _agentId;
internal GameFunctions() {
SignatureHelper.Initialise(this);
}
@ -39,7 +42,7 @@ internal unsafe class GameFunctions {
}
internal bool SetTitle(uint titleId) {
var agent = Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId((AgentId) 200);
var agent = Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId((AgentId) this._agentId);
if (agent == null) {
return false;
}

View File

@ -29,7 +29,7 @@ public class Plugin : IDalamudPlugin {
public Plugin() {
this.Config = this.Interface!.GetPluginConfig() as Configuration ?? new Configuration();
this.Functions = new GameFunctions(this);
this.Functions = new GameFunctions();
this.Ui = new PluginUi(this);
this.Commands = new Commands(this);
}