Skip to content

Commit

Permalink
added: Ignore Pod Materials
Browse files Browse the repository at this point in the history
  • Loading branch information
Asiern committed Feb 6, 2021
1 parent 4ea79ba commit c761ab6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/NieRAutomataGadget/NierHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,18 @@ void NieRHook::IgnoreUpgradeMaterials(bool enabled)
HANDLE pHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, this->_pID);
if (enabled)
{ //Enable Ignore Upgrade Materials
//Set memory at offset 0x5EE5CE = 90 90 90
//Set memory at offset 0x5EE5CE = 90 90 90 to disable Weapon
Nop((BYTE*)(this->_baseAddress + 0x5EE5CE), 3, pHandle);
//Set memory at offset 0x5EE7F0 = 90 90 90 to disable Pod
Nop((BYTE*)(this->_baseAddress + 0x5EE7F0), 3, pHandle);
}
else
{ //Disable Ignore Upgrade Materials
//Set memory at offset 0x5EE5CE = previous values
Patch((BYTE*)(this->_baseAddress + 0x5EE5CE), (BYTE*)"\x41\x3B\xC2\x7C\x31", 5, pHandle);
//Set memory at offset 0x5EE7F0 = previous values
Patch((BYTE*)(this->_baseAddress + 0x5EE7F0), (BYTE*)"\x83\xFB\xFF", 3, pHandle);

}
CloseHandle(pHandle);
}
Expand Down

0 comments on commit c761ab6

Please sign in to comment.