Browse Source

Support unsetting spell hotkey

pull/7677/head
obligaron 2 years ago committed by Anders Jenbo
parent
commit
a5654dd176
  1. 7
      Source/panels/spell_list.cpp

7
Source/panels/spell_list.cpp

@ -274,6 +274,13 @@ void SetSpeedSpell(size_t slot)
return;
}
Player &myPlayer = *MyPlayer;
if (myPlayer._pSplHotKey[slot] == pSpell && myPlayer._pSplTHotKey[slot] == pSplType) {
// Unset spell hotkey
myPlayer._pSplHotKey[slot] = SpellID::Invalid;
return;
}
for (size_t i = 0; i < NumHotkeys; ++i) {
if (myPlayer._pSplHotKey[i] == pSpell && myPlayer._pSplTHotKey[i] == pSplType)
myPlayer._pSplHotKey[i] = SpellID::Invalid;

Loading…
Cancel
Save