Core/Loading: Make GameObject loot loading faster by removing an unneeded call to an expensive method.

Thanks Manuel for pointing it out
This commit is contained in:
Subv
2012-04-12 20:19:23 -05:00
parent 491999280e
commit 6400c13fcb
2 changed files with 1 additions and 10 deletions

View File

@@ -1025,15 +1025,6 @@ class ObjectMgr
return &itr->second;
}
bool IsGoOfSpecificEntrySpawned(uint32 entry) const
{
for (GameObjectDataContainer::const_iterator it = _gameObjectDataStore.begin(); it != _gameObjectDataStore.end(); ++it)
if (it->second.id == entry)
return true;
return false;
}
GameObjectData const* GetGOData(uint32 guid) const
{
GameObjectDataContainer::const_iterator itr = _gameObjectDataStore.find(guid);

View File

@@ -1526,7 +1526,7 @@ void LoadLootTemplates_Gameobject()
{
if (uint32 lootid = itr->second.GetLootId())
{
if (sObjectMgr->IsGoOfSpecificEntrySpawned(itr->second.entry) && lootIdSet.find(lootid) == lootIdSet.end())
if (lootIdSet.find(lootid) == lootIdSet.end())
LootTemplates_Gameobject.ReportNotExistedId(lootid);
else
lootIdSetUsed.insert(lootid);