1
0
Bifurcation 0

Needed the local self hack.

Cette révision appartient à :
Nathanial.C.Jones 2013-01-03 01:17:04 +00:00
Parent 9642395354
révision c9a7c07ffc

Voir le fichier

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