Merge pull request #13352 from ShinDarth/4.3.4

Core/LootMgr:  Restore Build
This commit is contained in:
Shauren
2014-10-18 11:56:25 +02:00
2 changed files with 7 additions and 1 deletions

View File

@@ -272,6 +272,11 @@ void LootStore::ReportUnusedIds(LootIdSet const& lootIdSet) const
TC_LOG_ERROR("sql.sql", "Table '%s' Entry %d isn't %s and not referenced from loot, and thus useless.", GetName(), *itr, GetEntryName());
}
void LootStore::ReportNonExistingId(uint32 lootId) const
{
TC_LOG_ERROR("sql.sql", "Table '%s' Entry %d does not exist", GetName(), lootId);
}
void LootStore::ReportNonExistingId(uint32 lootId, const char* ownerType, uint32 ownerId) const
{
TC_LOG_ERROR("sql.sql", "Table '%s' Entry %d does not exist but it is used by %s %d", GetName(), lootId, ownerType, ownerId);
@@ -1565,7 +1570,7 @@ void LoadLootTemplates_Disenchant()
uint32 lootid = disenchant->Id;
if (lootIdSet.find(lootid) == lootIdSet.end())
LootTemplates_Disenchant.ReportNonExistingId(lootid, "Item", itr->second.ItemId);
LootTemplates_Disenchant.ReportNonExistingId(lootid);
else
lootIdSetUsed.insert(lootid);
}

View File

@@ -216,6 +216,7 @@ class LootStore
uint32 LoadAndCollectLootIds(LootIdSet& ids_set);
void CheckLootRefs(LootIdSet* ref_set = NULL) const; // check existence reference and remove it from ref_set
void ReportUnusedIds(LootIdSet const& ids_set) const;
void ReportNonExistingId(uint32 lootId) const;
void ReportNonExistingId(uint32 lootId, const char* ownerType, uint32 ownerId) const;
bool HaveLootFor(uint32 loot_id) const { return m_LootTemplates.find(loot_id) != m_LootTemplates.end(); }