@@ -91,7 +91,7 @@ sealed class WorldStateGameSync : IDisposable
9191 private unsafe delegate void ApplyKnockbackDelegate ( Character * thisPtr , float a2 , float a3 , float a4 , byte a5 , int a6 ) ;
9292 private readonly Hook < ApplyKnockbackDelegate > _applyKnockbackHook ;
9393
94- private unsafe delegate void InventoryAckDelegate ( uint a1 , void * a2 ) ;
94+ private unsafe delegate void InventoryAckDelegate ( InventoryManager * mgr , uint a1 , void * a2 ) ;
9595 private readonly Hook < InventoryAckDelegate > _inventoryAckHook ;
9696
9797 private unsafe delegate void ProcessPacketPlayActionTimelineSync ( Network . ServerIPC . PlayActionTimelineSync * data ) ;
@@ -188,7 +188,7 @@ public unsafe WorldStateGameSync(WorldState ws, ActionManagerEx amex)
188188 // Service.Log($"[WSG] ApplyKnockback address = {_applyKnockbackHook.Address:X}");
189189 //}
190190
191- _inventoryAckHook = Service . Hook . HookFromSignature < InventoryAckDelegate > ( "E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 48 8D 57 10 41 8B CE E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 48 8B D7 " , InventoryAckDetour ) ;
191+ _inventoryAckHook = Service . Hook . HookFromSignature < InventoryAckDelegate > ( "48 89 5C 24 ?? 57 48 83 EC 30 48 8B 05 ?? ?? ?? ?? 48 8B D9 41 0F B6 50 ?? " , InventoryAckDetour ) ;
192192 _inventoryAckHook . Enable ( ) ;
193193 Service . Log ( $ "[WSG] InventoryAck address = { _inventoryAckHook . Address : X} ") ;
194194
@@ -1147,15 +1147,13 @@ private unsafe void ApplyKnockbackDetour(Character* thisPtr, float a2, float a3,
11471147 private unsafe byte ProcessLegacyMapEffectDetour( EventFramework* fwk, EventId eventId, byte seq, byte unk, void * data, ulong length)
11481148 {
11491149 var res = _processLegacyMapEffectHook. Original( fwk, eventId, seq, unk, data, length) ;
1150-
11511150 _globalOps. Add( new WorldState. OpLegacyMapEffect( seq, unk, new Span< byte > ( data, ( int ) length) . ToArray( ) ) ) ;
1152-
11531151 return res;
11541152 }
11551153
1156- private unsafe void InventoryAckDetour( uint a1, void * a2)
1154+ private unsafe void InventoryAckDetour( InventoryManager * mgr , uint a1, void * a2)
11571155 {
1158- _inventoryAckHook. Original( a1, a2) ;
1156+ _inventoryAckHook. Original( mgr , a1, a2) ;
11591157 _needInventoryUpdate = true;
11601158 }
11611159
0 commit comments