mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
*Fix a crash caused by ItemExpire though the reason is unknown.
--HG-- branch : trunk
This commit is contained in:
@@ -286,7 +286,8 @@ void Item::UpdateDuration(Player* owner, uint32 diff)
|
||||
if (GetUInt32Value(ITEM_FIELD_DURATION)<=diff)
|
||||
{
|
||||
owner->DestroyItem(GetBagSlot(), GetSlot(), true);
|
||||
Script->ItemExpire(owner, GetProto());
|
||||
if(const ItemPrototype *proto = GetProto())
|
||||
Script->ItemExpire(owner, proto);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user