Core/Spell: fixed possible exploit in Duel Reset script

- thanks @Runico for reporting it
This commit is contained in:
ShinDarth
2015-12-06 03:44:12 +01:00
parent 984bf32fa8
commit 03215a2eb7

View File

@@ -695,9 +695,7 @@ void SpellHistory::RestoreCooldownStateAfterDuel()
// check for spell with onHold active before and during the duel
for (auto itr = _spellCooldownsBeforeDuel.begin(); itr != _spellCooldownsBeforeDuel.end(); ++itr)
{
if (!itr->second.OnHold &&
_spellCooldowns.find(itr->first) != _spellCooldowns.end() &&
!_spellCooldowns[itr->first].OnHold)
if (!itr->second.OnHold && !_spellCooldowns[itr->first].OnHold)
_spellCooldowns[itr->first] = _spellCooldownsBeforeDuel[itr->first];
}