99using FFXIVClientStructs . FFXIV . Client . System . String ;
1010using FFXIVClientStructs . FFXIV . Client . UI ;
1111
12- namespace PrincessRTFM . WoLua . Game ;
12+ namespace VariableVixen . WoLua . Game ;
1313
1414internal class ServerChat {
1515 private static class Signatures {
@@ -18,8 +18,8 @@ private static class Signatures {
1818 }
1919
2020
21- private delegate void ProcessChatBoxDelegate ( IntPtr uiModule , IntPtr message , IntPtr unused , byte a4 ) ;
22- private readonly unsafe delegate * unmanaged< Utf8String * , int , IntPtr , void > sanitiseString = null ! ;
21+ private delegate void ProcessChatBoxDelegate ( nint uiModule , nint message , nint unused , byte a4 ) ;
22+ private readonly unsafe delegate * unmanaged< Utf8String * , int , nint , void > sanitiseString = null ! ;
2323
2424 private ProcessChatBoxDelegate ? processChatBox { get ; }
2525
@@ -33,7 +33,7 @@ internal unsafe ServerChat(ISigScanner scanner) {
3333 }
3434
3535 if ( scanner . TryScanText ( Signatures . SanitiseString , out nint sanitisePtr ) ) {
36- this . sanitiseString = ( delegate * unmanaged< Utf8String * , int , IntPtr , void > ) sanitisePtr ;
36+ this . sanitiseString = ( delegate * unmanaged< Utf8String * , int , nint , void > ) sanitisePtr ;
3737 Service . Log ? . Information ( "Found signature for chat sanitisation" ) ;
3838 }
3939 else {
@@ -53,7 +53,7 @@ public unsafe void SendMessageUnsafe(byte[] message) {
5353 nint mem1 = Marshal . AllocHGlobal ( 400 ) ;
5454 Marshal . StructureToPtr ( payload , mem1 , false ) ;
5555
56- this . processChatBox ( ( IntPtr ) uiModule , mem1 , IntPtr . Zero , 0 ) ;
56+ this . processChatBox ( ( nint ) uiModule , mem1 , nint . Zero , 0 ) ;
5757
5858 Marshal . FreeHGlobal ( mem1 ) ;
5959 }
@@ -78,7 +78,7 @@ public unsafe string SanitiseText(string text) {
7878
7979 Utf8String * uText = Utf8String . FromString ( text ) ;
8080
81- this . sanitiseString ( uText , 0x27F , IntPtr . Zero ) ;
81+ this . sanitiseString ( uText , 0x27F , nint . Zero ) ;
8282 string sanitised = uText ->ToString ( ) ;
8383
8484 uText ->Dtor ( ) ;
@@ -92,7 +92,7 @@ public unsafe string SanitiseText(string text) {
9292 [ StructLayout ( LayoutKind . Explicit ) ]
9393 private readonly struct ChatPayload : IDisposable {
9494 [ FieldOffset ( 0 ) ]
95- private readonly IntPtr textPtr ;
95+ private readonly nint textPtr ;
9696
9797 [ FieldOffset ( 16 ) ]
9898 private readonly ulong textLen ;
0 commit comments