Core/Spells: Refactor SpellHistory ModifyCoooldowns and ResetCooldowns callbacks to use CooldownEntry argument instead of internal iterator

Port From (https://github.com/TrinityCore/TrinityCore/commit/ace6342aea9e8e3f69af88ca3963fc961ba56f1b)
This commit is contained in:
Hondacrx
2025-06-08 15:56:31 -04:00
parent 4ace6f58c6
commit a3a9ef5259
5 changed files with 87 additions and 84 deletions
+2 -2
View File
@@ -655,9 +655,9 @@ namespace Game.Entities
break;
}
GetSpellHistory().ResetCooldowns(pair =>
GetSpellHistory().ResetCooldowns(cooldown =>
{
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pair.Key, Difficulty.None);
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(cooldown.SpellId, Difficulty.None);
return spellInfo.HasAttribute(SpellAttr10.ResetCooldownOnEncounterEnd);
}, true);
}