diff options
author | megamage <none@none> | 2009-08-20 10:12:44 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-20 10:12:44 -0500 |
commit | 48eef97f8044d27088aa7f6311c7fd2f46889046 (patch) | |
tree | 56ec625edf11f191b3a9eb3e43e2df5354cc84b3 | |
parent | ef4a701ba6e9bdc02117fd40728280911f398d57 (diff) |
*Fix a crash caused by itemexpire.
--HG--
branch : trunk
-rw-r--r-- | src/game/Item.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 9e07dbfaa16..f37d6d6606e 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -285,9 +285,8 @@ void Item::UpdateDuration(Player* owner, uint32 diff) if (GetUInt32Value(ITEM_FIELD_DURATION)<=diff) { - owner->DestroyItem(GetBagSlot(), GetSlot(), true); - if(const ItemPrototype *proto = GetProto()) - Script->ItemExpire(owner, proto); + Script->ItemExpire(owner, proto); + owner->DestroyItem(GetBagSlot(), GetSlot(), true); return; } |