diff options
author | XTZGZoReX <none@none> | 2009-12-22 03:30:18 +0100 |
---|---|---|
committer | XTZGZoReX <none@none> | 2009-12-22 03:30:18 +0100 |
commit | 306f9013c3bda75f5653bbfaaef14d5fa529352b (patch) | |
tree | 4b150adc026900d6c4b9b58c0a039eb098e7c4f9 | |
parent | bd22b1a3a853f5c957d669f7161f43a17b1caecc (diff) |
* 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
-rw-r--r-- | src/game/LootMgr.cpp | 9 | ||||
-rw-r--r-- | src/game/ObjectMgr.h | 9 |
2 files changed, 13 insertions, 5 deletions
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); |