mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user