Mercurial > wow > buffalo2
diff ObjectiveEvents.lua @ 16:880828018bf4
ObjectiveEvents
- trim down the number of events that fire full updates
- begin the general outline for determining which trackers need to refresh
- handlers for accepting and completing auto-popup quests
ObjectiveFrame
- correct variables for money reward calculation
- make sure everythign is scaling to the font strings and that the font strings aren't being pinned by SetSize
ObjectiveInfo
- implementation of autoquest popups
- discern between internal and client bonus objective indexes
- acquire the correct data set from bonus objective query
ObjectiveStyle
- look for a style table under the previously interpreted set before deferring standard options
- horizontal/vertical options in gradient
- remove height-fixing for font strings
author | Nenue |
---|---|
date | Tue, 05 Apr 2016 00:39:12 -0400 |
parents | 7923243ae972 |
children | 605e8f0e46db |
line wrap: on
line diff
--- a/ObjectiveEvents.lua Mon Apr 04 03:41:28 2016 -0400 +++ b/ObjectiveEvents.lua Tue Apr 05 00:39:12 2016 -0400 @@ -13,10 +13,31 @@ QUEST_REMOVED = 'OnQuestRemoved' } +--- Using the same values as Blizzard_ObjectiveTracker for use in securehook +local OBJECTIVE_TRACKER_UPDATE_QUEST = 0x0001; +local OBJECTIVE_TRACKER_UPDATE_QUEST_ADDED = 0x0002; +local OBJECTIVE_TRACKER_UPDATE_TASK_ADDED = 0x0004; +local OBJECTIVE_TRACKER_UPDATE_SCENARIO = 0x0008; +local OBJECTIVE_TRACKER_UPDATE_SCENARIO_NEW_STAGE = 0x0010; +local OBJECTIVE_TRACKER_UPDATE_ACHIEVEMENT = 0x0020; +local OBJECTIVE_TRACKER_UPDATE_ACHIEVEMENT_ADDED = 0x0040; +local OBJECTIVE_TRACKER_UPDATE_SCENARIO_BONUS_DELAYED = 0x0080; + +local OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST = 0x0100; +local OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP = 0x0200; +local OBJECTIVE_TRACKER_UPDATE_MODULE_BONUS_OBJECTIVE = 0x0400; +local OBJECTIVE_TRACKER_UPDATE_MODULE_SCENARIO = 0x0800; +local OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT = 0x1000; + +local OBJECTIVE_TRACKER_UPDATE_STATIC = 0x0000; +local OBJECTIVE_TRACKER_UPDATE_ALL = 0xFFFF; + +local OBJECTIVE_TRACKER_UPDATE_REASON = OBJECTIVE_TRACKER_UPDATE_ALL; -- default +local OBJECTIVE_TRACKER_UPDATE_ID = 0; + local HandlerEvents = { - QUEST_ACCEPTED = mod.Quest, - QUEST_REMOVED = mod.Quest, - QUEST_WATCH_LIST_CHANGED = mod.Quest, + QUEST_ACCEPTED = 0x0003, + QUEST_WATCH_LIST_CHANGED = 0x0003, SUPER_TRACKED_QUEST_CHANGED = mod.Quest, QUEST_LOG_UPDATE = mod.Quest, TRACKED_ACHIEVEMENT_LIST_CHANGED = mod.Cheevs, @@ -29,6 +50,7 @@ ['AbandonQuest'] = 'AbandonQuest', ['AcknowledgeAutoAcceptQuest'] = 'AcknowledgeAutoAcceptQuest', ['AddAutoQuestPopUp'] = 'AddAutoQuestPopUp', + ['RemoveAutoQuestPopUp'] = 'RemoveAutoQuestPopUp', ['RemoveTrackedAchievement'] = 'RemoveTrackedAchievement' } @@ -70,7 +92,7 @@ end if HandlerEvents[event] then print('|cFF0088FF'..event..'|r wrapper update') - mod.UpdateWrapper() + mod.UpdateWrapper(event) isHandled = true end if not isHandled then @@ -99,7 +121,7 @@ mod.OnQuestRemoved = function(_, questLogIndex, questID) - mod.UpdateWrapper() + mod.UpdateWrapper(0x00000003) end @@ -109,7 +131,7 @@ --- Function hooks for BlizzUI compatibility ------------------------------------------------------------------- mod.AddQuestWatch = function(questID) - mod.UpdateWrapper() + mod.UpdateWrapper(0x00000003) end mod.RemoveQuestWatch = function(questIndex, ...) @@ -126,7 +148,7 @@ mod.Quest.WatchInfo[info.watchIndex] = nil end - mod.UpdateWrapper() + mod.UpdateWrapper('RemovedQuestWatch' .. tostring(questIndex)) QuestPOIUpdateIcons() end @@ -146,4 +168,13 @@ mod.TurnInQuest = function() QuestPOIUpdateIcons() +end + +mod.AddAutoQuestPopUp = function(...) + print('|cFFFF8800AddAutoQuestPopUp|r', ...) + mod.UpdateWrapper(OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP) +end +mod.RemoveAutoQuestPopUp = function(...) + print('|cFFFF8800RemoveAutoQuestPopUp|r', ...) + mod.UpdateWrapper(OBJECTIVE_TRACKER_UPDATE_MODULE_AUTO_QUEST_POPUP) end \ No newline at end of file