Skip to content

Commit

Permalink
Update TC ResetTypeCooldowns function to match core refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Niam5 committed Feb 2, 2025
1 parent 57596f2 commit 8166f8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions methods/TrinityCore/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -3371,12 +3371,14 @@ namespace LuaPlayer
bool update = E->CHECKVAL<bool>(3, true);
(void)update; // ensure that the variable is referenced in order to pass compiler checks

#if ELUNA_EXPANSION < EXP_RETAIL
player->GetSpellHistory()->ResetCooldowns([category](SpellHistory::CooldownStorageType::iterator itr) -> bool
{
#if ELUNA_EXPANSION < EXP_RETAIL
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
#else
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first, DIFFICULTY_NONE);
player->GetSpellHistory()->ResetCooldowns([category](SpellHistory::CooldownEntry const& cooldownEntry) -> bool
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cooldownEntry.SpellId, DIFFICULTY_NONE);
#endif
return spellInfo && spellInfo->GetCategory() == category;
}, update);
Expand Down

0 comments on commit 8166f8c

Please sign in to comment.