mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Scripts: New ItemScript trigger, OnItemRemove
This commit is contained in:
@@ -388,6 +388,9 @@ class ItemScript : public ScriptObject
|
||||
|
||||
// Called when the item expires (is destroyed).
|
||||
virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; }
|
||||
|
||||
// Called when the item is destroyed.
|
||||
virtual bool OnRemove(Player* /*player*/, Item* /*item*/) { return false; }
|
||||
};
|
||||
|
||||
class UnitScript : public ScriptObject
|
||||
@@ -918,6 +921,7 @@ class ScriptMgr
|
||||
bool OnQuestAccept(Player* player, Item* item, Quest const* quest);
|
||||
bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets);
|
||||
bool OnItemExpire(Player* player, ItemTemplate const* proto);
|
||||
bool OnItemRemove(Player* player, Item* item);
|
||||
|
||||
public: /* CreatureScript */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user