From 39c8f81f2445494b2dbdbe6d31e0435acc5a22f9 Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Thu, 3 Jan 2013 01:03:19 +0000 Subject: [PATCH] Forgot the parenthesis. --- QuestHelper/main.lua | 78 ++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/QuestHelper/main.lua b/QuestHelper/main.lua index 9ba42fa..75094f5 100644 --- a/QuestHelper/main.lua +++ b/QuestHelper/main.lua @@ -122,7 +122,7 @@ end local function FileCheck() local file_problem_version = false - + local expected_version = GetAddOnMetadata("QuestHelper", "Version") -- Why are we checking to make sure these files load? @@ -131,11 +131,11 @@ local function FileCheck() local expected_files = { ["bst_pre.lua"] = true, - + ["manager_event.lua"] = true, ["manager_achievement.lua"] = true, ["manager_completed.lua"] = true, - + -- ["upgrade.lua"] = true, ["pref.lua"] = true, ["vars.lua"] = true, @@ -169,7 +169,7 @@ local function FileCheck() -- ["tooltip.lua"] = true, ["arrow.lua"] = true, -- ["radar.lua"] = true, - + ["config.lua"] = true, ["collect.lua"] = true, ["collect_achievement.lua"] = true, @@ -194,26 +194,26 @@ local function FileCheck() ["collect_upgrade.lua"] = true, ["collect_merchant.lua"] = true, ["collect_warp.lua"] = true, - + -- ["filter_core.lua"] = true, -- ["filter_base.lua"] = true, - + -- ["routing_debug.lua"] = true, -- ["routing_loc.lua"] = true, -- ["routing_route.lua"] = true, -- ["routing_core.lua"] = true, -- ["routing_controller.lua"] = true, -- ["routing_hidden.lua"] = true, - + -- ["director_quest.lua"] = true, -- ["director_achievement.lua"] = true, -- ["director_find.lua"] = true, - + -- ["db_get.lua"] = true, - + -- ["graph_core.lua"] = true, -- ["graph_flightpath.lua"] = true, - + ["AstrolabeQH/Astrolabe.lua"] = true, ["AstrolabeQH/AstrolabeMapMonitor.lua"] = true, } @@ -247,7 +247,7 @@ local function FileCheck() if not (expected_version == "Development Version" and file:match("static.*")) then file_problem_version = true end end end - + -- Don't need this table anymore. QuestHelper_File = nil @@ -258,7 +258,7 @@ local function FinalProblemChecks(uninstallederr, file_problem_version) if QuestHelper_StaticData and not QuestHelper_StaticData[GetLocale()] then local errmsg = "Static data does not seem to exist" DEFAULT_CHAT_FRAME:AddMessage(errmsg) - + uninstallederr = uninstallederr .. " " .. errmsg .. "\n" file_problem_version = true end @@ -269,14 +269,14 @@ local function FinalProblemChecks(uninstallederr, file_problem_version) QuestHelper = nil -- Just in case anybody else is checking for us, we're not home return end - + if not GetCategoryList or not GetQuestLogSpecialItemInfo or not WatchFrame_RemoveObjectiveHandler then QH_fixedmessage(QHText("PRIVATE_SERVER")) QuestHelper_ErrorCatcher_ExplicitError(false, "error id cakbep ten T") QuestHelper = nil return end - + if not DongleStub or not QH_Astrolabe_Ready then QH_fixedmessage(QHText("NOT_UNZIPPED_CORRECTLY")) QuestHelper_ErrorCatcher_ExplicitError(false, "not-unzipped-properly") @@ -289,9 +289,9 @@ end function QuestHelper_AddonLoadedHandler(addonid) if addonid ~= "QuestHelper" then return end - + -- ONLY FAST STUFF ALLOWED IN HERE - QH_QueryQuestsCompleted + QH_QueryQuestsCompleted() -- Use DefaultPref as fallback for unset preference keys. setmetatable(QuestHelper_Pref, {__index=QuestHelper_DefaultPref}) @@ -300,15 +300,15 @@ function QuestHelper_AddonLoadedHandler(addonid) ShouldTrackingBeEnabled(QuestHelper_Pref.track and not QuestHelper_Pref.hide) local self = QuestHelper -- whee hack hack hack - + QuestHelper_Loadtime["init2_start"] = GetTime() - + -- File Check local uninstallederr, file_problem_version = FileCheck() if not FinalProblemChecks(uninstallederr, file_problem_version) then return end -- Something is borked. QuestHelper_ErrorCatcher_CompletelyStarted() - + if not QuestHelper_StaticData then -- If there is no static data for some mysterious reason, create an empty table so that -- other parts of the code can carry on as usual, using locally collected data if it exists. @@ -324,9 +324,9 @@ function QuestHelper_AddonLoadedHandler(addonid) QuestHelper_UID = nil -- We are moving this into Collector. end QuestHelper_SaveDate = time() - + QH_Timeslice_Add(QH_Init_Timeslice, "preinit") - + QuestHelper_Loadtime["init2_end"] = GetTime() end @@ -335,7 +335,7 @@ QH_Event("ADDON_LOADED", QuestHelper_AddonLoadedHandler) --[==[ function QuestHelper:OnEvent(event) local tstart = GetTime() - + --[[ if event == "GOSSIP_SHOW" then local name, id = UnitName("npc"), self:GetUnitID("npc") @@ -473,7 +473,7 @@ function QuestHelper:OnEvent(event) end]] - + --[[if event == "QUEST_DETAIL" then if not self.quest_giver then self.quest_giver = {} end @@ -574,13 +574,13 @@ function QuestHelper:OnEvent(event) end end end]] - - + + if event == "ZONE_CHANGED" or event == "ZONE_CHANGED_INDOORS" or event == "ZONE_CHANGED_NEW_AREA" then QH_Route_Filter_Rescan() end - + QH_Timeslice_Increment(GetTime() - tstart, "event") end]==] @@ -594,9 +594,9 @@ QH_OnUpdate_High(function () local self = QuestHelper -- hoorj local tstart = GetTime() frams = frams + 1 - + if not QuestHelper_Loadtime["onupdate"] then QuestHelper_Loadtime["onupdate"] = GetTime() end - + if false and frams == 60 then self:ShowText([[ This is a |cffff8000beta of QuestHelper|r. Be warned: It may crash. It may lock up. It may give bad advice. It may spew errors. It shouldn't spam people, delete your hard-won epics, or make your computer catch on fire, but technically I'm giving no guarantees. |cffff8000If you want a polished, functioning product, close WoW, download the official QH release from curse.com, and use that.|r @@ -604,7 +604,7 @@ This is a |cffff8000beta of QuestHelper|r. Be warned: It may crash. It may lock Known bugs and issues include: |cff40bbffNo support for "/qh find"|r - + |cff40bbffNo support for in-party quest synchronization|r These may not be fixed before the official 1.0 release - I'm hoping to get them all finished up in time for 1.1. @@ -613,7 +613,7 @@ If you encounter any issue besides the ones listed here, please please please re Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10) end - + --if frams == 5000 then please_submit_enabled = false end -- TOOK TOO LONG >:( if please_submit_enabled and startup_time and startup_time + 10 < GetTime() then QuestHelper:TextOut(QHText("PLEASE_SUBMIT")) @@ -621,7 +621,7 @@ Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10) please_submit_enabled = false end QHUpdateNagTick() -- These probably shouldn't be in OnUpdate. Eventually I'll move them somewhere cleaner. ---[[ +--[[ if not ontaxi and UnitOnTaxi("player") then self:flightBegan() interruptcount = 0 @@ -660,12 +660,12 @@ Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10) local nc, nz, nx, ny = self.Astrolabe:GetCurrentPlayerPosition() local tc, tx, ty - + if nc and nc ~= -1 and nc ~= 6 then -- We just want the raw data here, before we've done anything clever. tc, tx, ty = self.Astrolabe:GetAbsoluteContinentPosition(nc, nz, nx, ny) QuestHelper: Assert(tc and tx and ty) -- is it true? nobody knows! :D end - + if nc and nc == self.c and map_shown_decay > 0 and self.z > 0 and self.z ~= nz then -- There's a chance Astrolable will return the wrong zone if you're messing with the world map, if you can -- be seen in that zone but aren't in it. @@ -674,7 +674,7 @@ Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10) nz, nx, ny = self.z, nnx, nny end end - + if nc and nc > 0 and nz == 0 and nc == self.c and self.z > 0 then --QuestHelper:Assert(nx < math.huge, "Broken at this point.") nx, ny = self.Astrolabe:TranslateWorldMapPosition(nc, nz, nx, ny, nc, self.z) @@ -693,27 +693,27 @@ Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10) --self.i = QuestHelper_IndexLookup[nc][nz] --if upd_zone then QH_Route_Filter_Rescan("filter_zone") end end - + if nc and nz and nx and ny and tc and tx and ty then self.collect_rc, self.collect_rz, self.collect_rx, self.collect_ry = nc, nz, nx, ny self.collect_ac, self.collect_ax, self.collect_ay = tc, tx, ty self.collect_delayed = false - + local ibi = self.InBrokenInstance if nc < -77 then self.InBrokenInstance = true else self.InBrokenInstance = false end - + if ibi and not self.InBrokenInstance then self.minimap_marker:OnUpdate(0) end -- poke else self.collect_delayed = true self.InBrokenInstance = true end - + if not UnitOnTaxi("player") and not UnitIsDeadOrGhost("player") then QuestHelper.routing_ac, QuestHelper.routing_ax, QuestHelper.routing_ay, QuestHelper.routing_c, QuestHelper.routing_z = QuestHelper.collect_ac, QuestHelper.collect_ax, QuestHelper.collect_ay, QuestHelper.c, QuestHelper.z end QH_Timeslice_Toggle("routing", not not self.c) - + self:PumpCommMessages() --end end)