feat(Core/Scripting): Implement OnLoadSpellCustomAttr global hook (#10469)

This commit is contained in:
Skjalf
2022-01-31 18:03:42 -03:00
committed by GitHub
parent 0377b71e16
commit 4c5aceedbd
3 changed files with 15 additions and 0 deletions

View File

@@ -1531,6 +1531,9 @@ public:
// Called when checking for spell negative healing modifiers
virtual bool OnSpellHealingBonusTakenNegativeModifiers(Unit const* /*target*/, Unit const* /*caster*/, SpellInfo const* /*spellInfo*/, float& /*val*/) { return false; };
// Called after loading spell dbc corrections
virtual void OnLoadSpellCustomAttr(SpellInfo* /*spell*/) { }
};
class BGScript : public ScriptObject
@@ -2350,6 +2353,7 @@ public: /* GlobalScript */
void OnBeforeWorldObjectSetPhaseMask(WorldObject const* worldObject, uint32& oldPhaseMask, uint32& newPhaseMask, bool& useCombinedPhases, bool& update);
bool OnIsAffectedBySpellModCheck(SpellInfo const* affectSpell, SpellInfo const* checkSpell, SpellModifier const* mod);
bool OnSpellHealingBonusTakenNegativeModifiers(Unit const* target, Unit const* caster, SpellInfo const* spellInfo, float& val);
void OnLoadSpellCustomAttr(SpellInfo* spell);
public: /* Scheduled scripts */
uint32 IncreaseScheduledScriptsCount() { return ++_scheduledScripts; }