From 306f9013c3bda75f5653bbfaaef14d5fa529352b Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Tue, 22 Dec 2009 03:30:18 +0100 Subject: * 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 --- src/game/LootMgr.cpp | 9 ++++----- src/game/ObjectMgr.h | 9 +++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index d592092d5fe..1ad17b7f6fd 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -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); } } } diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 0dd7087a4e2..a52d9ec65b2 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -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); -- cgit v1.2.3