Core/Scripts: fix Nightfall proc chance and reduce it for victims with level above 60

Closes #15734

(cherrypicked from eac9c1f0b9)
This commit is contained in:
ariel-
2017-02-21 22:37:53 -03:00
committed by Shauren
parent 8e4f5e1627
commit 5f70be050f
5 changed files with 45 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ class Player;
class Quest;
class ScriptMgr;
class Spell;
class SpellInfo;
class SpellScript;
class SpellCastTargets;
class Transport;
@@ -388,6 +389,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
@@ -1028,6 +1032,7 @@ class TC_GAME_API ScriptMgr
bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets, ObjectGuid castId);
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 */