Thread Tools Display Modes
12/16/21, 09:52 AM   #1
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
TrackNextActivityForZoneStory() acts like "show on map"

TrackNextActivityForZoneStory(ZoneID, nil, false) acts like "show on map" if the zone story activity is already in the quest tracker/journal, is there a way to check that before casting it to avoid the unnecessary worldmap opening?
  Reply With Quote
12/16/21, 10:13 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Does not look like there is any way. At least ZOs code neither checks it up in advanced.
Maybe you can check th quest jorunal before calling that func via

Code:
Code:
* CanZoneStoryContinueTrackingActivitiesForCompletionType(*integer* _zoneId_, *[ZoneCompletionType|#ZoneCompletionType]* _zoneCompletionType_)
** _Returns:_ *bool* _canContinueTracking_

* IsJournalQuestIndexInTrackedZoneStory(*luaindex* _journalQuestIndex_)
** _Returns:_ *bool* _isInTrackedZoneStory_
and if it's done already or in your questlog do not call the func?

If this does not work I would had expected the 3rd parameter TrackNextActivityForZoneStory to control the map shwing or not. Maybe this is a bug.
Try to ask ZOs_DanBatson here https://gitter.im/esoui/esoui or here https://www.esoui.com/forums/forumdisplay.php?f=187
  Reply With Quote
12/16/21, 10:33 AM   #3
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Originally Posted by Baertram View Post

Code:
* CanZoneStoryContinueTrackingActivitiesForCompletionType(*integer* _zoneId_, *[ZoneCompletionType|#ZoneCompletionType]* _zoneCompletionType_)
** _Returns:_ *bool* _canContinueTracking_
this one doesn't work in that case

Code:
* IsJournalQuestIndexInTrackedZoneStory(*luaindex* _journalQuestIndex_)
** _Returns:_ *bool* _isInTrackedZoneStory_
I will try that one but I will have to check all quest indexes in a loop if I understand properly,
a IsTrackedZoneStoryInJournalQuest() would have come handy
  Reply With Quote
12/21/21, 01:44 PM   #4
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
It's because of this in QuestTracker.lua

Code:
local function OnZoneStoryQuestActivityTracked(eventId, questIndex)
    self:ForceAssist(questIndex)
    ZO_WorldMap_ShowQuestOnMap(questIndex)
end

trackerPanel:RegisterForEvent(EVENT_ZONE_STORY_QUEST_ACTIVITY_TRACKED, OnZoneStoryQuestActivityTracked)
You'd have to override that event on FOCUSED_QUEST_TRACKER.trackerPanel if you wanted to stop that vanilla behavior. Active quests don't use setAutoMapNavigationTarget at all, so that argument doesn't mean anything for that context. SetAutoMapNavigationTarget is relevant for non-breadcrumbed quests only.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » TrackNextActivityForZoneStory() acts like "show on map"

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off