aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/interface/ScriptMgr.cpp9
-rw-r--r--src/bindings/interface/ScriptMgr.h3
2 files changed, 11 insertions, 1 deletions
diff --git a/src/bindings/interface/ScriptMgr.cpp b/src/bindings/interface/ScriptMgr.cpp
index 2a6a9861829..154d612678d 100644
--- a/src/bindings/interface/ScriptMgr.cpp
+++ b/src/bindings/interface/ScriptMgr.cpp
@@ -288,6 +288,15 @@ bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
}
TRINITY_DLL_EXPORT
+bool ItemExpire( Player *player, ItemPrototype const *_ItemProto)
+{
+ Script *tmpscript = m_scripts[_ItemProto->ScriptId];
+ if (!tmpscript || !tmpscript->pItemExpire) return true;
+
+ return tmpscript->pItemExpire(player,_ItemProto);
+}
+
+TRINITY_DLL_EXPORT
bool EffectDummyCreature(Unit *caster, uint32 spellId, uint32 effIndex, Creature *crTarget )
{
Script *tmpscript = m_scripts[crTarget->GetScriptId()];
diff --git a/src/bindings/interface/ScriptMgr.h b/src/bindings/interface/ScriptMgr.h
index 04d3a6df14f..9b3c59d17ca 100644
--- a/src/bindings/interface/ScriptMgr.h
+++ b/src/bindings/interface/ScriptMgr.h
@@ -42,7 +42,7 @@ struct Script
pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), pGOSelect(NULL), pGOSelectWithCode(NULL),
pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL),
pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL),
- pGOChooseReward(NULL), pItemUse(NULL), pEffectDummyCreature(NULL), pEffectDummyGameObj(NULL),
+ pGOChooseReward(NULL), pItemUse(NULL), pItemExpire(NULL), pEffectDummyCreature(NULL), pEffectDummyGameObj(NULL),
pEffectDummyItem(NULL), GetAI(NULL), GetInstanceData(NULL)
{}
@@ -67,6 +67,7 @@ struct Script
bool (*pGOQuestAccept )(Player*, GameObject*, Quest const* );
bool (*pGOChooseReward )(Player*, GameObject*, Quest const*, uint32 );
bool (*pItemUse )(Player*, Item*, SpellCastTargets const& );
+ bool (*pItemExpire )(Player*, ItemPrototype const*);
bool (*pEffectDummyCreature )(Unit*, uint32, uint32, Creature* );
bool (*pEffectDummyGameObj )(Unit*, uint32, uint32, GameObject* );
bool (*pEffectDummyItem )(Unit*, uint32, uint32, Item* );