refactor(ItemTemplate): add missing enums + other minor improvements (#2236)

This commit is contained in:
Francesco Borzì
2019-08-26 20:43:53 +02:00
committed by GitHub
parent f39f822aa9
commit 0b88e24808
16 changed files with 181 additions and 151 deletions

View File

@@ -346,7 +346,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
ItemTemplate const* proto = pItem->GetTemplate();
// destroy only 5 items from stack in case prospecting and milling
if (proto->Flags & (ITEM_PROTO_FLAG_PROSPECTABLE | ITEM_PROTO_FLAG_MILLABLE))
if (proto->Flags & (ITEM_FLAG_IS_PROSPECTABLE | ITEM_FLAG_IS_MILLABLE))
{
pItem->m_lootGenerated = false;
pItem->loot.clear();
@@ -359,7 +359,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
player->DestroyItemCount(pItem, count, true);
}
else if (pItem->loot.isLooted() || !(proto->Flags & ITEM_PROTO_FLAG_OPENABLE))
else if (pItem->loot.isLooted() || !(proto->Flags & ITEM_FLAG_HAS_LOOT))
{
player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
return;