Core/Spells: Corrected spell visual fallback logic for spell difficulty entries

Port From (https://github.com/TrinityCore/TrinityCore/commit/8147a42aefb5c94fb70205141e611d3100cbd99d)
This commit is contained in:
hondacrx
2021-10-10 16:38:45 -04:00
parent bb234fa4bd
commit feec594e98
2 changed files with 32 additions and 11 deletions
+4 -5
View File
@@ -31,7 +31,7 @@ namespace Game.Spells
{
public class SpellInfo
{
public SpellInfo(SpellNameRecord spellName, Difficulty difficulty, SpellInfoLoadHelper data, List<SpellLabelRecord> labels, List<SpellXSpellVisualRecord> visuals)
public SpellInfo(SpellNameRecord spellName, Difficulty difficulty, SpellInfoLoadHelper data)
{
Id = spellName.Id;
Difficulty = difficulty;
@@ -77,9 +77,6 @@ namespace Game.Spells
ShowFutureSpellPlayerConditionID = (uint)_misc.ShowFutureSpellPlayerConditionID;
}
if (visuals != null)
_visuals = visuals;
// SpellScalingEntry
SpellScalingRecord _scaling = data.Scaling;
if (_scaling != null)
@@ -185,7 +182,7 @@ namespace Game.Spells
ChannelInterruptFlags2 = (SpellAuraInterruptFlags2)_interrupt.ChannelInterruptFlags[1];
}
foreach (var label in labels)
foreach (var label in data.Labels)
Labels.Add(label.LabelID);
// SpellLevelsEntry
@@ -242,6 +239,8 @@ namespace Game.Spells
}
}
_visuals = data.Visuals;
_spellSpecific = SpellSpecificType.Normal;
_auraState = AuraStateType.None;
}