fix: add some instance checks
This commit is contained in:
@@ -33,6 +33,9 @@ internal unsafe class GameFunctions : IDisposable {
|
||||
[Signature("E8 ?? ?? ?? ?? EB 20 48 8B 46 28", Fallibility = Fallibility.Fallible)]
|
||||
private readonly delegate* unmanaged<AgentInterface*, uint, void> _openAchievement = null!;
|
||||
|
||||
[Signature("E8 ?? ?? ?? ?? 84 C0 49 8B DE", Fallibility = Fallibility.Fallible)]
|
||||
private readonly delegate* unmanaged<byte> _inInstance = null!;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Hooks
|
||||
@@ -255,6 +258,14 @@ internal unsafe class GameFunctions : IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
internal bool IsInInstance() {
|
||||
if (this._inInstance == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this._inInstance() != 0;
|
||||
}
|
||||
|
||||
internal void ClickNoviceNetworkButton() {
|
||||
var agent = Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ChatLog);
|
||||
// case 3
|
||||
|
||||
Reference in New Issue
Block a user