Core/Spells: SpellHistory updates

Port From (https://github.com/TrinityCore/TrinityCore/commit/8cc6520b89583d4bf6549b28fa5b7390fc2b0b9d)
This commit is contained in:
hondacrx
2021-11-23 14:36:54 -05:00
parent 751f4dd8b2
commit b3a92137d3
8 changed files with 167 additions and 124 deletions
+2 -1
View File
@@ -2648,7 +2648,8 @@ namespace Game.Spells
if (unitCaster != null)
{
int duration = m_spellInfo.GetDuration();
unitTarget.GetSpellHistory().LockSpellSchool(curSpellInfo.GetSchoolMask(), (uint)unitTarget.ModSpellDuration(m_spellInfo, unitTarget, duration, false, (uint)(1 << (int)effectInfo.EffectIndex)));
duration = unitTarget.ModSpellDuration(m_spellInfo, unitTarget, duration, false, 1u << (int)effectInfo.EffectIndex);
unitTarget.GetSpellHistory().LockSpellSchool(curSpellInfo.GetSchoolMask(), TimeSpan.FromMilliseconds(duration));
if (m_spellInfo.DmgClass == SpellDmgClass.Magic)
Unit.ProcSkillsAndAuras(unitCaster, unitTarget, ProcFlags.DoneSpellMagicDmgClassNeg, ProcFlags.TakenSpellMagicDmgClassNeg, ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.Hit, ProcFlagsHit.Interrupt, null, null, null);
else if (m_spellInfo.DmgClass == SpellDmgClass.Melee)