Needed the local self hack.
Cette révision appartient à :
Parent
9642395354
révision
c9a7c07ffc
|
@ -5,15 +5,15 @@ local GetTime = QuestHelper_GetTime
|
||||||
|
|
||||||
function QH_Init_Timeslice()
|
function QH_Init_Timeslice()
|
||||||
QuestHelper_Loadtime["init3_start"] = GetTime()
|
QuestHelper_Loadtime["init3_start"] = GetTime()
|
||||||
|
|
||||||
QuestHelper.loading_main = QuestHelper.CreateLoadingCounter()
|
QuestHelper.loading_main = QuestHelper.CreateLoadingCounter()
|
||||||
|
|
||||||
QuestHelper.loading_init3 = QuestHelper.loading_main:MakeSubcategory(0.3)
|
QuestHelper.loading_init3 = QuestHelper.loading_main:MakeSubcategory(0.3)
|
||||||
QuestHelper.loading_flightpath = QuestHelper.loading_main:MakeSubcategory(1)
|
QuestHelper.loading_flightpath = QuestHelper.loading_main:MakeSubcategory(1)
|
||||||
QuestHelper.loading_preroll = QuestHelper.loading_main:MakeSubcategory(1)
|
QuestHelper.loading_preroll = QuestHelper.loading_main:MakeSubcategory(1)
|
||||||
|
|
||||||
local stt = 0
|
local stt = 0
|
||||||
|
|
||||||
-- This is where the slow stuff goes
|
-- This is where the slow stuff goes
|
||||||
-- 4.0.3a Breakage related
|
-- 4.0.3a Breakage related
|
||||||
local datime = time() + 30 -- We're gonna wait 30 seconds, just in case.
|
local datime = time() + 30 -- We're gonna wait 30 seconds, just in case.
|
||||||
|
@ -21,7 +21,9 @@ function QH_Init_Timeslice()
|
||||||
--QuestHelper_BuildZoneLookup()
|
--QuestHelper_BuildZoneLookup()
|
||||||
--QH_Graph_Init()
|
--QH_Graph_Init()
|
||||||
--load_graph_links()
|
--load_graph_links()
|
||||||
|
|
||||||
|
local self = QuestHelper -- whee hack hack hack
|
||||||
|
|
||||||
if QuestHelper_Locale ~= GetLocale() then
|
if QuestHelper_Locale ~= GetLocale() then
|
||||||
self:TextOut(QHText("LOCALE_ERROR"))
|
self:TextOut(QHText("LOCALE_ERROR"))
|
||||||
return
|
return
|
||||||
|
@ -33,10 +35,10 @@ function QH_Init_Timeslice()
|
||||||
QuestHelper = nil
|
QuestHelper = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
QuestHelper_UpgradeDatabase(_G)
|
QuestHelper_UpgradeDatabase(_G)
|
||||||
QuestHelper_UpgradeComplete()
|
QuestHelper_UpgradeComplete()
|
||||||
|
|
||||||
if QuestHelper_IsPolluted(_G) then
|
if QuestHelper_IsPolluted(_G) then
|
||||||
self:TextOut(QHFormat("NAG_POLLUTED"))
|
self:TextOut(QHFormat("NAG_POLLUTED"))
|
||||||
self:Purge(nil, true, true)
|
self:Purge(nil, true, true)
|
||||||
|
@ -47,20 +49,20 @@ function QH_Init_Timeslice()
|
||||||
QuestHelper_Objectives[signature] = QuestHelper_Objectives[signature] or {}
|
QuestHelper_Objectives[signature] = QuestHelper_Objectives[signature] or {}
|
||||||
QuestHelper_FlightInstructors[signature] = QuestHelper_FlightInstructors[signature] or {}
|
QuestHelper_FlightInstructors[signature] = QuestHelper_FlightInstructors[signature] or {}
|
||||||
QuestHelper_FlightRoutes[signature] = QuestHelper_FlightRoutes[signature] or {}
|
QuestHelper_FlightRoutes[signature] = QuestHelper_FlightRoutes[signature] or {}
|
||||||
|
|
||||||
QuestHelper_Quests_Local = QuestHelper_Quests[signature]
|
QuestHelper_Quests_Local = QuestHelper_Quests[signature]
|
||||||
QuestHelper_Objectives_Local = QuestHelper_Objectives[signature]
|
QuestHelper_Objectives_Local = QuestHelper_Objectives[signature]
|
||||||
QuestHelper_FlightInstructors_Local = QuestHelper_FlightInstructors[signature]
|
QuestHelper_FlightInstructors_Local = QuestHelper_FlightInstructors[signature]
|
||||||
QuestHelper_FlightRoutes_Local = QuestHelper_FlightRoutes[signature]
|
QuestHelper_FlightRoutes_Local = QuestHelper_FlightRoutes[signature]
|
||||||
|
|
||||||
QuestHelper_SeenRealms[GetRealmName()] = true -- some attempt at tracking private servers
|
QuestHelper_SeenRealms[GetRealmName()] = true -- some attempt at tracking private servers
|
||||||
|
|
||||||
QuestHelper.loading_init3:SetPercentage(0.1)
|
QuestHelper.loading_init3:SetPercentage(0.1)
|
||||||
QH_Collector_Init()
|
QH_Collector_Init()
|
||||||
QuestHelper.loading_init3:SetPercentage(0.5)
|
QuestHelper.loading_init3:SetPercentage(0.5)
|
||||||
--DB_Init()
|
--DB_Init()
|
||||||
QuestHelper.loading_init3:SetPercentage(0.9)
|
QuestHelper.loading_init3:SetPercentage(0.9)
|
||||||
|
|
||||||
self.player_level = UnitLevel("player")
|
self.player_level = UnitLevel("player")
|
||||||
|
|
||||||
self:SetLocaleFonts()
|
self:SetLocaleFonts()
|
||||||
|
@ -68,11 +70,11 @@ function QH_Init_Timeslice()
|
||||||
if QuestHelper_Pref.share and not QuestHelper_Pref.solo then
|
if QuestHelper_Pref.share and not QuestHelper_Pref.solo then
|
||||||
self:EnableSharing()
|
self:EnableSharing()
|
||||||
end
|
end
|
||||||
|
|
||||||
if QuestHelper_Pref.hide then
|
if QuestHelper_Pref.hide then
|
||||||
self.map_overlay:Hide()
|
self.map_overlay:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
self:HandlePartyChange()
|
self:HandlePartyChange()
|
||||||
|
|
||||||
self:Nag("all")
|
self:Nag("all")
|
||||||
|
@ -86,7 +88,7 @@ function QH_Init_Timeslice()
|
||||||
end
|
end
|
||||||
|
|
||||||
local static = QuestHelper_StaticData[self.locale]
|
local static = QuestHelper_StaticData[self.locale]
|
||||||
|
|
||||||
if static then
|
if static then
|
||||||
if static.flight_instructors then for faction in pairs(static.flight_instructors) do
|
if static.flight_instructors then for faction in pairs(static.flight_instructors) do
|
||||||
if faction ~= self.faction then
|
if faction ~= self.faction then
|
||||||
|
@ -102,13 +104,13 @@ function QH_Init_Timeslice()
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Adding QuestHelper_CharVersion, so I know if I've already converted this characters saved data.
|
-- Adding QuestHelper_CharVersion, so I know if I've already converted this characters saved data.
|
||||||
if not QuestHelper_CharVersion then
|
if not QuestHelper_CharVersion then
|
||||||
-- Changing per-character flight routes, now only storing the flight points they have,
|
-- Changing per-character flight routes, now only storing the flight points they have,
|
||||||
-- will attempt to guess the routes from this.
|
-- will attempt to guess the routes from this.
|
||||||
local routes = {}
|
local routes = {}
|
||||||
|
|
||||||
for i, l in pairs(QuestHelper_KnownFlightRoutes) do
|
for i, l in pairs(QuestHelper_KnownFlightRoutes) do
|
||||||
for key in pairs(l) do
|
for key in pairs(l) do
|
||||||
routes[key] = true
|
routes[key] = true
|
||||||
|
@ -131,7 +133,7 @@ function QH_Init_Timeslice()
|
||||||
if QuestHelper_Pref.map_button then
|
if QuestHelper_Pref.map_button then
|
||||||
-- QuestHelper:InitMapButton()
|
-- QuestHelper:InitMapButton()
|
||||||
end
|
end
|
||||||
|
|
||||||
if QuestHelper_Pref.tomtom_wp_new then
|
if QuestHelper_Pref.tomtom_wp_new then
|
||||||
-- self:EnableTomTom()
|
-- self:EnableTomTom()
|
||||||
end
|
end
|
||||||
|
@ -154,17 +156,17 @@ function QH_Init_Timeslice()
|
||||||
self:LoadDebugObjective(name, data)
|
self:LoadDebugObjective(name, data)
|
||||||
end
|
end
|
||||||
end]]
|
end]]
|
||||||
|
|
||||||
-- wellllp
|
-- wellllp
|
||||||
QH_Arrow_SetScale()
|
QH_Arrow_SetScale()
|
||||||
QH_Arrow_SetTextScale()
|
QH_Arrow_SetTextScale()
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
QH_Timeslice_Add(function ()
|
QH_Timeslice_Add(function ()
|
||||||
self:ResetPathing()
|
self:ResetPathing()
|
||||||
self.Routing:Initialize() -- Set up the routing task
|
self.Routing:Initialize() -- Set up the routing task
|
||||||
end, "init")]] -- FUCK YOU BOXBOT
|
end, "init")]] -- FUCK YOU BOXBOT
|
||||||
|
|
||||||
QH_Event("CHAT_MSG_ADDON", function (...)
|
QH_Event("CHAT_MSG_ADDON", function (...)
|
||||||
local arg1 = select(1,...)
|
local arg1 = select(1,...)
|
||||||
local arg2 = select(2,...)
|
local arg2 = select(2,...)
|
||||||
|
@ -181,25 +183,25 @@ function QH_Init_Timeslice()
|
||||||
--QH_Route_Filter_Rescan("filter_quest_group")
|
--QH_Route_Filter_Rescan("filter_quest_group")
|
||||||
--QH_Route_Filter_Rescan("filter_quest_raid_accessible") -- These should be in right now, but for simplicity's sake we're actually scanning everything when we get a rescan request. So they're unnecessary. PUT THEM BACK should they become necessary.
|
--QH_Route_Filter_Rescan("filter_quest_raid_accessible") -- These should be in right now, but for simplicity's sake we're actually scanning everything when we get a rescan request. So they're unnecessary. PUT THEM BACK should they become necessary.
|
||||||
end)
|
end)
|
||||||
|
|
||||||
QH_Event({"PARTY_MEMBERS_CHANGED", "RAID_ROSTER_UPDATE"}, function ()
|
QH_Event({"PARTY_MEMBERS_CHANGED", "RAID_ROSTER_UPDATE"}, function ()
|
||||||
QH_Questcomm_Sync()
|
QH_Questcomm_Sync()
|
||||||
end)
|
end)
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
QH_Event("PLAYER_LEVEL_UP", function ()
|
QH_Event("PLAYER_LEVEL_UP", function ()
|
||||||
self.player_level = arg1
|
self.player_level = arg1
|
||||||
--QH_Route_Filter_Rescan("filter_quest_level")
|
--QH_Route_Filter_Rescan("filter_quest_level")
|
||||||
end)
|
end)
|
||||||
--[[
|
--[[
|
||||||
QH_Event("TAXIMAP_OPENED", function ()
|
QH_Event("TAXIMAP_OPENED", function ()
|
||||||
self:taxiMapOpened()
|
self:taxiMapOpened()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
QH_Event({"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"}, function()
|
QH_Event({"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"}, function()
|
||||||
QH_Route_Filter_Rescan(nil, true)
|
QH_Route_Filter_Rescan(nil, true)
|
||||||
end)
|
end)
|
||||||
]]
|
]]
|
||||||
QH_Event("CHAT_MSG_CHANNEL_NOTICE", function()
|
QH_Event("CHAT_MSG_CHANNEL_NOTICE", function()
|
||||||
if please_submit_enabled and not please_submit_initted then
|
if please_submit_enabled and not please_submit_initted then
|
||||||
please_submit_enabled = QHNagInit()
|
please_submit_enabled = QHNagInit()
|
||||||
|
@ -207,8 +209,8 @@ function QH_Init_Timeslice()
|
||||||
please_submit_initted = true
|
please_submit_initted = true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
QuestHelper.loading_init3:SetPercentage(1.0) -- victory
|
QuestHelper.loading_init3:SetPercentage(1.0) -- victory
|
||||||
|
|
||||||
QuestHelper_Loadtime["init3_end"] = GetTime()
|
QuestHelper_Loadtime["init3_end"] = GetTime()
|
||||||
end
|
end
|
||||||
|
|
Référencer dans un nouveau ticket