From 48eef97f8044d27088aa7f6311c7fd2f46889046 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 20 Aug 2009 10:12:44 -0500 Subject: *Fix a crash caused by itemexpire. --HG-- branch : trunk --- src/game/Item.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/game/Item.cpp') 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; } -- cgit v1.2.3