Core/Scripts: fix Nightfall proc chance and reduce it for victims with level above 60. (#3304)

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

Adding a TrinityCore commit eac9c1f0b9

* Update rev_1597581112860069800.sql

* Update rev_1597581112860069800.sql

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
Moki
2020-09-01 15:19:09 +03:00
committed by GitHub
parent 4b6827fb09
commit 26c99c383f
5 changed files with 47 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ class Quest;
class ScriptMgr;
class Spell;
class SpellScript;
class SpellInfo;
class SpellCastTargets;
class Transport;
class StaticTransport;
@@ -425,6 +426,9 @@ class 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; }
// Called when the item expires (is destroyed).
virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; }
@@ -1304,6 +1308,7 @@ class 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);
void OnGossipSelect(Player* player, Item* item, uint32 sender, uint32 action);
void OnGossipSelectCode(Player* player, Item* item, uint32 sender, uint32 action, const char* code);