From b0d5e3e51a64e30de3cf8e3a5ef8a9f27d22dbe8 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Fri, 8 Oct 2010 10:21:27 +0200 Subject: [PATCH] [10589] Always activate GO type 3 when quest id is defined (and active) GO may be "lootless", but events at looting can happen Signed-off-by: NoFantasy --- src/game/GameObject.cpp | 5 ++++- src/game/ObjectMgr.cpp | 8 +++++++- src/shared/revision_nr.h | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 886309a17..393715dca 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -724,7 +724,10 @@ bool GameObject::ActivateToQuest( Player *pTarget)const // scan GO chest with loot including quest items case GAMEOBJECT_TYPE_CHEST: { - if(LootTemplates_Gameobject.HaveQuestLootForPlayer(GetGOInfo()->GetLootId(), pTarget)) + if (pTarget->GetQuestStatus(GetGOInfo()->chest.questId) == QUEST_STATUS_INCOMPLETE) + return true; + + if (LootTemplates_Gameobject.HaveQuestLootForPlayer(GetGOInfo()->GetLootId(), pTarget)) { //look for battlegroundAV for some objects which are only activated after mine gots captured by own team if (GetEntry() == BG_AV_OBJECTID_MINE_N || GetEntry() == BG_AV_OBJECTID_MINE_S) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 8fbd5df94..d016cd913 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7725,8 +7725,14 @@ void ObjectMgr::LoadGameObjectForQuests() { 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 - if(LootTemplates_Gameobject.HaveQuestLootFor(loot_id)) + else if (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 9a8d24dbd..f9f64f5ae 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 "10588" + #define REVISION_NR "10589" #endif // __REVISION_NR_H__