From 731788904d9e3681d6dcf6101e255c58023028c7 Mon Sep 17 00:00:00 2001 From: JacobPersi Date: Fri, 11 Sep 2020 12:51:57 -0400 Subject: [PATCH 1/2] Allow the player to inteact with entities (chests, doors, portals, etc) ingame while item-display is toggled. --- D2Stats.au3 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/D2Stats.au3 b/D2Stats.au3 index 549b2d6..fed62b2 100644 --- a/D2Stats.au3 +++ b/D2Stats.au3 @@ -1670,6 +1670,30 @@ func EjectDropFilter($hDropFilter) return $iRet endfunc +#cs +D2Client.dll+594A1 - C7 05 F4C2BC6F 00000000 - mov [D2Client.dll+11C2F4],00000000 { (0),0 } +-> +D2Client.dll+594A1 - 90 - nop +D2Client.dll+594A2 - 90 - nop +D2Client.dll+594A3 - 90 - nop +D2Client.dll+594A4 - 90 - nop +D2Client.dll+594A5 - 90 - nop +D2Client.dll+594A6 - 90 - nop +D2Client.dll+594A7 - 90 - nop +D2Client.dll+594A8 - 90 - nop +D2Client.dll+594A9 - 90 - nop +D2Client.dll+594AA - 90 - nop +#ce + +func IsEntityInteractionOverrideEnabled() + return _MemoryRead($g_hD2Client + 0x594A1, $g_ahD2Handle, "byte") == 0x90 +endfunc + +func ToggleEntityInteractionOverride() + local $sWrite = IsMouseFixEnabled() ? "0xC705" & SwapEndian($g_hD2Client + 0x11C2F4) & "00000000" : "0x90909090909090909090" + _MemoryWrite($g_hD2Client + 0x594A1, $g_ahD2Handle, $sWrite, "byte[10]") +endfunc + #cs D2Client.dll+42AE1 - A3 * - mov [D2Client.dll+11C3DC],eax { [00000000] } D2Client.dll+42AE6 - A3 * - mov [D2Client.dll+11C3E0],eax { [00000000] } @@ -1749,6 +1773,7 @@ func ToggleShowItems() _MemoryWrite($g_hD2Client + 0x3B2E1, $g_ahD2Handle, $sWrite3, "byte[6]") _MemoryWrite($g_hD2Client + 0xFADB4, $g_ahD2Handle, 0) + ToggleEntityInteractionOverride() PrintString($bRestore ? "Hold to show items." : "Toggle to show items.", $ePrintBlue) endfunc From d6d66033e730a3f8e562102a54c6b4602bc54274 Mon Sep 17 00:00:00 2001 From: Jacob Persi Date: Sat, 17 Oct 2020 14:30:07 -0400 Subject: [PATCH 2/2] Update D2Stats.au3 Co-authored-by: wjchen <21122311+wjchen-vlsi@users.noreply.github.com> --- D2Stats.au3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/D2Stats.au3 b/D2Stats.au3 index fed62b2..30209ff 100644 --- a/D2Stats.au3 +++ b/D2Stats.au3 @@ -1690,7 +1690,7 @@ func IsEntityInteractionOverrideEnabled() endfunc func ToggleEntityInteractionOverride() - local $sWrite = IsMouseFixEnabled() ? "0xC705" & SwapEndian($g_hD2Client + 0x11C2F4) & "00000000" : "0x90909090909090909090" + local $sWrite = IsEntityInteractionOverrideEnabled() ? "0xC705" & SwapEndian($g_hD2Client + 0x11C2F4) & "00000000" : "0x90909090909090909090" _MemoryWrite($g_hD2Client + 0x594A1, $g_ahD2Handle, $sWrite, "byte[10]") endfunc