Skip to content

Commit

Permalink
Updates the quest abandoning system a little. Updates some quest/NPC …
Browse files Browse the repository at this point in the history
…information for Shadowlands beta.
  • Loading branch information
smaitch committed Oct 21, 2020
1 parent 2188888 commit 5f4476b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 22 deletions.
1 change: 1 addition & 0 deletions Grail-Quests-_classic_/Grail-Quests-_classic_.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4408,5 +4408,6 @@ end
-- 35395 1.13.5 2020-07-30 2020-0x-xx
-- 35753 1.13.5 2020-09-01 2020-09-03
-- 36035 1.13.5 2020-09-24 2020-xx-xx
-- 36307 1.13.5 2020-10-19 2020-10-21

end
1 change: 1 addition & 0 deletions Grail-Quests-_retail_-enUS/Grail-Quests-_retail_-enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33462,6 +33462,7 @@ G[61885]="Eyegor's Special Friends"
G[61947]='Lurking In The Shadows'
G[61948]='Airborne Defense Force'
G[62085]='...Why Me?'
G[62166]="Tal-Inara's Call"
G[62287]='Observing Arenas'
G[62740]='Dark Aspirations'
G[62785]='I Could Be A Contender'
Expand Down
6 changes: 3 additions & 3 deletions Grail-Quests-_retail_/Grail-Quests-_retail_.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33479,7 +33479,7 @@ G[59199]='K4096 L3355647 A:160037 T:160037 P:59198 E34003'
G[59200]='K4096 L3355647 A:160037 T:160037 P:59199 E34003'
G[59202]='K4096 L3553023 A:168381 T:164843 P:59009+59231+60733 E34714'
G[59203]='L3947775 A:159830 T:159830 P:59879 E34714'
G[59206]='L3618815 A:164545 T:162928 P:60737 E34714'
G[59206]='K4096 L3618815 A:164545 T:162928 P:60737 E34714'
G[59209]='E34137' -- TODO: Yoshimo: Revendreth
G[59210]='K4096 L3487231 A:162487 T:164326 P:59172 E34714'
G[59211]='A:-181525 T:-1525 P:a59211'
Expand Down Expand Up @@ -33978,8 +33978,8 @@ G[61631]='K262144 A:-511565 T:-1565 P:a61631'
G[61667]='K262144 A:-351536 T:-1536 P:a61667 E35598'
G[61689]='K262144 A:-251533 T:-1533 P:a61689 E35213'
G[61708]='K262144 A:-281536 T:-1536 P:a61708 E35598'
G[61715]='L3618815 A:162928 T:173384 P:59206 E35167'
G[61716]='L3618815 A:173384 T:700071 P:61715 E35360'
G[61715]='K4096 L3684607 A:162928 T:173384 P:59206 E35167'
G[61716]='K4096 L3684607 A:173384 T:700071 P:61715 E35360'
G[61718]='T:157294'
G[61729]='T:164741 P:59319 E35282'
G[61783]='K278528 A:-141533 T:-1533 P:a61783'
Expand Down
29 changes: 10 additions & 19 deletions Grail/Grail.lua
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@
-- Adds slash command "/grail treasures" which toggles the old method of LOOT_CLOSED to record information when looting.
-- Adds GetCurrencyInfo() which works around issues for which Blizzard API to use.
-- Ensures AzeriteLevelMeetsOrExceeds() checks to make sure API used are present.
-- Reworks quest abandoning to use events instead of the old routines.
--
-- Known Issues
--
Expand Down Expand Up @@ -1268,12 +1269,6 @@ experimental = false, -- currently this implementation does not reduce memory si
QuestFrameCompleteQuestButton:SetScript("OnClick", function() self:_QuestRewardCompleteButton_OnClick() end);
end

self.origAbandonQuestFunction = SetAbandonQuest
SetAbandonQuest = function() self:_QuestAbandonStart() end

self.origConfirmAbandonQuestFunction = AbandonQuest
AbandonQuest = function() self:_QuestAbandonStop() end

-- For the choice of types of quest on Isle of Thunder the following function is eventually
-- called with anId which is associated with the button in the UI.
local newSendQuestChoiceFunction = function(anId) self:_SendQuestChoiceResponse(anId) end
Expand Down Expand Up @@ -2019,7 +2014,7 @@ end,
-- this happens for both abandon and turn-in
-- and turn-in is first, so we can know we are abandoning or not
if nil == self.questTurningIn then
self:_StatusCodeInvalidate({ tonumber(questId) }, self.delayQuestRemoved)
self:_QuestAbandon(questId)
end
self.questTurningIn = nil
end,
Expand Down Expand Up @@ -3353,6 +3348,8 @@ end,
local functionKey = "+"
if "Complete" == callbackType then
functionKey = "="
elseif "Abandon" == callbackType then
functionKey = "-"
end
local message = strformat("%s %s(%d)", functionKey, Grail:QuestName(questId) or "NO NAME", questId)
if "Accept" == callbackType or "Complete" == callbackType then
Expand Down Expand Up @@ -9591,19 +9588,10 @@ print("end:", strgsub(controlTable.something, "|", "*"))
end,

-- Internal Use.
-- Routine used to hook the function for abandoning a quest. This is needed because the events that Blizzard issues
-- are not adequate for our desired tasks. One of three needed for abandoning.
_QuestAbandonStart = function(self)
self.abandoningQuestIndex = GetQuestLogSelection()
self.origAbandonQuestFunction()
end,
_QuestAbandon = function(self, questId)
questId = tonumber(questId)
if nil == questId then return end

-- Internal Use.
-- Routine used to hook the function for abandoning a quest. This is needed because the events that Blizzard issues
-- are not adequate for our desired tasks. One of three needed for abandoning.
_QuestAbandonStop = function(self)
local questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, questId = self:GetQuestLogTitle(self.abandoningQuestIndex)
self.origConfirmAbandonQuestFunction()
if nil ~= self.quests[questId] then
self:_MarkQuestInDatabase(questId, GrailDatabasePlayer["abandonedQuests"])
end
Expand All @@ -9625,6 +9613,9 @@ print("end:", strgsub(controlTable.something, "|", "*"))
end
self:_StatusCodeInvalidate(questsToInvalidate)
end

self:_StatusCodeInvalidate({ questId }, self.delayQuestRemoved)

self:_PostDelayedNotification("Abandon", questId, self.abandonPostNotificationDelay)
end,

Expand Down

0 comments on commit 5f4476b

Please sign in to comment.