mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Merge branch 'master' into 310
Conflicts: src/game/MiscHandler.cpp src/game/Player.cpp src/game/Player.h src/shared/Database/DBCStores.cpp
This commit is contained in:
commit
9debf4dfc0
15 changed files with 182 additions and 48 deletions
|
|
@ -1716,6 +1716,35 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
if(proto->Map && !sMapStore.LookupEntry(proto->Map))
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong Map (%u)",i,proto->Map);
|
||||
|
||||
if(proto->BagFamily)
|
||||
{
|
||||
// check bits
|
||||
for(uint32 i = 0; i < sizeof(proto->BagFamily)*8; ++i)
|
||||
{
|
||||
uint32 mask = 1 << i;
|
||||
if((proto->BagFamily & mask)==0)
|
||||
continue;
|
||||
|
||||
ItemBagFamilyEntry const* bf = sItemBagFamilyStore.LookupEntry(i+1);
|
||||
if(!bf)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has bag family bit set not listed in ItemBagFamily.dbc, remove bit",i);
|
||||
const_cast<ItemPrototype*>(proto)->BagFamily &= ~mask;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(BAG_FAMILY_MASK_CURRENCY_TOKENS & mask)
|
||||
{
|
||||
CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(proto->ItemId);
|
||||
if(!ctEntry)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit",i);
|
||||
const_cast<ItemPrototype*>(proto)->BagFamily &= ~mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(proto->TotemCategory && !sTotemCategoryStore.LookupEntry(proto->TotemCategory))
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong TotemCategory (%u)",i,proto->TotemCategory);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue