fix: use correct agent
This commit is contained in:
parent
a9c900998b
commit
1012894eba
|
@ -18,7 +18,10 @@ internal unsafe class GameFunctions {
|
||||||
[Signature("48 8D 0D ?? ?? ?? ?? BD ?? ?? ?? ?? E8 ?? ?? ?? ?? 84 C0 75", ScanType = ScanType.StaticAddress)]
|
[Signature("48 8D 0D ?? ?? ?? ?? BD ?? ?? ?? ?? E8 ?? ?? ?? ?? 84 C0 75", ScanType = ScanType.StaticAddress)]
|
||||||
private readonly IntPtr _titleList;
|
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);
|
SignatureHelper.Initialise(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +42,7 @@ internal unsafe class GameFunctions {
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool SetTitle(uint titleId) {
|
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) {
|
if (agent == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class Plugin : IDalamudPlugin {
|
||||||
public Plugin() {
|
public Plugin() {
|
||||||
this.Config = this.Interface!.GetPluginConfig() as Configuration ?? new Configuration();
|
this.Config = this.Interface!.GetPluginConfig() as Configuration ?? new Configuration();
|
||||||
|
|
||||||
this.Functions = new GameFunctions(this);
|
this.Functions = new GameFunctions();
|
||||||
this.Ui = new PluginUi(this);
|
this.Ui = new PluginUi(this);
|
||||||
this.Commands = new Commands(this);
|
this.Commands = new Commands(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue