diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-02-21 22:37:53 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-02-21 22:38:30 -0300 |
commit | eac9c1f0b992fd3622fd7dd864b2acc2781ec778 (patch) | |
tree | 8d100614f85bc56987335fc302d3b20e63d36354 /src/server/game/Scripting/ScriptMgr.h | |
parent | b3b4054eb44fdb9b0efe47d1a7ec3021b87a5fed (diff) |
Core/Scripts: fix Nightfall proc chance and reduce it for victims with level above 60
Closes #15734
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index c47c75f3a9a..10df2ecf970 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -53,6 +53,7 @@ class Player; class Quest; class ScriptMgr; class Spell; +class SpellInfo; class SpellScript; class SpellCastTargets; class Transport; @@ -378,6 +379,9 @@ class TC_GAME_API ItemScript : public ScriptObject // Called when the item is destroyed. virtual bool OnRemove(Player* /*player*/, Item* /*item*/) { return false; } + + // Called before casting a combat spell from this item (chance on hit spells of item template, can be used to prevent cast if returning false) + virtual bool OnCastItemCombatSpell(Player* /*player*/, Unit* /*victim*/, SpellInfo const* /*spellInfo*/, Item* /*item*/) { return true; } }; class TC_GAME_API UnitScript : public ScriptObject @@ -955,6 +959,7 @@ class TC_GAME_API ScriptMgr bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets); bool OnItemExpire(Player* player, ItemTemplate const* proto); bool OnItemRemove(Player* player, Item* item); + bool OnCastItemCombatSpell(Player* player, Unit* victim, SpellInfo const* spellInfo, Item* item); public: /* CreatureScript */ |