diff options
| author | Shauren <shauren.trinity@gmail.com> | 2021-06-04 21:18:29 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-06-04 21:18:29 +0200 |
| commit | e1f3f1254c3214c0a5b71db6de33f8900903d314 (patch) | |
| tree | 22d284b13abf3fa99cda418e45307b8f499b1601 /src/server/game/Spells/SpellInfo.cpp | |
| parent | a0796179b33dd7042330d245b43e8c91534bf8b3 (diff) | |
Core/Spells: Load spell label data for future use
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 11 |
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(); +} |
