-
-
Save anonymous/93a9c41ce79b10332a907b708c3a7cd3 to your computer and use it in GitHub Desktop.
Build 22267
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/FrameXML/QuestFrame.lua b/FrameXML/QuestFrame.lua | |
index f3d2145..a9ea671 100644 | |
--- a/FrameXML/QuestFrame.lua | |
+++ b/FrameXML/QuestFrame.lua | |
@@ -5,6 +5,11 @@ QUEST_DESCRIPTION_GRADIENT_LENGTH = 30; | |
QUEST_DESCRIPTION_GRADIENT_CPS = 70; | |
QUESTINFO_FADE_IN = 0.5; | |
+QUEST_FRAME_AUTO_ACCEPT_QUEST_ID = 0; | |
+QUEST_FRAME_AUTO_ACCEPT_QUEST_START_ITEM_ID = 0; | |
+ | |
+local MIN_RIGHT_BUTTON_WIDTH = 78; | |
+ | |
function QuestFrame_OnLoad(self) | |
self:RegisterEvent("QUEST_GREETING"); | |
self:RegisterEvent("QUEST_DETAIL"); | |
@@ -14,6 +19,16 @@ function QuestFrame_OnLoad(self) | |
self:RegisterEvent("QUEST_ITEM_UPDATE"); | |
self:RegisterEvent("QUEST_LOG_UPDATE"); | |
self:RegisterEvent("UNIT_PORTRAIT_UPDATE"); | |
+ self:RegisterEvent("LEARNED_SPELL_IN_TAB"); | |
+ self:RegisterEvent("QUEST_IGNORED"); | |
+ | |
+ local buttonWidth; | |
+ buttonWidth = max(QuestFrameDetailPanel.IgnoreButton:GetFontString():GetStringWidth() + 30, MIN_RIGHT_BUTTON_WIDTH); | |
+ QuestFrameDetailPanel.IgnoreButton:SetWidth(buttonWidth); | |
+ QuestFrameProgressPanel.IgnoreButton:SetWidth(buttonWidth); | |
+ buttonWidth = max(QuestFrameDetailPanel.UnignoreButton:GetFontString():GetStringWidth() + 30, MIN_RIGHT_BUTTON_WIDTH); | |
+ QuestFrameDetailPanel.UnignoreButton:SetWidth(buttonWidth); | |
+ QuestFrameProgressPanel.UnignoreButton:SetWidth(buttonWidth); | |
end | |
function QuestFrame_OnEvent(self, event, ...) | |
@@ -32,6 +47,25 @@ function QuestFrame_OnEvent(self, event, ...) | |
QuestFrameGreetingPanel:Hide(); | |
QuestFrameGreetingPanel:Show(); | |
elseif ( event == "QUEST_DETAIL" ) then | |
+ local questStartItemID = ...; | |
+ QUEST_FRAME_AUTO_ACCEPT_QUEST_ID = 0; | |
+ QUEST_FRAME_AUTO_ACCEPT_QUEST_START_ITEM_ID = 0; | |
+ | |
+ if ( QuestIsFromAdventureMap() ) then | |
+ HideUIPanel(QuestLogPopupDetailFrame); | |
+ return; | |
+ end | |
+ | |
+ if(questStartItemID ~= nil and questStartItemID ~= 0) then | |
+ QUEST_FRAME_AUTO_ACCEPT_QUEST_ID = GetQuestID(); | |
+ QUEST_FRAME_AUTO_ACCEPT_QUEST_START_ITEM_ID = questStartItemID; | |
+ if (AutoQuestPopupTracker_AddPopUp(GetQuestID(), "OFFER")) then | |
+ PlayAutoAcceptQuestSound(); | |
+ end | |
+ CloseQuest(); | |
+ return; | |
+ end | |
+ | |
if ( QuestGetAutoAccept() and QuestIsFromAreaTrigger()) then | |
if (AutoQuestPopupTracker_AddPopUp(GetQuestID(), "OFFER")) then | |
PlayAutoAcceptQuestSound(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment