Core/Scripts: New ItemScript trigger, OnItemRemove
This commit is contained in:
1 parent
437b97fe73
commit
91850fa9e4
3 files changed
+15
-1
No files matched your search
@@ -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