Core/Quests: Some cleanup in quest relation accessing
--HG-- branch : trunk
This commit is contained in:
@@ -1315,8 +1315,8 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force)
|
||||
|
||||
bool Creature::hasQuest(uint32 quest_id) const
|
||||
{
|
||||
QuestRelations const& qr = sObjectMgr.mCreatureQuestRelations;
|
||||
for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
|
||||
QuestRelationBounds qr = sObjectMgr.GetCreatureQuestRelationBounds(GetEntry());
|
||||
for (QuestRelations::const_iterator itr = qr.first; itr != qr.second; ++itr)
|
||||
{
|
||||
if (itr->second == quest_id)
|
||||
return true;
|
||||
@@ -1326,8 +1326,8 @@ bool Creature::hasQuest(uint32 quest_id) const
|
||||
|
||||
bool Creature::hasInvolvedQuest(uint32 quest_id) const
|
||||
{
|
||||
QuestRelations const& qr = sObjectMgr.mCreatureQuestInvolvedRelations;
|
||||
for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
|
||||
QuestRelationBounds qir = sObjectMgr.GetCreatureQuestInvolvedRelationBounds(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