diff options
Diffstat (limited to 'src/server/game/Spells/SpellScript.h')
-rw-r--r-- | src/server/game/Spells/SpellScript.h | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 946a6bb5b1f..1f76a3a5b59 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -295,6 +295,7 @@ class TC_GAME_API SpellScript : public _SpellScript void _FinishScriptCall(); bool IsInCheckCastHook() const; bool IsInTargetHook() const; + bool IsInModifiableHook() const; bool IsInHitPhase() const; bool IsInEffectHook() const; private: @@ -375,10 +376,10 @@ class TC_GAME_API SpellScript : public _SpellScript // methods allowing interaction with Spell object // // methods useable during all spell handling phases - Unit* GetCaster(); - Unit* GetOriginalCaster(); - SpellInfo const* GetSpellInfo(); - SpellValue const* GetSpellValue(); + Unit* GetCaster() const; + Unit* GetOriginalCaster() const; + SpellInfo const* GetSpellInfo() const; + SpellValue const* GetSpellValue() const; // methods useable after spell is prepared // accessors to the explicit targets of the spell @@ -392,48 +393,48 @@ class TC_GAME_API SpellScript : public _SpellScript // - ImplicitTargetXX set to TARGET_XXX_TARGET_YYY, _TARGET_ here means that explicit target is used by the effect, so spell needs one too // returns: WorldLocation which was selected as a spell destination or NULL - WorldLocation const* GetExplTargetDest(); + WorldLocation const* GetExplTargetDest() const; void SetExplTargetDest(WorldLocation& loc); // returns: WorldObject which was selected as an explicit spell target or NULL if there's no target - WorldObject* GetExplTargetWorldObject(); + WorldObject* GetExplTargetWorldObject() const; // returns: Unit which was selected as an explicit spell target or NULL if there's no target - Unit* GetExplTargetUnit(); + Unit* GetExplTargetUnit() const; // returns: GameObject which was selected as an explicit spell target or NULL if there's no target - GameObject* GetExplTargetGObj(); + GameObject* GetExplTargetGObj() const; // returns: Item which was selected as an explicit spell target or NULL if there's no target - Item* GetExplTargetItem(); + Item* GetExplTargetItem() const; // methods useable only during spell hit on target, or during spell launch on target: // returns: target of current effect if it was Unit otherwise NULL - Unit* GetHitUnit(); + Unit* GetHitUnit() const; // returns: target of current effect if it was Creature otherwise NULL - Creature* GetHitCreature(); + Creature* GetHitCreature() const; // returns: target of current effect if it was Player otherwise NULL - Player* GetHitPlayer(); + Player* GetHitPlayer() const; // returns: target of current effect if it was Item otherwise NULL - Item* GetHitItem(); + Item* GetHitItem() const; // returns: target of current effect if it was GameObject otherwise NULL - GameObject* GetHitGObj(); + GameObject* GetHitGObj() const; // returns: destination of current effect - WorldLocation* GetHitDest(); + WorldLocation* GetHitDest() const; // setter/getter for for damage done by spell to target of spell hit // returns damage calculated before hit, and real dmg done after hit - int32 GetHitDamage(); + int32 GetHitDamage() const; void SetHitDamage(int32 damage); void PreventHitDamage() { SetHitDamage(0); } // setter/getter for for heal done by spell to target of spell hit // returns healing calculated before hit, and real dmg done after hit - int32 GetHitHeal(); + int32 GetHitHeal() const; void SetHitHeal(int32 heal); void PreventHitHeal() { SetHitHeal(0); } - Spell* GetSpell() { return m_spell; } + Spell* GetSpell() const { return m_spell; } // returns current spell hit target aura - Aura* GetHitAura(); + Aura* GetHitAura() const; // prevents applying aura on current spell hit target void PreventHitAura(); @@ -453,13 +454,13 @@ class TC_GAME_API SpellScript : public _SpellScript void SetEffectValue(int32 value); // returns: cast item if present. - Item* GetCastItem(); + Item* GetCastItem() const; // Creates item. Calls Spell::DoCreateItem method. void CreateItem(uint32 effIndex, uint32 itemId); // Returns SpellInfo from the spell that triggered the current one - SpellInfo const* GetTriggeringSpell(); + SpellInfo const* GetTriggeringSpell() const; // finishes spellcast prematurely with selected error message void FinishCast(SpellCastResult result, uint32* param1 = nullptr, uint32* param2 = nullptr); |