Core/Spells: Implement SPELL_ATTR10_RESET_COOLDOWN_UPON_ENDING_AN_ENCOUNTER

Port From (https://github.com/TrinityCore/TrinityCore/commit/c4aa4d4b5371af440b9fce2bb0866b90a50750f6)
This commit is contained in:
hondacrx
2023-05-30 08:18:38 -04:00
parent 068ccd990f
commit cf5f53e33f
+6
View File
@@ -597,6 +597,12 @@ namespace Game.Entities
public void AtEndOfEncounter()
{
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfEncounter);
GetSpellHistory().ResetCooldowns(pair =>
{
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pair.Key, Difficulty.None);
return spellInfo.HasAttribute(SpellAttr10.ResetCooldownOnEncounterEnd);
}, true);
}
public void _RegisterDynObject(DynamicObject dynObj)