From 8bb27ebd8e6e9f1d765e9b38ff6a3f2dd165ea02 Mon Sep 17 00:00:00 2001 From: kamikazetg Date: Fri, 8 Oct 2010 12:44:03 +0200 Subject: [PATCH] [10591] Simplify LoadGameObjectForQuests for case GO type 3 Signed-off-by: NoFantasy --- src/game/ObjectMgr.cpp | 12 +++--------- src/shared/revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index d016cd913..d18bc9f0b 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7720,19 +7720,13 @@ void ObjectMgr::LoadGameObjectForQuests() switch(goInfo->type) { - // scan GO chest with loot including quest items case GAMEOBJECT_TYPE_CHEST: { + // scan GO chest with loot including quest items uint32 loot_id = goInfo->GetLootId(); - // always activate to quest, GO may not have loot - if (goInfo->chest.questId) - { - mGameObjectForQuestSet.insert(go_entry); - ++count; - } - // find quest loot for GO - else if (LootTemplates_Gameobject.HaveQuestLootFor(loot_id)) + // always activate to quest, GO may not have loot, OR find if GO has loot for quest. + if (goInfo->chest.questId || LootTemplates_Gameobject.HaveQuestLootFor(loot_id)) { mGameObjectForQuestSet.insert(go_entry); ++count; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ec382b595..31e4138ab 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10590" + #define REVISION_NR "10591" #endif // __REVISION_NR_H__