aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 88a598204a1..dde1cda8a3a 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1079,7 +1079,8 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] =
{EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 283 SPELL_EFFECT_COMPLETE_CAMPAIGN
};
-SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, SpellInfoLoadHelper const& data, SpellVisualVector&& visuals)
+SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, SpellInfoLoadHelper const& data,
+ std::vector<SpellLabelEntry const*> const& labels, SpellVisualVector&& visuals)
: Id(spellName->ID), Difficulty(difficulty)
{
_effects.reserve(32);
@@ -1219,6 +1220,9 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, S
ChannelInterruptFlags2 = SpellAuraInterruptFlags2(_interrupt->ChannelInterruptFlags[1]);
}
+ for (SpellLabelEntry const* label : labels)
+ Labels.insert(label->LabelID);
+
// SpellLevelsEntry
if (SpellLevelsEntry const* _levels = data.Levels)
{
@@ -4652,3 +4656,8 @@ bool SpellInfo::MeetsFutureSpellPlayerCondition(Player const* player) const
PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(ShowFutureSpellPlayerConditionID);
return !playerCondition || ConditionMgr::IsPlayerMeetingCondition(player, playerCondition);
}
+
+bool SpellInfo::HasLabel(uint32 labelId) const
+{
+ return Labels.find(labelId) != Labels.end();
+}