Core/Quests: Some cleanup in quest relation accessing

--HG--
branch : trunk
This commit is contained in:
Shauren committed 2010-09-13 13:18:27 +02:00
1 parent c7289967b0
commit 6d0a031a77
6 files changed
+77 -59

No files matched your search

@@ -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;