mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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()
|
||||
|
|
|
|||
|
|
@ -701,16 +701,10 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
|
|||
|
||||
uint32 item_id = oEntry->ItemId[j];
|
||||
|
||||
// Hack for not existed item id in dbc 3.0.3
|
||||
if(item_id==40582)
|
||||
continue;
|
||||
|
||||
// just skip, reported in ObjectMgr::LoadItemPrototypes
|
||||
ItemPrototype const* iProto = ObjectMgr::GetItemPrototype(item_id);
|
||||
if(!iProto)
|
||||
{
|
||||
sLog.outErrorDb("Initial item id %u (race %u class %u) from CharStartOutfit.dbc not listed in `item_template`, ignoring.",item_id,getRace(),getClass());
|
||||
continue;
|
||||
}
|
||||
|
||||
// BuyCount by default
|
||||
uint32 count = iProto->BuyCount;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9141"
|
||||
#define REVISION_NR "9142"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue