From 6d0a031a77f53eade2cf62138a601054b6a9cdc9 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 13 Sep 2010 13:18:27 +0200 Subject: Core/Quests: Some cleanup in quest relation accessing --HG-- branch : trunk --- src/server/game/Entities/GameObject/GameObject.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/game/Entities/GameObject') diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 52205572ac9..459b7ccd289 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -742,8 +742,8 @@ GameObject* GameObject::GetGameObject(WorldObject& object, uint64 guid) /*********************************************************/ bool GameObject::hasQuest(uint32 quest_id) const { - QuestRelations const& qr = sObjectMgr.mGOQuestRelations; - for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr) + QuestRelationBounds qr = sObjectMgr.GetGOQuestRelationBounds(GetEntry()); + for (QuestRelations::const_iterator itr = qr.first; itr != qr.second; ++itr) { if (itr->second == quest_id) return true; @@ -753,8 +753,8 @@ bool GameObject::hasQuest(uint32 quest_id) const bool GameObject::hasInvolvedQuest(uint32 quest_id) const { - QuestRelations const& qr = sObjectMgr.mGOQuestInvolvedRelations; - for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr) + QuestRelationBounds qir = sObjectMgr.GetGOQuestInvolvedRelationBounds(GetEntry()); + for (QuestRelations::const_iterator itr = qir.first; itr != qir.second; ++itr) { if (itr->second == quest_id) return true; -- cgit v1.2.3