mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
* 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user