mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
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:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user