Core/Quests: Some cleanup in quest relation accessing
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user