Forgot the parenthesis.
Cette révision appartient à :
Parent
6a137a38a8
révision
39c8f81f24
|
@ -122,7 +122,7 @@ end
|
||||||
|
|
||||||
local function FileCheck()
|
local function FileCheck()
|
||||||
local file_problem_version = false
|
local file_problem_version = false
|
||||||
|
|
||||||
local expected_version = GetAddOnMetadata("QuestHelper", "Version")
|
local expected_version = GetAddOnMetadata("QuestHelper", "Version")
|
||||||
|
|
||||||
-- Why are we checking to make sure these files load?
|
-- Why are we checking to make sure these files load?
|
||||||
|
@ -131,11 +131,11 @@ local function FileCheck()
|
||||||
local expected_files =
|
local expected_files =
|
||||||
{
|
{
|
||||||
["bst_pre.lua"] = true,
|
["bst_pre.lua"] = true,
|
||||||
|
|
||||||
["manager_event.lua"] = true,
|
["manager_event.lua"] = true,
|
||||||
["manager_achievement.lua"] = true,
|
["manager_achievement.lua"] = true,
|
||||||
["manager_completed.lua"] = true,
|
["manager_completed.lua"] = true,
|
||||||
|
|
||||||
-- ["upgrade.lua"] = true,
|
-- ["upgrade.lua"] = true,
|
||||||
["pref.lua"] = true,
|
["pref.lua"] = true,
|
||||||
["vars.lua"] = true,
|
["vars.lua"] = true,
|
||||||
|
@ -169,7 +169,7 @@ local function FileCheck()
|
||||||
-- ["tooltip.lua"] = true,
|
-- ["tooltip.lua"] = true,
|
||||||
["arrow.lua"] = true,
|
["arrow.lua"] = true,
|
||||||
-- ["radar.lua"] = true,
|
-- ["radar.lua"] = true,
|
||||||
|
|
||||||
["config.lua"] = true,
|
["config.lua"] = true,
|
||||||
["collect.lua"] = true,
|
["collect.lua"] = true,
|
||||||
["collect_achievement.lua"] = true,
|
["collect_achievement.lua"] = true,
|
||||||
|
@ -194,26 +194,26 @@ local function FileCheck()
|
||||||
["collect_upgrade.lua"] = true,
|
["collect_upgrade.lua"] = true,
|
||||||
["collect_merchant.lua"] = true,
|
["collect_merchant.lua"] = true,
|
||||||
["collect_warp.lua"] = true,
|
["collect_warp.lua"] = true,
|
||||||
|
|
||||||
-- ["filter_core.lua"] = true,
|
-- ["filter_core.lua"] = true,
|
||||||
-- ["filter_base.lua"] = true,
|
-- ["filter_base.lua"] = true,
|
||||||
|
|
||||||
-- ["routing_debug.lua"] = true,
|
-- ["routing_debug.lua"] = true,
|
||||||
-- ["routing_loc.lua"] = true,
|
-- ["routing_loc.lua"] = true,
|
||||||
-- ["routing_route.lua"] = true,
|
-- ["routing_route.lua"] = true,
|
||||||
-- ["routing_core.lua"] = true,
|
-- ["routing_core.lua"] = true,
|
||||||
-- ["routing_controller.lua"] = true,
|
-- ["routing_controller.lua"] = true,
|
||||||
-- ["routing_hidden.lua"] = true,
|
-- ["routing_hidden.lua"] = true,
|
||||||
|
|
||||||
-- ["director_quest.lua"] = true,
|
-- ["director_quest.lua"] = true,
|
||||||
-- ["director_achievement.lua"] = true,
|
-- ["director_achievement.lua"] = true,
|
||||||
-- ["director_find.lua"] = true,
|
-- ["director_find.lua"] = true,
|
||||||
|
|
||||||
-- ["db_get.lua"] = true,
|
-- ["db_get.lua"] = true,
|
||||||
|
|
||||||
-- ["graph_core.lua"] = true,
|
-- ["graph_core.lua"] = true,
|
||||||
-- ["graph_flightpath.lua"] = true,
|
-- ["graph_flightpath.lua"] = true,
|
||||||
|
|
||||||
["AstrolabeQH/Astrolabe.lua"] = true,
|
["AstrolabeQH/Astrolabe.lua"] = true,
|
||||||
["AstrolabeQH/AstrolabeMapMonitor.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
|
if not (expected_version == "Development Version" and file:match("static.*")) then file_problem_version = true end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Don't need this table anymore.
|
-- Don't need this table anymore.
|
||||||
QuestHelper_File = nil
|
QuestHelper_File = nil
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ local function FinalProblemChecks(uninstallederr, file_problem_version)
|
||||||
if QuestHelper_StaticData and not QuestHelper_StaticData[GetLocale()] then
|
if QuestHelper_StaticData and not QuestHelper_StaticData[GetLocale()] then
|
||||||
local errmsg = "Static data does not seem to exist"
|
local errmsg = "Static data does not seem to exist"
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(errmsg)
|
DEFAULT_CHAT_FRAME:AddMessage(errmsg)
|
||||||
|
|
||||||
uninstallederr = uninstallederr .. " " .. errmsg .. "\n"
|
uninstallederr = uninstallederr .. " " .. errmsg .. "\n"
|
||||||
file_problem_version = true
|
file_problem_version = true
|
||||||
end
|
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
|
QuestHelper = nil -- Just in case anybody else is checking for us, we're not home
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not GetCategoryList or not GetQuestLogSpecialItemInfo or not WatchFrame_RemoveObjectiveHandler then
|
if not GetCategoryList or not GetQuestLogSpecialItemInfo or not WatchFrame_RemoveObjectiveHandler then
|
||||||
QH_fixedmessage(QHText("PRIVATE_SERVER"))
|
QH_fixedmessage(QHText("PRIVATE_SERVER"))
|
||||||
QuestHelper_ErrorCatcher_ExplicitError(false, "error id cakbep ten T")
|
QuestHelper_ErrorCatcher_ExplicitError(false, "error id cakbep ten T")
|
||||||
QuestHelper = nil
|
QuestHelper = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not DongleStub or not QH_Astrolabe_Ready then
|
if not DongleStub or not QH_Astrolabe_Ready then
|
||||||
QH_fixedmessage(QHText("NOT_UNZIPPED_CORRECTLY"))
|
QH_fixedmessage(QHText("NOT_UNZIPPED_CORRECTLY"))
|
||||||
QuestHelper_ErrorCatcher_ExplicitError(false, "not-unzipped-properly")
|
QuestHelper_ErrorCatcher_ExplicitError(false, "not-unzipped-properly")
|
||||||
|
@ -289,9 +289,9 @@ end
|
||||||
|
|
||||||
function QuestHelper_AddonLoadedHandler(addonid)
|
function QuestHelper_AddonLoadedHandler(addonid)
|
||||||
if addonid ~= "QuestHelper" then return end
|
if addonid ~= "QuestHelper" then return end
|
||||||
|
|
||||||
-- ONLY FAST STUFF ALLOWED IN HERE
|
-- ONLY FAST STUFF ALLOWED IN HERE
|
||||||
QH_QueryQuestsCompleted
|
QH_QueryQuestsCompleted()
|
||||||
|
|
||||||
-- Use DefaultPref as fallback for unset preference keys.
|
-- Use DefaultPref as fallback for unset preference keys.
|
||||||
setmetatable(QuestHelper_Pref, {__index=QuestHelper_DefaultPref})
|
setmetatable(QuestHelper_Pref, {__index=QuestHelper_DefaultPref})
|
||||||
|
@ -300,15 +300,15 @@ function QuestHelper_AddonLoadedHandler(addonid)
|
||||||
ShouldTrackingBeEnabled(QuestHelper_Pref.track and not QuestHelper_Pref.hide)
|
ShouldTrackingBeEnabled(QuestHelper_Pref.track and not QuestHelper_Pref.hide)
|
||||||
|
|
||||||
local self = QuestHelper -- whee hack hack hack
|
local self = QuestHelper -- whee hack hack hack
|
||||||
|
|
||||||
QuestHelper_Loadtime["init2_start"] = GetTime()
|
QuestHelper_Loadtime["init2_start"] = GetTime()
|
||||||
|
|
||||||
-- File Check
|
-- File Check
|
||||||
local uninstallederr, file_problem_version = FileCheck()
|
local uninstallederr, file_problem_version = FileCheck()
|
||||||
if not FinalProblemChecks(uninstallederr, file_problem_version) then return end -- Something is borked.
|
if not FinalProblemChecks(uninstallederr, file_problem_version) then return end -- Something is borked.
|
||||||
|
|
||||||
QuestHelper_ErrorCatcher_CompletelyStarted()
|
QuestHelper_ErrorCatcher_CompletelyStarted()
|
||||||
|
|
||||||
if not QuestHelper_StaticData then
|
if not QuestHelper_StaticData then
|
||||||
-- If there is no static data for some mysterious reason, create an empty table so that
|
-- 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.
|
-- 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.
|
QuestHelper_UID = nil -- We are moving this into Collector.
|
||||||
end
|
end
|
||||||
QuestHelper_SaveDate = time()
|
QuestHelper_SaveDate = time()
|
||||||
|
|
||||||
QH_Timeslice_Add(QH_Init_Timeslice, "preinit")
|
QH_Timeslice_Add(QH_Init_Timeslice, "preinit")
|
||||||
|
|
||||||
QuestHelper_Loadtime["init2_end"] = GetTime()
|
QuestHelper_Loadtime["init2_end"] = GetTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ QH_Event("ADDON_LOADED", QuestHelper_AddonLoadedHandler)
|
||||||
--[==[
|
--[==[
|
||||||
function QuestHelper:OnEvent(event)
|
function QuestHelper:OnEvent(event)
|
||||||
local tstart = GetTime()
|
local tstart = GetTime()
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
if event == "GOSSIP_SHOW" then
|
if event == "GOSSIP_SHOW" then
|
||||||
local name, id = UnitName("npc"), self:GetUnitID("npc")
|
local name, id = UnitName("npc"), self:GetUnitID("npc")
|
||||||
|
@ -473,7 +473,7 @@ function QuestHelper:OnEvent(event)
|
||||||
end]]
|
end]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--[[if event == "QUEST_DETAIL" then
|
--[[if event == "QUEST_DETAIL" then
|
||||||
if not self.quest_giver then self.quest_giver = {} end
|
if not self.quest_giver then self.quest_giver = {} end
|
||||||
|
@ -574,13 +574,13 @@ function QuestHelper:OnEvent(event)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end]]
|
end]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if event == "ZONE_CHANGED" or event == "ZONE_CHANGED_INDOORS" or event == "ZONE_CHANGED_NEW_AREA" then
|
if event == "ZONE_CHANGED" or event == "ZONE_CHANGED_INDOORS" or event == "ZONE_CHANGED_NEW_AREA" then
|
||||||
QH_Route_Filter_Rescan()
|
QH_Route_Filter_Rescan()
|
||||||
end
|
end
|
||||||
|
|
||||||
QH_Timeslice_Increment(GetTime() - tstart, "event")
|
QH_Timeslice_Increment(GetTime() - tstart, "event")
|
||||||
end]==]
|
end]==]
|
||||||
|
|
||||||
|
@ -594,9 +594,9 @@ QH_OnUpdate_High(function ()
|
||||||
local self = QuestHelper -- hoorj
|
local self = QuestHelper -- hoorj
|
||||||
local tstart = GetTime()
|
local tstart = GetTime()
|
||||||
frams = frams + 1
|
frams = frams + 1
|
||||||
|
|
||||||
if not QuestHelper_Loadtime["onupdate"] then QuestHelper_Loadtime["onupdate"] = GetTime() end
|
if not QuestHelper_Loadtime["onupdate"] then QuestHelper_Loadtime["onupdate"] = GetTime() end
|
||||||
|
|
||||||
if false and frams == 60 then
|
if false and frams == 60 then
|
||||||
self:ShowText([[
|
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
|
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:
|
Known bugs and issues include:
|
||||||
|
|
||||||
|cff40bbffNo support for "/qh find"|r
|
|cff40bbffNo support for "/qh find"|r
|
||||||
|
|
||||||
|cff40bbffNo support for in-party quest synchronization|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.
|
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)
|
Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10)
|
||||||
end
|
end
|
||||||
|
|
||||||
--if frams == 5000 then please_submit_enabled = false end -- TOOK TOO LONG >:(
|
--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
|
if please_submit_enabled and startup_time and startup_time + 10 < GetTime() then
|
||||||
QuestHelper:TextOut(QHText("PLEASE_SUBMIT"))
|
QuestHelper:TextOut(QHText("PLEASE_SUBMIT"))
|
||||||
|
@ -621,7 +621,7 @@ Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10)
|
||||||
please_submit_enabled = false
|
please_submit_enabled = false
|
||||||
end
|
end
|
||||||
QHUpdateNagTick() -- These probably shouldn't be in OnUpdate. Eventually I'll move them somewhere cleaner.
|
QHUpdateNagTick() -- These probably shouldn't be in OnUpdate. Eventually I'll move them somewhere cleaner.
|
||||||
--[[
|
--[[
|
||||||
if not ontaxi and UnitOnTaxi("player") then
|
if not ontaxi and UnitOnTaxi("player") then
|
||||||
self:flightBegan()
|
self:flightBegan()
|
||||||
interruptcount = 0
|
interruptcount = 0
|
||||||
|
@ -660,12 +660,12 @@ Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10)
|
||||||
|
|
||||||
local nc, nz, nx, ny = self.Astrolabe:GetCurrentPlayerPosition()
|
local nc, nz, nx, ny = self.Astrolabe:GetCurrentPlayerPosition()
|
||||||
local tc, tx, ty
|
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.
|
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)
|
tc, tx, ty = self.Astrolabe:GetAbsoluteContinentPosition(nc, nz, nx, ny)
|
||||||
QuestHelper: Assert(tc and tx and ty) -- is it true? nobody knows! :D
|
QuestHelper: Assert(tc and tx and ty) -- is it true? nobody knows! :D
|
||||||
end
|
end
|
||||||
|
|
||||||
if nc and nc == self.c and map_shown_decay > 0 and self.z > 0 and self.z ~= nz then
|
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
|
-- 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.
|
-- 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
|
nz, nx, ny = self.z, nnx, nny
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if nc and nc > 0 and nz == 0 and nc == self.c and self.z > 0 then
|
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.")
|
--QuestHelper:Assert(nx < math.huge, "Broken at this point.")
|
||||||
nx, ny = self.Astrolabe:TranslateWorldMapPosition(nc, nz, nx, ny, nc, self.z)
|
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]
|
--self.i = QuestHelper_IndexLookup[nc][nz]
|
||||||
--if upd_zone then QH_Route_Filter_Rescan("filter_zone") end
|
--if upd_zone then QH_Route_Filter_Rescan("filter_zone") end
|
||||||
end
|
end
|
||||||
|
|
||||||
if nc and nz and nx and ny and tc and tx and ty then
|
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_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_ac, self.collect_ax, self.collect_ay = tc, tx, ty
|
||||||
self.collect_delayed = false
|
self.collect_delayed = false
|
||||||
|
|
||||||
local ibi = self.InBrokenInstance
|
local ibi = self.InBrokenInstance
|
||||||
if nc < -77 then self.InBrokenInstance = true else self.InBrokenInstance = false end
|
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
|
if ibi and not self.InBrokenInstance then self.minimap_marker:OnUpdate(0) end -- poke
|
||||||
else
|
else
|
||||||
self.collect_delayed = true
|
self.collect_delayed = true
|
||||||
self.InBrokenInstance = true
|
self.InBrokenInstance = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if not UnitOnTaxi("player") and not UnitIsDeadOrGhost("player") then
|
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
|
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
|
end
|
||||||
|
|
||||||
QH_Timeslice_Toggle("routing", not not self.c)
|
QH_Timeslice_Toggle("routing", not not self.c)
|
||||||
|
|
||||||
self:PumpCommMessages()
|
self:PumpCommMessages()
|
||||||
--end
|
--end
|
||||||
end)
|
end)
|
||||||
|
|
Référencer dans un nouveau ticket