mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 10:03:47 +00:00
Prevent GUID from exhausting
This commit is contained in:
@@ -1086,7 +1086,7 @@ void Item::SendTimeUpdate(Player* owner)
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
Item* Item::CreateItem(uint32 item, uint32 count, Player const* player, bool clone, uint32 randomPropertyId)
|
||||
Item* Item::CreateItem(uint32 item, uint32 count, Player const* player, bool clone, uint32 randomPropertyId, bool temp)
|
||||
{
|
||||
if (count < 1)
|
||||
return nullptr; //don't create item at zero count
|
||||
@@ -1100,7 +1100,8 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player, bool clo
|
||||
ASSERT_NODEBUGINFO(count != 0 && "pProto->Stackable == 0 but checked at loading already");
|
||||
|
||||
Item* pItem = NewItemOrBag(pProto);
|
||||
if (pItem->Create(sObjectMgr->GetGenerator<HighGuid::Item>().Generate(), item, player))
|
||||
uint32 guid = temp ? 0xFFFFFFFF : sObjectMgr->GetGenerator<HighGuid::Item>().Generate();
|
||||
if (pItem->Create(guid, item, player))
|
||||
{
|
||||
pItem->SetCount(count);
|
||||
if (!clone)
|
||||
|
||||
Reference in New Issue
Block a user