diff options
| author | n0n4m3 <none@none> | 2009-12-26 17:52:33 +0100 |
|---|---|---|
| committer | n0n4m3 <none@none> | 2009-12-26 17:52:33 +0100 |
| commit | 066efa09e3ea27fcece68f609a097c12399233de (patch) | |
| tree | c159c8b7b7497b8b288a20d73f566c7acf4df52e /src/game/Item.cpp | |
| parent | 28df19d20540fe35ce87c6f5c25b2c7bf997b6e2 (diff) | |
Fixed items Mysterious Egg, Disgusting Jar (need db support).
--HG--
branch : trunk
Diffstat (limited to 'src/game/Item.cpp')
| -rw-r--r-- | src/game/Item.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 0197de1d3ff..1633885d382 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -285,8 +285,15 @@ void Item::UpdateDuration(Player* owner, uint32 diff) if (GetUInt32Value(ITEM_FIELD_DURATION)<=diff) { + // variables to hold item location and entry data after item gets destroyed + uint32 itemEntry = GetEntry(); + uint8 bagSlot = GetBagSlot(); + uint8 slot = GetSlot(); + uint16 pos = GetPos(); + Script->ItemExpire(owner, GetProto()); owner->DestroyItem(GetBagSlot(), GetSlot(), true); + owner->HandleDestroyItemReplace(itemEntry, bagSlot, slot, pos); return; } |
