Core/Scripts: New ItemScript trigger, OnItemRemove

This commit is contained in:
kontownik
2014-03-03 22:18:47 +01:00
parent 437b97fe73
commit 91850fa9e4
3 changed files with 15 additions and 1 deletions

View File

@@ -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 */