mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 13:57:43 +01:00
Compare commits
No commits in common. "7aa77aa2eb33752bc0d222c62e07e571b30f9eeb" and "e3498f1b9ceb5c9b7aa4d131ca550b99bf735fb2" have entirely different histories.
7aa77aa2eb
...
e3498f1b9c
3 changed files with 6 additions and 7 deletions
|
|
@ -38,7 +38,7 @@ internal sealed class ClientState : IInternalDisposableService, IClientState
|
|||
private readonly ClientStateAddressResolver address;
|
||||
private readonly Hook<EventFramework.Delegates.SetTerritoryTypeId> setupTerritoryTypeHook;
|
||||
private readonly Hook<UIModule.Delegates.HandlePacket> uiModuleHandlePacketHook;
|
||||
private Hook<LogoutCallbackInterface.Delegates.OnLogout> onLogoutHook;
|
||||
private readonly Hook<LogoutCallbackInterface.Delegates.OnLogout> onLogoutHook;
|
||||
|
||||
[ServiceManager.ServiceDependency]
|
||||
private readonly Framework framework = Service<Framework>.Get();
|
||||
|
|
@ -64,12 +64,14 @@ internal sealed class ClientState : IInternalDisposableService, IClientState
|
|||
|
||||
this.setupTerritoryTypeHook = Hook<EventFramework.Delegates.SetTerritoryTypeId>.FromAddress(setTerritoryTypeAddr, this.SetupTerritoryTypeDetour);
|
||||
this.uiModuleHandlePacketHook = Hook<UIModule.Delegates.HandlePacket>.FromAddress((nint)UIModule.StaticVirtualTablePointer->HandlePacket, this.UIModuleHandlePacketDetour);
|
||||
this.onLogoutHook = Hook<LogoutCallbackInterface.Delegates.OnLogout>.FromAddress((nint)LogoutCallbackInterface.StaticVirtualTablePointer->OnLogout, this.OnLogoutDetour);
|
||||
|
||||
this.framework.Update += this.FrameworkOnOnUpdateEvent;
|
||||
this.networkHandlers.CfPop += this.NetworkHandlersOnCfPop;
|
||||
|
||||
this.setupTerritoryTypeHook.Enable();
|
||||
this.uiModuleHandlePacketHook.Enable();
|
||||
this.onLogoutHook.Enable();
|
||||
|
||||
this.framework.RunOnTick(this.Setup);
|
||||
}
|
||||
|
|
@ -182,9 +184,6 @@ internal sealed class ClientState : IInternalDisposableService, IClientState
|
|||
|
||||
private unsafe void Setup()
|
||||
{
|
||||
this.onLogoutHook = Hook<LogoutCallbackInterface.Delegates.OnLogout>.FromAddress((nint)AgentLobby.Instance()->LogoutCallbackInterface.VirtualTable->OnLogout, this.OnLogoutDetour);
|
||||
this.onLogoutHook.Enable();
|
||||
|
||||
this.TerritoryType = (ushort)GameMain.Instance()->CurrentTerritoryTypeId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -415,13 +415,13 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui
|
|||
|
||||
if (!terminatedSender.SequenceEqual(possiblyModifiedSenderData))
|
||||
{
|
||||
Log.Verbose($"HandlePrintMessageDetour Sender modified: {new ReadOnlySeStringSpan(terminatedSender).ToMacroString()} -> {new ReadOnlySeStringSpan(possiblyModifiedSenderData).ToMacroString()}");
|
||||
Log.Verbose($"HandlePrintMessageDetour Sender modified: {SeString.Parse(terminatedSender)} -> {parsedSender}");
|
||||
sender->SetString(possiblyModifiedSenderData);
|
||||
}
|
||||
|
||||
if (!terminatedMessage.SequenceEqual(possiblyModifiedMessageData))
|
||||
{
|
||||
Log.Verbose($"HandlePrintMessageDetour Message modified: {new ReadOnlySeStringSpan(terminatedMessage).ToMacroString()} -> {new ReadOnlySeStringSpan(possiblyModifiedMessageData).ToMacroString()}");
|
||||
Log.Verbose($"HandlePrintMessageDetour Message modified: {SeString.Parse(terminatedMessage)} -> {parsedMessage}");
|
||||
message->SetString(possiblyModifiedMessageData);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 834d3cc94082fd812cf6cda8da217b22e4f9f15d
|
||||
Subproject commit 4fbd01f1b1c4ac740f2b6e64ad5efcad10d227a0
|
||||
Loading…
Add table
Add a link
Reference in a new issue