* Correction for 6706.

- If a GO template (type 3 and 25) has at least one spawn and a data1 set to a lootid, then error. If no spawns, silently ignore.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-12-22 03:30:18 +01:00
parent bd22b1a3a8
commit 306f9013c3
2 changed files with 13 additions and 5 deletions

View File

@@ -1253,11 +1253,10 @@ void LoadLootTemplates_Gameobject()
{
if (uint32 lootid = gInfo->GetLootId())
{
//if (!ids_set.count(lootid))
// LootTemplates_Gameobject.ReportNotExistedId(lootid);
//else
// ids_setUsed.insert(lootid);
ids_setUsed.insert(lootid);
if (objmgr.IsGoOfSpecificEntrySpawned(gInfo->id) && !ids_set.count(lootid))
LootTemplates_Gameobject.ReportNotExistedId(lootid);
else
ids_setUsed.insert(lootid);
}
}
}

View File

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