Originally Posted by Vrul
I'm using this:
Code:
local frame = CreateFrame('Frame')
frame:Hide()
frame:SetScript('OnEvent', function(self, event, ...)
if event == 'GARRISON_MISSION_COMPLETE_RESPONSE' then
local missionID, canComplete, succeeded = ...
if canComplete and succeeded and C_Garrison.CanOpenMissionChest(missionID) then
C_Garrison.MissionBonusRoll(missionID)
end
elseif event == 'GARRISON_MISSION_FINISHED' or event == 'GARRISON_MISSION_NPC_OPENED' then
if not (GarrisonMissionFrame and GarrisonMissionFrame:IsShown()) then return end
local missions = C_Garrison.GetCompleteMissions()
for index = 1, #missions do
C_Garrison.MarkMissionComplete(missions[index].missionID)
end
GarrisonMissionFrame.MissionTab.MissionList.CompleteDialog:Hide()
GarrisonMissionFrameMissions.CompleteDialog:Hide()
self:Show()
else -- event == 'ADDON_LOADED'
if ... ~= 'Blizzard_GarrisonUI' then return end
self:UnregisterEvent(event)
GarrisonMissionFrame:UnregisterEvent('GARRISON_MISSION_FINISHED')
GarrisonMissionFrame.MissionComplete:UnregisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
end
end)
frame:RegisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
frame:RegisterEvent('GARRISON_MISSION_FINISHED')
frame:RegisterEvent('GARRISON_MISSION_NPC_OPENED')
frame:SetScript('OnUpdate', function(self)
self:Hide()
GarrisonMissionList_UpdateMissions()
end)
if GarrisonMissionFrame then
GarrisonMissionFrame:UnregisterEvent('GARRISON_MISSION_FINISHED')
GarrisonMissionFrame.MissionComplete:UnregisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
else
frame:RegisterEvent('ADDON_LOADED')
end
|
this is currently what i am now using and ty vrul for the materials...
i made an addon using the most basic things (as this is not really my gig and am horrible making addons) but there is only one problem i feel with your lua.
while i wanted the animations of both the followers completing and the chest to stop having a wait time, that is as far as i want the addon to go. i didnt want it to stop telling what i received from completing or the bonuses of currency/xp/etc.
is there something you can tell me (perhaps reposting an edited code) that would have this effect? i really want it for its functions before i click the chest. all else i want it to do is behave normally so that i can see the bonuses being awarded and whatnot.
thanks ahead of time.
P.S. if you do this and package it as a zip a LOT of ppl are going to want this instead of many of the other addons that have so many bugs.
this one hasnt screwed in any bugs yet. will post if that changes or if the edited post has bugs) KEEP THIS IDEA ALIVE PLZ!