mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9142] Move start outfit items check to server loading.
Also drop one not needed now hack.
This commit is contained in:
parent
dbeba5b0b7
commit
6769171a1d
3 changed files with 25 additions and 8 deletions
|
|
@ -2079,6 +2079,29 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
const_cast<ItemPrototype*>(proto)->HolidayId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// check some dbc referecned items (avoid duplicate reports)
|
||||
std::set<uint32> notFoundOutfit;
|
||||
for (uint32 i = 1; i < sCharStartOutfitStore.GetNumRows(); ++i)
|
||||
{
|
||||
CharStartOutfitEntry const* entry = sCharStartOutfitStore.LookupEntry(i);
|
||||
if (!entry)
|
||||
continue;
|
||||
|
||||
for(int j = 0; j < MAX_OUTFIT_ITEMS; ++j)
|
||||
{
|
||||
if(entry->ItemId[j] <= 0)
|
||||
continue;
|
||||
|
||||
uint32 item_id = entry->ItemId[j];
|
||||
|
||||
if(!GetItemPrototype(item_id))
|
||||
notFoundOutfit.insert(item_id);
|
||||
}
|
||||
}
|
||||
|
||||
for(std::set<uint32>::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr)
|
||||
sLog.outErrorDb("Item (Entry: %u) not exist in `item_template` but referenced in `CharStartOutfit.dnc`", *itr);
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadItemRequiredTarget()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue