View Single Post
04-21-18, 02:27 PM   #10
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,917
Originally Posted by Voxxel View Post
Does anyone know what's the BfA replacement for "QuestLogQuests_GetTitleButton" function?
It appears they changed how the Quest Buttons are created. There is now the following function that looks to be the nearest to what the old one did and more.

Code:
function QuestLogQuests_AddQuestButton(prevButton, questLogIndex, poiTable, title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isBounty, isStory, isHidden, isScaling, layoutIndex)
It takes up lines 488 to 660 and looks to be what you have to use now ..


Here is a portion of the Legion QuestMapFrame.lua file that has the function you are talking about.

Code:
	if (not headerCollapsed) then
		local totalHeight = 8;
		titleIndex = titleIndex + 1;
		button = QuestLogQuests_GetTitleButton(titleIndex);
		button.questID = questID;
                ....... A ton of lines setting the button up .... 
                prevButton = button;
       end
And this is the same part in the BfA version of the same file.

Code:
if (not headerCollapsed or C_CampaignInfo.IsCampaignQuest(questID)) then
	local layoutKey = "Other";
	if (C_CampaignInfo.IsCampaignQuest(questID)) then
		layoutKey = "Campaign";
	end
	prevButton = QuestLogQuests_AddQuestButton(prevButton, questLogIndex, poiTable, title, level, 
       suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, 
       isOnMap, hasLocalPOI, isTask, isBounty, isStory, isHidden, isScaling, 
       QuestMapFrame:GetManagedLayoutIndex(layoutKey));
end
__________________
  Reply With Quote