Core/Spells: spell effect handling improvements
* Call spell effect handlers in 4 modes: - SPELL_EFFECT_HANDLE_LAUNCH - called when spell is launched (cast just finished) - SPELL_EFFECT_HANDLE_LAUNCH_TARGET - called when spell is launched for each target in spell target map - SPELL_EFFECT_HANDLE_HIT - called when spell hits its destination - SPELL_EFFECT_HANDLE_HIT_TARGET - called when spell hits it's target from spell target map *Correctly implement SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL *Remove spell system hacks which became obsolete with this commit Core/SpellScripts: add OnEffectLaunch, OnEffectLaunchTarget, OnEffectHit, OnEffectHitTarget hooks for new effect handle modes and remove OnEffect hook. A generic rule of thumb how to update your scripts (will work for nearly all cases) for spell system noobs: if your spell script used GetHitXXXX function, you need to use OnEffectHitTarget, otherwise use OnEffectHit
This commit is contained in:
@@ -228,9 +228,7 @@ public:
|
||||
uint32 GetExplicitTargetMask(bool& srcSet, bool& dstSet) const;
|
||||
|
||||
// temporarily avalible to public
|
||||
static bool IsPosition(uint32 targetType);
|
||||
static SpellSelectTargetTypes Type[TOTAL_SPELL_TARGETS];
|
||||
|
||||
private:
|
||||
static bool InitStaticData();
|
||||
static void InitTypeData();
|
||||
@@ -295,6 +293,7 @@ public:
|
||||
bool HasRadius() const;
|
||||
float CalcRadius(Unit* caster = NULL, Spell* = NULL) const;
|
||||
|
||||
uint32 GetProvidedTargetMask() const;
|
||||
uint32 GetMissingTargetMask(bool srcSet = false, bool destSet = false, uint32 mask = 0) const;
|
||||
|
||||
SpellEffectImplicitTargetTypes GetImplicitTargetType() const;
|
||||
|
||||
Reference in New Issue
Block a user