Hide ignored quests from map

This commit is contained in:
Les De Ridder 2019-01-17 22:01:16 +01:00
parent 829d901a89
commit 19536ba534
1 changed files with 22 additions and 0 deletions

View File

@ -57,11 +57,15 @@ function AO_ToggleIgnoreQuest(questIndex)
if AO_IsQuestIgnored(quest) then
AO_IGNORED_QUESTS[quest.name] = nil
WORLD_MAP_QUEST_BREADCRUMBS:OnQuestAdded(questIndex)
else
AO_IGNORED_QUESTS[quest.name] = true
AO_ORIG_QUEST_CATEGORY_NAMES[quest.name] = quest.categoryName
AO_ORIG_QUEST_CATEGORY_TYPES[quest.name] = quest.categoryType
WORLD_MAP_QUEST_BREADCRUMBS:OnQuestRemoved(false, questIndex)
end
SYSTEMS:GetObject("questJournal"):OnQuestsUpdated()
@ -78,6 +82,10 @@ function AO_GetQuestByIndex(questIndex)
end
function AO_IsQuestIgnored(quest)
if not quest then
return nil
end
return AO_IGNORED_QUESTS[quest.name]
end
@ -154,3 +162,17 @@ FOCUSED_QUEST_TRACKER.BeginTracking = function(self, trackType, arg1, arg2)
return __FOCUSED_QUEST_TRACKER_BeginTracking(self, trackType, arg1, arg2)
end
---
--- WORLD_MAP_QUEST_BREADCRUMBS.RefreshQuest
---
__WORLD_MAP_QUEST_BREADCRUMBS_RefreshQuest = WORLD_MAP_QUEST_BREADCRUMBS.RefreshQuest
WORLD_MAP_QUEST_BREADCRUMBS.RefreshQuest = function(self, questIndex)
__WORLD_MAP_QUEST_BREADCRUMBS_RefreshQuest(self, questIndex)
if AO_IsQuestIgnored(AO_GetQuestByIndex(questIndex)) then
WORLD_MAP_QUEST_BREADCRUMBS:OnQuestRemoved(false, questIndex)
end
end