Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Update Pet Desummon fix (#314)
Browse files Browse the repository at this point in the history
Update Pet Desummon fix. Internal ID for hotkeys have shifted in this client revision.

Co-authored-by: cursey <[email protected]>
  • Loading branch information
kohupallintrax and cursey authored Sep 8, 2023
1 parent 49c26dc commit 8c23aaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Kanan/PetDesummonFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ void PetDesummonFix::PetHotkeyHook(LONGLONG param1, INT param2) {
// param 2 handles the ID of the hotkey pressed.
// We check to see if we are using a summon hotkey - if so we have modified code to run.
switch (param2) {
case 0x6A: // Summon pet in slot 1 hotkey - rest are just 2 through 10
case 0x6B:
case 0x6B: // Summon pet in slot 1 hotkey - rest are just 2 through 10
case 0x6C:
case 0x6D:
case 0x6E:
case 0x6F:
case 0x70:
case 0x71:
case 0x72:
case 0x73: // summon pet in slot 10 hotkey
case 0x73:
case 0x74: // summon pet in slot 10 hotkey
// If we don't have summonMaster we log error and procede to function without the fix.
if (!summonMaster) {
g_petHotkeyManager->m_petHotkeyHook->callOriginal(param1, param2);
Expand All @@ -76,7 +76,7 @@ void PetDesummonFix::PetHotkeyHook(LONGLONG param1, INT param2) {
// If our slaveEntityID is not 0 we have a pet summoned so we'll desummon it.
if (!summonMaster->slaveEntityID == 0x0000000000000000) {
// desummon the pet
g_petHotkeyManager->m_petHotkeyHook->callOriginal(param1, 0x79);
g_petHotkeyManager->m_petHotkeyHook->callOriginal(param1, 0x7A);//7A is the param fo the desummon hotkey press
break;
}
g_petHotkeyManager->m_petHotkeyHook->callOriginal(param1, param2);
Expand Down

0 comments on commit 8c23aaf

Please sign in to comment.