refactor(Core/Spell): Use ApplySpellFix with SpellInfo (#9938)

This commit is contained in:
Kitzunu
2022-02-08 14:09:15 +01:00
committed by GitHub
parent cfd9ebe107
commit 13643c969c
11 changed files with 1292 additions and 1268 deletions

View File

@@ -310,8 +310,10 @@ private:
static std::array<StaticData, TOTAL_SPELL_EFFECTS> _data;
};
class SpellInfo
class AC_GAME_API SpellInfo
{
friend class SpellMgr;
public:
uint32 Id;
SpellCategoryEntry const* CategoryEntry;
@@ -518,13 +520,23 @@ public:
bool IsDifferentRankOf(SpellInfo const* spellInfo) const;
bool IsHighRankOf(SpellInfo const* spellInfo) const;
// loading helpers
void _InitializeExplicitTargetMask();
std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> const& GetEffects() const { return Effects; }
SpellEffectInfo const& GetEffect(SpellEffIndex index) const { ASSERT(index < Effects.size()); return Effects[index]; }
bool _IsPositiveEffect(uint8 effIndex, bool deep) const;
bool _IsPositiveSpell() const;
static bool _IsPositiveTarget(uint32 targetA, uint32 targetB);
private:
// loading helpers
void _InitializeExplicitTargetMask();
AuraStateType LoadAuraState() const;
SpellSpecificType LoadSpellSpecific() const;
std::array<SpellEffectInfo, MAX_SPELL_EFFECTS>& _GetEffects() { return Effects; }
SpellEffectInfo& _GetEffect(SpellEffIndex index) { ASSERT(index < Effects.size()); return Effects[index]; }
// unloading helpers
void _UnloadImplicitTargetConditionLists();
};