Skip to content

Commit 1444366

Browse files
committed
Update TC ResetTypeCooldowns function to match core refactor
1 parent bbc28f8 commit 1444366

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

methods/TrinityCore/PlayerMethods.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -3363,12 +3363,14 @@ namespace LuaPlayer
33633363
bool update = E->CHECKVAL<bool>(3, true);
33643364
(void)update; // ensure that the variable is referenced in order to pass compiler checks
33653365

3366+
#if ELUNA_EXPANSION < EXP_RETAIL
33663367
player->GetSpellHistory()->ResetCooldowns([category](SpellHistory::CooldownStorageType::iterator itr) -> bool
33673368
{
3368-
#if ELUNA_EXPANSION < EXP_RETAIL
33693369
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
33703370
#else
3371-
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first, DIFFICULTY_NONE);
3371+
player->GetSpellHistory()->ResetCooldowns([category](SpellHistory::CooldownEntry const& cooldownEntry) -> bool
3372+
{
3373+
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cooldownEntry.SpellId, DIFFICULTY_NONE);
33723374
#endif
33733375
return spellInfo && spellInfo->GetCategory() == category;
33743376
}, update);

0 commit comments

Comments
 (0)