*Allow ItemExpire events to be scripted.

*Add .debug itemexpire command
*Add script for Disgusting Jar and Mysterious Egg - original patch by Elron.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-08-04 01:44:14 +02:00
parent 29c9d709b9
commit 2e34af64cf
15 changed files with 91 additions and 7 deletions

View File

@@ -1876,6 +1876,15 @@ bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
return tmpscript->pItemUse(player,_Item,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 )
{