A bunch of changes dealing with the replacement of Astrolabe.lua.
Cette révision appartient à :
Parent
302d44b8ac
révision
cea96d1c2b
|
@ -17,14 +17,14 @@ local function getitall(name)
|
||||||
segments[dbi] = true
|
segments[dbi] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local segwork = {}
|
local segwork = {}
|
||||||
for k in pairs(segments) do
|
for k in pairs(segments) do
|
||||||
table.insert(segwork, {k, 1, k[1]})
|
table.insert(segwork, {k, 1, k[1]})
|
||||||
end
|
end
|
||||||
|
|
||||||
local found = {}
|
local found = {}
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
local lowest = segwork[1][3]
|
local lowest = segwork[1][3]
|
||||||
local highest = segwork[1][3]
|
local highest = segwork[1][3]
|
||||||
|
@ -41,7 +41,7 @@ local function getitall(name)
|
||||||
highest = v
|
highest = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if lowest == highest then
|
if lowest == highest then
|
||||||
table.insert(found, lowest)
|
table.insert(found, lowest)
|
||||||
segwork[1][2] = segwork[1][2] + 1
|
segwork[1][2] = segwork[1][2] + 1
|
||||||
|
@ -54,10 +54,10 @@ local function getitall(name)
|
||||||
segwork[lid][3] = segwork[lid][3] + segwork[lid][1][segwork[lid][2]]
|
segwork[lid][3] = segwork[lid][3] + segwork[lid][1][segwork[lid][2]]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not segwork[lid][1][segwork[lid][2]] then break end
|
if not segwork[lid][1][segwork[lid][2]] then break end
|
||||||
end
|
end
|
||||||
|
|
||||||
return found
|
return found
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ local function generate_objective(dbi)
|
||||||
QuestHelper: Assert(QuestHelper_ParentLookup[v.p], v.p)
|
QuestHelper: Assert(QuestHelper_ParentLookup[v.p], v.p)
|
||||||
table.insert(clooster, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, cluster = clooster, tracker_hidden = true, why = why, map_desc = {QuestHelper:HighlightText(dbi.name)}, tracker_desc = dbi.name, map_suppress_ignore = true, map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(clooster) end) end})
|
table.insert(clooster, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, cluster = clooster, tracker_hidden = true, why = why, map_desc = {QuestHelper:HighlightText(dbi.name)}, tracker_desc = dbi.name, map_suppress_ignore = true, map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(clooster) end) end})
|
||||||
end
|
end
|
||||||
|
|
||||||
QH_Route_ClusterAdd(clooster)
|
QH_Route_ClusterAdd(clooster)
|
||||||
custom_find[dbi.name] = clooster
|
custom_find[dbi.name] = clooster
|
||||||
else
|
else
|
||||||
|
@ -84,29 +84,30 @@ end
|
||||||
|
|
||||||
local msfires = {desc = QHText("FIND_CUSTOM_LOCATION"), tracker_desc = QHText("FIND_CUSTOM_LOCATION")}
|
local msfires = {desc = QHText("FIND_CUSTOM_LOCATION"), tracker_desc = QHText("FIND_CUSTOM_LOCATION")}
|
||||||
|
|
||||||
local function QH_FindCoord(locx, locy, locz, label)
|
local function QH_FindCoord(locx, locy, locm, locf, label)
|
||||||
if type(locz) ~= "number" then -- If it is a number, we are probably doing an elder right now.
|
-- Note: this part will not work until something is done about QuestHelper_NameLookup
|
||||||
label = locz .. " (" .. locx .. ", " .. locy .. ")"
|
if type(locm) ~= "number" then -- If it is a number, we are probably doing an elder right now.
|
||||||
|
label = locm .. " (" .. locx .. ", " .. locy .. ")"
|
||||||
for z, nam in pairs(QuestHelper_NameLookup) do
|
for z, nam in pairs(QuestHelper_NameLookup) do
|
||||||
if nam:lower():find(locz:lower()) then
|
if nam:lower():find(locm:lower()) then
|
||||||
locz = z
|
locm = z
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(locz) == "number" then
|
if type(locm) == "number" then
|
||||||
if not custom_find[label] then
|
if not custom_find[label] then
|
||||||
local ec, ez = unpack(QuestHelper_ZoneLookup[locz])
|
local em, ef = locm, locf
|
||||||
local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(ec, ez, locx / 100, locy / 100)
|
local x, y = locx / 100, locy / 100
|
||||||
local node = {loc = {x = x, y = y, p = locz, c = QuestHelper_ParentLookup[locz]}, why = {desc = label, tracker_desc = label}, map_desc = {label}, tracker_desc = label, tracker_hidden = true}
|
local node = {loc = {x = x, y = y, m = em, f = ef}, why = {desc = label, tracker_desc = label}, map_desc = {label}, tracker_desc = label, tracker_hidden = true}
|
||||||
local cluster = {node}
|
local cluster = {node}
|
||||||
node.cluster = cluster
|
node.cluster = cluster
|
||||||
|
|
||||||
custom_find[label] = cluster
|
custom_find[label] = cluster
|
||||||
node.map_suppress_ignore = true
|
node.map_suppress_ignore = true
|
||||||
node.map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(cluster); custom_find[cluster.tracker_desc] = nil end) end
|
node.map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(cluster); custom_find[cluster.tracker_desc] = nil end) end
|
||||||
|
|
||||||
QH_Route_ClusterAdd(cluster)
|
QH_Route_ClusterAdd(cluster)
|
||||||
else
|
else
|
||||||
QH_Route_ClusterRemove(custom_find[label])
|
QH_Route_ClusterRemove(custom_find[label])
|
||||||
|
@ -118,18 +119,18 @@ end
|
||||||
local function QH_FindLoc(locd)
|
local function QH_FindLoc(locd)
|
||||||
-- I just know some guy's gonna get pissed off because he was trying to find "loc crocolisk" or something, but screw him
|
-- I just know some guy's gonna get pissed off because he was trying to find "loc crocolisk" or something, but screw him
|
||||||
local locx, locy, locz
|
local locx, locy, locz
|
||||||
|
|
||||||
locx, locy = locd:match("^(%d+) (%d+)$")
|
locx, locy = locd:match("^(%d+) (%d+)$")
|
||||||
if locx and locy then
|
if locx and locy then
|
||||||
locx, locy = tonumber(locx), tonumber(locy)
|
locx, locy = tonumber(locx), tonumber(locy)
|
||||||
locz = QuestHelper_NameLookup[QuestHelper_IndexLookup[QuestHelper.routing_c][QuestHelper.routing_z]]
|
locz = QuestHelper_NameLookup[QuestHelper_IndexLookup[QuestHelper.routing_c][QuestHelper.routing_z]]
|
||||||
end
|
end
|
||||||
|
|
||||||
if not locx then
|
if not locx then
|
||||||
locz, locx, locy = locd:match("^(.+) (%d+) (%d+)$")
|
locz, locx, locy = locd:match("^(.+) (%d+) (%d+)$")
|
||||||
locx, locy = tonumber(locx), tonumber(locy)
|
locx, locy = tonumber(locx), tonumber(locy)
|
||||||
end
|
end
|
||||||
|
|
||||||
if locz then
|
if locz then
|
||||||
QH_FindCoord(locx, locy, locz, QHText("FIND_CUSTOM_LOCATION"))
|
QH_FindCoord(locx, locy, locz, QHText("FIND_CUSTOM_LOCATION"))
|
||||||
end
|
end
|
||||||
|
@ -144,7 +145,7 @@ local elders = {
|
||||||
["Horde"] = { -- Achievement 914
|
["Horde"] = { -- Achievement 914
|
||||||
["Darkhorn"] = {321, 52, 60, 8677, 1991}, --"Orgrimmar 52 60",
|
["Darkhorn"] = {321, 52, 60, 8677, 1991}, --"Orgrimmar 52 60",
|
||||||
["Wheathoof"] = {362, 73.0, 23.3, 8678, 1993}, --"Thunder Bluff 73.0 23.3",
|
["Wheathoof"] = {362, 73.0, 23.3, 8678, 1993}, --"Thunder Bluff 73.0 23.3",
|
||||||
["Darkcore"] = {382, 67, 38, 8648, 1992}, --"Undercity 67 38"
|
["Darkcore"] = {382, 67, 38, 8648, 1992}, --"Undercity 67 38" -- Might have a floor.
|
||||||
},
|
},
|
||||||
["Kalimdor"] = { -- Achievement 911
|
["Kalimdor"] = { -- Achievement 911
|
||||||
["Bladeleaf"] = { 41, 56.8, 53.1, 8715, 1951}, --"Teldrassil 56.8 53.1",
|
["Bladeleaf"] = { 41, 56.8, 53.1, 8715, 1951}, --"Teldrassil 56.8 53.1",
|
||||||
|
@ -219,6 +220,8 @@ local elders = {
|
||||||
["Firebeard"] = {700, 51, 71, 29737, 18161}, -- Dunward Town Square, Dunward Ruins, Twilight Highlands
|
["Firebeard"] = {700, 51, 71, 29737, 18161}, -- Dunward Town Square, Dunward Ruins, Twilight Highlands
|
||||||
["Darkfeather"] = {700, 52, 33, 29736, 18162} -- Thundermar Ruins, Twilight Highlands
|
["Darkfeather"] = {700, 52, 33, 29736, 18162} -- Thundermar Ruins, Twilight Highlands
|
||||||
},
|
},
|
||||||
|
["Pandaria"] = { -- Unknown atm.
|
||||||
|
},
|
||||||
--[===[ Placeholder for Elders of the Dungeons. If enabled prior to 2013, stored coordinates should be the map ID of the zone where the instance is located and the coordinates of the entrance. With any luck, by 2013 dungeons will be mapable. Coordinates listed in comment after each elder need to have floor numbers determined, where necessary, ASAP.
|
--[===[ Placeholder for Elders of the Dungeons. If enabled prior to 2013, stored coordinates should be the map ID of the zone where the instance is located and the coordinates of the entrance. With any luck, by 2013 dungeons will be mapable. Coordinates listed in comment after each elder need to have floor numbers determined, where necessary, ASAP.
|
||||||
["Dungeons"] = { -- Achievement 910
|
["Dungeons"] = { -- Achievement 910
|
||||||
["Wildmane"] = {,,,8676, 1910}, -- Zul'Farrak 34.52 39.35
|
["Wildmane"] = {,,,8676, 1910}, -- Zul'Farrak 34.52 39.35
|
||||||
|
@ -244,9 +247,9 @@ local function UpdateElders()
|
||||||
local elder, elderinfo
|
local elder, elderinfo
|
||||||
local qid = GetQuestID()
|
local qid = GetQuestID()
|
||||||
for elder, elderinfo in pairs(trackedElders) do
|
for elder, elderinfo in pairs(trackedElders) do
|
||||||
local z, x, y, id = unpack(elderinfo)
|
local m, x, y, id = unpack(elderinfo)
|
||||||
if id == qid then
|
if id == qid then
|
||||||
QH_FindCoord(x, y, z, elder)
|
QH_FindCoord(x, y, m, 0, elder)
|
||||||
trackedElders[elder] = nil
|
trackedElders[elder] = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -259,7 +262,7 @@ local function QH_FindElders(elder_or_achievement, all_elders, forAchievement)
|
||||||
if elder_or_achievement == "CLEAR" then
|
if elder_or_achievement == "CLEAR" then
|
||||||
for elder, elderinfo in pairs(trackedElders) do
|
for elder, elderinfo in pairs(trackedElders) do
|
||||||
local z, x, y = unpack(elderinfo)
|
local z, x, y = unpack(elderinfo)
|
||||||
QH_FindCoord(x, y, z, elder)
|
QH_FindCoord(x, y, m, 0, elder)
|
||||||
end
|
end
|
||||||
|
|
||||||
trackedElders = {}
|
trackedElders = {}
|
||||||
|
@ -276,41 +279,41 @@ local function QH_FindElders(elder_or_achievement, all_elders, forAchievement)
|
||||||
end
|
end
|
||||||
|
|
||||||
for elder, elder_info in pairs(eldrs) do
|
for elder, elder_info in pairs(eldrs) do
|
||||||
local locz, locx, locy, qid, aid = unpack(elder_info)
|
local locm, locx, locy, qid, aid = unpack(elder_info)
|
||||||
local okToAdd = true
|
local okToAdd = true
|
||||||
if forAchievement then
|
if forAchievement then
|
||||||
if aid then
|
if aid then
|
||||||
local _, _, completed = GetAchievementCriteriaInfo(aid)
|
local _, _, completed = GetAchievementCriteriaInfo(aid)
|
||||||
if completed then okToAdd = false end
|
if completed then okToAdd = false end
|
||||||
end
|
end
|
||||||
elseif qid and QHQuestsCompleted and QHQuestsCompleted[qid] then
|
elseif qid and QHQuestsCompleted and QHQuestsCompleted[qid] then
|
||||||
okToAdd = false
|
okToAdd = false
|
||||||
end
|
end
|
||||||
if okToAdd then
|
if okToAdd then
|
||||||
|
|
||||||
if not all_elders then
|
if not all_elders then
|
||||||
if achievement_match then -- just add it
|
if achievement_match then -- just add it
|
||||||
QH_FindCoord(locx, locy, locz, elder)
|
QH_FindCoord(locx, locy, locm, 0, elder)
|
||||||
if trackedElders[elder] then trackedElders[elder] = nil
|
if trackedElders[elder] then trackedElders[elder] = nil
|
||||||
else
|
else
|
||||||
trackedElders[elder] = elder_info
|
trackedElders[elder] = elder_info
|
||||||
elderCount = elderCount + 1
|
elderCount = elderCount + 1
|
||||||
end
|
end
|
||||||
elseif elder_or_achievement == string.upper(elder) then -- We have input and it's not an achievement, so it must be an elder.
|
elseif elder_or_achievement == string.upper(elder) then -- We have input and it's not an achievement, so it must be an elder.
|
||||||
elder_match = true
|
elder_match = true
|
||||||
QH_FindCoord(locx, locy, locz, elder)
|
QH_FindCoord(locx, locy, locm, 0, elder)
|
||||||
if trackedElders[elder] then trackedElders[elder] = nil
|
if trackedElders[elder] then trackedElders[elder] = nil
|
||||||
else
|
else
|
||||||
trackedElders[elder] = elder_info
|
trackedElders[elder] = elder_info
|
||||||
elderCount = elderCount + 1
|
elderCount = elderCount + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
break -- We've found him or her.
|
break -- We've found him or her.
|
||||||
end -- No need for else here. We alread know we don't need everything so we either have an achievement or we have an elder.
|
end -- No need for else here. We alread know we don't need everything so we either have an achievement or we have an elder.
|
||||||
else -- We came in without an input, therefore we add all.
|
else -- We came in without an input, therefore we add all.
|
||||||
QH_FindCoord(locx, locy, locz, elder)
|
QH_FindCoord(locx, locy, locm, 0, elder)
|
||||||
if trackedElders[elder] then trackedElders[elder] = nil
|
if trackedElders[elder] then trackedElders[elder] = nil
|
||||||
else
|
else
|
||||||
trackedElders[elder] = elder_info
|
trackedElders[elder] = elder_info
|
||||||
elderCount = elderCount + 1
|
elderCount = elderCount + 1
|
||||||
end
|
end
|
||||||
|
@ -327,10 +330,10 @@ end
|
||||||
function QH_FindName(name)
|
function QH_FindName(name)
|
||||||
local locd = name:match("^loc (.+)")
|
local locd = name:match("^loc (.+)")
|
||||||
local forAchievement = false, elder_loc, temp
|
local forAchievement = false, elder_loc, temp
|
||||||
|
|
||||||
if not locd then
|
if not locd then
|
||||||
if name:find("^elders?") then
|
if name:find("^elders?") then
|
||||||
if name:find("^elders? achievement") then
|
if name:find("^elders? achievement") then
|
||||||
forAchievement = true
|
forAchievement = true
|
||||||
elder_loc = name:match("elders? achievement (.+)")
|
elder_loc = name:match("elders? achievement (.+)")
|
||||||
else
|
else
|
||||||
|
@ -350,52 +353,52 @@ function QH_FindName(name)
|
||||||
QuestHelper:TextOut(QHText("FIND_NOT_READY"))
|
QuestHelper:TextOut(QHText("FIND_NOT_READY"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if #name < 2 then
|
if #name < 2 then
|
||||||
QuestHelper:TextOut(QHText("FIND_USAGE"))
|
QuestHelper:TextOut(QHText("FIND_USAGE"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local found = getitall(name)
|
local found = getitall(name)
|
||||||
|
|
||||||
local mennix = QuestHelper:CreateMenu()
|
local mennix = QuestHelper:CreateMenu()
|
||||||
QuestHelper:CreateMenuTitle(mennix, QHText("RESULTS_TITLE"))
|
QuestHelper:CreateMenuTitle(mennix, QHText("RESULTS_TITLE"))
|
||||||
|
|
||||||
local made_item = false
|
local made_item = false
|
||||||
|
|
||||||
local found_db = {}
|
local found_db = {}
|
||||||
local has_name = {}
|
local has_name = {}
|
||||||
local needs_postfix = {}
|
local needs_postfix = {}
|
||||||
|
|
||||||
for _, v in ipairs(found) do
|
for _, v in ipairs(found) do
|
||||||
local dbi = DB_GetItem("monster", v)
|
local dbi = DB_GetItem("monster", v)
|
||||||
--[[ assert(dbi) ]]
|
--[[ assert(dbi) ]]
|
||||||
|
|
||||||
if dbi.loc then
|
if dbi.loc then
|
||||||
table.insert(found_db, dbi)
|
table.insert(found_db, dbi)
|
||||||
|
|
||||||
if has_name[dbi.name] then needs_postfix[dbi.name] = true end
|
if has_name[dbi.name] then needs_postfix[dbi.name] = true end
|
||||||
has_name[dbi.name] = true
|
has_name[dbi.name] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.sort(found_db, function (a, b) return a.name < b.name end)
|
table.sort(found_db, function (a, b) return a.name < b.name end)
|
||||||
|
|
||||||
for _, v in ipairs(found_db) do
|
for _, v in ipairs(found_db) do
|
||||||
made_item = true
|
made_item = true
|
||||||
|
|
||||||
local name = v.name
|
local name = v.name
|
||||||
|
|
||||||
if needs_postfix[name] then name = name .. " (" .. QuestHelper_NameLookup[v.loc[1].p] .. ")" end
|
if needs_postfix[name] then name = name .. " (" .. QuestHelper_NameLookup[v.loc[1].p] .. ")" end
|
||||||
|
|
||||||
local opt = QuestHelper:CreateMenuItem(mennix, name)
|
local opt = QuestHelper:CreateMenuItem(mennix, name)
|
||||||
opt:SetFunction(generate_objective, v)
|
opt:SetFunction(generate_objective, v)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not made_item then
|
if not made_item then
|
||||||
QuestHelper:CreateMenuItem(mennix, QHText("NO_RESULTS"))
|
QuestHelper:CreateMenuItem(mennix, QHText("NO_RESULTS"))
|
||||||
end
|
end
|
||||||
|
|
||||||
mennix:ShowAtCursor()
|
mennix:ShowAtCursor()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -407,5 +410,5 @@ end
|
||||||
QH_API.ARCHY_REMOVE = function (displayText)
|
QH_API.ARCHY_REMOVE = function (displayText)
|
||||||
if not custom_find[displayText] then return end
|
if not custom_find[displayText] then return end
|
||||||
QH_Route_ClusterRemove(custom_find[displayText])
|
QH_Route_ClusterRemove(custom_find[displayText])
|
||||||
custom_find[displayText] = nil
|
custom_find[displayText] = nil
|
||||||
end
|
end
|
||||||
|
|
Fichier diff supprimé car celui-ci est trop grand
Voir la Diff
|
@ -50,7 +50,7 @@ local poll_first = true
|
||||||
|
|
||||||
QH_Event("QUEST_QUERY_COMPLETE", function ()
|
QH_Event("QUEST_QUERY_COMPLETE", function ()
|
||||||
quests = GetQuestsCompleted() -- entertainingly, we actually want exactly the output of this. How convenient! Blizzard does things right <3 forever
|
quests = GetQuestsCompleted() -- entertainingly, we actually want exactly the output of this. How convenient! Blizzard does things right <3 forever
|
||||||
|
|
||||||
notify()
|
notify()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -85,16 +85,16 @@ local waypoint_zone
|
||||||
function rescan()
|
function rescan()
|
||||||
if not waypoint_zone then return end
|
if not waypoint_zone then return end
|
||||||
if not QuestHelper.Astrolabe.WorldMapVisible then return end
|
if not QuestHelper.Astrolabe.WorldMapVisible then return end
|
||||||
|
|
||||||
QH_POI_Reset()
|
QH_POI_Reset()
|
||||||
|
|
||||||
if not completed_active then return end
|
if not completed_active then return end
|
||||||
|
|
||||||
local questlist = DB_GetItem("questlist", waypoint_zone, true)
|
local questlist = DB_GetItem("questlist", waypoint_zone, true)
|
||||||
if not questlist then return end
|
if not questlist then return end
|
||||||
|
|
||||||
local donequests = QH_GetCompletedTable()
|
local donequests = QH_GetCompletedTable()
|
||||||
|
|
||||||
for _, v in ipairs(questlist) do
|
for _, v in ipairs(questlist) do
|
||||||
if donequests[v] then
|
if donequests[v] then
|
||||||
--print("Done:", v)
|
--print("Done:", v)
|
||||||
|
@ -110,13 +110,13 @@ function rescan()
|
||||||
end
|
end
|
||||||
QH_AddCompletionNotifier(rescan)
|
QH_AddCompletionNotifier(rescan)
|
||||||
|
|
||||||
QH_Event("WORLD_MAP_UPDATE", function ()
|
QH_Event("WORLD_MAP_UPDATE", function () -- NOTE: WILL NOT WORK UNTIL UPGRADE.LUA IS FIXED
|
||||||
local c, z = QuestHelper.Astrolabe:GetCurrentVirtualMapCZ()
|
local m, f = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel()
|
||||||
--print(c, z)
|
--print(c, z)
|
||||||
if not QuestHelper_IndexLookup[c] or not QuestHelper_IndexLookup[c][z] then return end
|
if not QuestHelper_IndexLookup[c] or not QuestHelper_IndexLookup[c][z] then return end
|
||||||
QuestHelper: Assert(QuestHelper_IndexLookup[c])
|
QuestHelper: Assert(QuestHelper_IndexLookup[c])
|
||||||
QuestHelper: Assert(QuestHelper_IndexLookup[c][z])
|
QuestHelper: Assert(QuestHelper_IndexLookup[c][z])
|
||||||
waypoint_zone = QuestHelper_IndexLookup[c][z]
|
waypoint_zone = QuestHelper_IndexLookup[c][z]
|
||||||
|
|
||||||
rescan()
|
rescan()
|
||||||
end)
|
end)
|
||||||
|
|
Fichier diff supprimé car celui-ci est trop grand
Voir la Diff
|
@ -16,11 +16,11 @@ QuestHelper_Loadtime["pathfinding.lua"] = GetTime()
|
||||||
-- So make one general setting for the 10 seconds plus 5 for the world to load
|
-- So make one general setting for the 10 seconds plus 5 for the world to load
|
||||||
|
|
||||||
-- local porttime = 15
|
-- local porttime = 15
|
||||||
|
|
||||||
QueryQuestsCompleted();
|
QueryQuestsCompleted();
|
||||||
local dependancy_quest_list = GetQuestsCompleted()
|
local dependancy_quest_list = GetQuestsCompleted()
|
||||||
|
|
||||||
local static_alliance_landings =
|
local static_alliance_landings =
|
||||||
{
|
{
|
||||||
{471, 0.476, 0.598, "Exodar via portal"}, -- Exodar
|
{471, 0.476, 0.598, "Exodar via portal"}, -- Exodar
|
||||||
{381, 0.435, 0.787, "Darnassus via portal"}, -- Darnassus
|
{381, 0.435, 0.787, "Darnassus via portal"}, -- Darnassus
|
||||||
|
@ -28,7 +28,7 @@ local static_alliance_landings =
|
||||||
{341, 0.255, 0.084, "Ironforge via portal"}, -- Ironforge
|
{341, 0.255, 0.084, "Ironforge via portal"}, -- Ironforge
|
||||||
{141, 0.660, 0.490, "Theramore via portal"}, -- Theramore, Dustwallow Marsh
|
{141, 0.660, 0.490, "Theramore via portal"}, -- Theramore, Dustwallow Marsh
|
||||||
}
|
}
|
||||||
|
|
||||||
local static_horde_landings =
|
local static_horde_landings =
|
||||||
{
|
{
|
||||||
{321, 0.483, 0.645, "Orgrimmar via portal"}, -- Orgrimmar
|
{321, 0.483, 0.645, "Orgrimmar via portal"}, -- Orgrimmar
|
||||||
|
@ -37,7 +37,7 @@ local static_horde_landings =
|
||||||
{480, 0.583, 0.192, "Silvermoon City via portal"}, -- Silvermoon City
|
{480, 0.583, 0.192, "Silvermoon City via portal"}, -- Silvermoon City
|
||||||
{38, 0.498, 0.558, "Stonard via portal"}, -- Stonard, Swamp of Sorrows
|
{38, 0.498, 0.558, "Stonard via portal"}, -- Stonard, Swamp of Sorrows
|
||||||
}
|
}
|
||||||
|
|
||||||
local static_shared_landings =
|
local static_shared_landings =
|
||||||
{
|
{
|
||||||
{504, 0.559, 0.468, "Dalaran via portal"}, -- Dalaran
|
{504, 0.559, 0.468, "Dalaran via portal"}, -- Dalaran
|
||||||
|
@ -55,7 +55,7 @@ end
|
||||||
|
|
||||||
-- More storage
|
-- More storage
|
||||||
|
|
||||||
-- Contingent on player's faction controlling the zone
|
-- Contingent on player's faction controlling the zone
|
||||||
-- {{501, 0.491, 0.153}, {504, 0.268, 0.447}, 5, true}, -- Wingergrasp Keep --> Dalaran
|
-- {{501, 0.491, 0.153}, {504, 0.268, 0.447}, 5, true}, -- Wingergrasp Keep --> Dalaran
|
||||||
-- {{708, 0.472, 0.519}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Tol Barad --> Orgrimmar (If Horde Controlled)
|
-- {{708, 0.472, 0.519}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Tol Barad --> Orgrimmar (If Horde Controlled)
|
||||||
-- {{708, 0.472, 0.519}, STORMWIND_CATPORTAL_IN, 60, true}, -- Tol Barad --> Stormwind (If Alliance Controlled)
|
-- {{708, 0.472, 0.519}, STORMWIND_CATPORTAL_IN, 60, true}, -- Tol Barad --> Stormwind (If Alliance Controlled)
|
||||||
|
@ -67,7 +67,7 @@ local BLASTED_LANDS_PORTAL_IN = {19, 0.539, 0.461, "Blasted Lands via portal"}
|
||||||
local ORGRIMMAR_CATPORTAL_IN = {321, 0.500, 0.377, "Orgrimmar via portal"}
|
local ORGRIMMAR_CATPORTAL_IN = {321, 0.500, 0.377, "Orgrimmar via portal"}
|
||||||
-- local STORMWIND_CATPORTAL_IN
|
-- local STORMWIND_CATPORTAL_IN
|
||||||
|
|
||||||
local static_horde_routes =
|
local static_horde_routes =
|
||||||
{
|
{
|
||||||
-- Portals
|
-- Portals
|
||||||
{{321, 0.471, 0.618}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Orgrimmar --> Dark Portal
|
{{321, 0.471, 0.618}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Orgrimmar --> Dark Portal
|
||||||
|
@ -81,10 +81,10 @@ local static_horde_routes =
|
||||||
|
|
||||||
{{465, 0.886, 0.477}, {321, 0.483, 0.645}, 60, true}, -- Hellfire Peninsula --> Orgrimmar
|
{{465, 0.886, 0.477}, {321, 0.483, 0.645}, 60, true}, -- Hellfire Peninsula --> Orgrimmar
|
||||||
{{700, 0.736, 0.535}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Twilight Highlands --> Orgrimmar
|
{{700, 0.736, 0.535}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Twilight Highlands --> Orgrimmar
|
||||||
|
|
||||||
{{321, 0.475, 0.392}, {709, 0.560, 0.799}, 60, false, level_limit = 85}, -- Orgrimmar <--> Tol Barad Peninsula
|
{{321, 0.475, 0.392}, {709, 0.560, 0.799}, 60, false, level_limit = 85}, -- Orgrimmar <--> Tol Barad Peninsula
|
||||||
|
|
||||||
|
|
||||||
-- Okay, I give. Since I haven't actually been through these portals, I don't really have a frame
|
-- Okay, I give. Since I haven't actually been through these portals, I don't really have a frame
|
||||||
-- of reference, but from everything I can see, there are a jumble of dependancies woven throughout
|
-- of reference, but from everything I can see, there are a jumble of dependancies woven throughout
|
||||||
-- the quest chains that open the connections from Cataclysm to and from Orgrimmar, and likewise
|
-- the quest chains that open the connections from Cataclysm to and from Orgrimmar, and likewise
|
||||||
|
@ -93,21 +93,21 @@ local static_horde_routes =
|
||||||
-- of these portals, you're going to have started the quest chain, which can't happen before the
|
-- of these portals, you're going to have started the quest chain, which can't happen before the
|
||||||
-- listed level. Once I've run these myself and understand just what's going on, then I can start
|
-- listed level. Once I've run these myself and understand just what's going on, then I can start
|
||||||
-- tying them to the proper quest-completion dependancy.
|
-- tying them to the proper quest-completion dependancy.
|
||||||
|
|
||||||
-- From what I understand, at some point a portal from Orgrimmar to the zone opens in the EarthShrine
|
-- From what I understand, at some point a portal from Orgrimmar to the zone opens in the EarthShrine
|
||||||
-- area in Orgrimmar. When exactly is unclear. Some zones, but not all, have a return portal.
|
-- area in Orgrimmar. When exactly is unclear. Some zones, but not all, have a return portal.
|
||||||
-- This, too, is unclear.
|
-- This, too, is unclear.
|
||||||
|
|
||||||
-- Orgrimmar --> Temple of Earth (Aqua)
|
-- Orgrimmar --> Temple of Earth (Aqua)
|
||||||
-- Level limit because the quest to open requires level 82.
|
-- Level limit because the quest to open requires level 82.
|
||||||
{{640, 0.509, 0.531}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Temple of Earth (Aqua) --> Orgrimmar
|
{{640, 0.509, 0.531}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Temple of Earth (Aqua) --> Orgrimmar
|
||||||
|
|
||||||
{{321, 0.508, 0.363}, {640, 0.506, 0.529}, 60, true, level_limit = 82}, -- Orgrimmar --> Deepholm
|
{{321, 0.508, 0.363}, {640, 0.506, 0.529}, 60, true, level_limit = 82}, -- Orgrimmar --> Deepholm
|
||||||
-- Level limit because the quest to open requires level 82.
|
-- Level limit because the quest to open requires level 82.
|
||||||
|
|
||||||
{{321, 0.511, 0.383}, {606, 0.635, 0.234}, 60, true, level_limit = 80}, -- Orgrimmar --> Mount Hyjal
|
{{321, 0.511, 0.383}, {606, 0.635, 0.234}, 60, true, level_limit = 80}, -- Orgrimmar --> Mount Hyjal
|
||||||
-- Level limit because the quest to open requires level 80.
|
-- Level limit because the quest to open requires level 80.
|
||||||
|
|
||||||
{{321, 0.502, 0.394}, {700, 0.736, 0.534}, 60, true, level_limit = 84}, -- Orgrimmar --> Twilight Highlands
|
{{321, 0.502, 0.394}, {700, 0.736, 0.534}, 60, true, level_limit = 84}, -- Orgrimmar --> Twilight Highlands
|
||||||
-- Level limit because the quest to open requires level 84.
|
-- Level limit because the quest to open requires level 84.
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ local static_horde_routes =
|
||||||
|
|
||||||
{{20, 0.619, 0.591}, {37, 0.374, 0.509}, 210}, -- Tirisfal Glades <--> Grom'gol Base Camp, Northern Stranglethorn
|
{{20, 0.619, 0.591}, {37, 0.374, 0.509}, 210}, -- Tirisfal Glades <--> Grom'gol Base Camp, Northern Stranglethorn
|
||||||
{{20, 0.590, 0.590}, {491, 0.777, 0.282}, 210}, -- Tirisfal Glades <--> Vengeance Landing
|
{{20, 0.590, 0.590}, {491, 0.777, 0.282}, 210}, -- Tirisfal Glades <--> Vengeance Landing
|
||||||
|
|
||||||
-- Ships
|
-- Ships
|
||||||
{{700, 0.735, 0.528}, {700, 0.767, 0.152}, 210}, -- Dragonmaw Port, Twilight Highlands <--> Krazzworks, Twilight Highlands
|
{{700, 0.735, 0.528}, {700, 0.767, 0.152}, 210}, -- Dragonmaw Port, Twilight Highlands <--> Krazzworks, Twilight Highlands
|
||||||
-- QuestHelper does not appear to like transitions from within the same zone. Gonna have to figure this out.
|
-- QuestHelper does not appear to like transitions from within the same zone. Gonna have to figure this out.
|
||||||
|
@ -134,14 +134,14 @@ local static_horde_routes =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
local static_alliance_routes =
|
local static_alliance_routes =
|
||||||
{
|
{
|
||||||
-- Portals
|
-- Portals
|
||||||
{{381,0.440,0.782}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Darnassus --> Dark Portal
|
{{381,0.440,0.782}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Darnassus --> Dark Portal
|
||||||
{{471,0.482,0.630}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Exodar --> Dark Portal
|
{{471,0.482,0.630}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Exodar --> Dark Portal
|
||||||
{{341,0.273,0.070}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Ironforge --> Dark Portal
|
{{341,0.273,0.070}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Ironforge --> Dark Portal
|
||||||
{{301,0.490,0.874}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Stormwind --> Dark Portal
|
{{301,0.490,0.874}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Stormwind --> Dark Portal
|
||||||
|
|
||||||
{{465, 0.886, 0.528}, {301, 0.496, 0.865}, 60, true}, -- Hellfire Peninsula --> Stormwind
|
{{465, 0.886, 0.528}, {301, 0.496, 0.865}, 60, true}, -- Hellfire Peninsula --> Stormwind
|
||||||
{{381, 0.442, 0.788}, {471, 0.476, 0.598}, 5, true}, -- Darnassus --> Exodar
|
{{381, 0.442, 0.788}, {471, 0.476, 0.598}, 5, true}, -- Darnassus --> Exodar
|
||||||
{{471, 0.476, 0.619}, {381, 0.435, 0.787}, 5, true}, -- Exodar --> Darnassus
|
{{471, 0.476, 0.619}, {381, 0.435, 0.787}, 5, true}, -- Exodar --> Darnassus
|
||||||
|
@ -151,7 +151,7 @@ local static_alliance_routes =
|
||||||
{{301, 0.734, 0.195}, {640, 0.487, 0.536}, 60, true, level_limit = 82}, -- Stormwind --> Temple of Earth (Amber)
|
{{301, 0.734, 0.195}, {640, 0.487, 0.536}, 60, true, level_limit = 82}, -- Stormwind --> Temple of Earth (Amber)
|
||||||
-- Level limit because the quest to open requires level 82.
|
-- Level limit because the quest to open requires level 82.
|
||||||
{{640, 0.486, 0.537}, {301, 0.745, 0.183}, 60, true}, -- Temple of Earth (Amber) --> Stormwind
|
{{640, 0.486, 0.537}, {301, 0.745, 0.183}, 60, true}, -- Temple of Earth (Amber) --> Stormwind
|
||||||
|
|
||||||
-- Stormwind <--> Deepholm
|
-- Stormwind <--> Deepholm
|
||||||
-- Stormwind <--> Mount Hyjal
|
-- Stormwind <--> Mount Hyjal
|
||||||
-- Stormwind <--> Twilight Highlands
|
-- Stormwind <--> Twilight Highlands
|
||||||
|
@ -175,27 +175,27 @@ local static_alliance_routes =
|
||||||
{{684, 0.42, 0.36}, {41, 0.52, 0.89}, 86400}, -- Gilneas Zone <--> Teldrassil. Exists solely to fix some pathing crashes. 24-hour boat ride :D (This will be deleted later, when we can create the "official" path.)
|
{{684, 0.42, 0.36}, {41, 0.52, 0.89}, 86400}, -- Gilneas Zone <--> Teldrassil. Exists solely to fix some pathing crashes. 24-hour boat ride :D (This will be deleted later, when we can create the "official" path.)
|
||||||
}
|
}
|
||||||
|
|
||||||
local static_shared_routes =
|
local static_shared_routes =
|
||||||
{
|
{
|
||||||
-- Portals
|
-- Portals
|
||||||
{{504, 0.268, 0.447}, {504, 0.240, 0.394}, 5}, -- Dalaran (Violet Citadel) <--> Dalaran (Purple Parlor)
|
{{504, 0.268, 0.447}, {504, 0.240, 0.394}, 5}, -- Dalaran (Violet Citadel) <--> Dalaran (Purple Parlor)
|
||||||
|
|
||||||
{{504, 0.559, 0.468}, {510, 0.158, 0.428}, 5}, -- Dalaran <--> Crystalsong Forest
|
{{504, 0.559, 0.468}, {510, 0.158, 0.428}, 5}, -- Dalaran <--> Crystalsong Forest
|
||||||
--{{504, 0.559, 0.468}, {510, 0.158, 0.428}, 5, false, level_limit = 68}, -- Dalaran <--> Crystalsong Forest
|
--{{504, 0.559, 0.468}, {510, 0.158, 0.428}, 5, false, level_limit = 68}, -- Dalaran <--> Crystalsong Forest
|
||||||
|
|
||||||
{{41, 0.551, 0.885}, {381, 0.369, 0.584}, 5}, -- Rut'Theran Village, Teldrassil <--> Darnassus
|
{{41, 0.551, 0.885}, {381, 0.369, 0.584}, 5}, -- Rut'Theran Village, Teldrassil <--> Darnassus
|
||||||
|
|
||||||
{{19, 0.550, 0.541}, {465, 0.898, 0.502}, 60}, -- Blasted Lands <--> Hellfire Peninsula (Dark Portal)
|
{{19, 0.550, 0.541}, {465, 0.898, 0.502}, 60}, -- Blasted Lands <--> Hellfire Peninsula (Dark Portal)
|
||||||
|
|
||||||
{{504, 0.255, 0.514}, {161, 0.652, 0.498}, 60, true}, -- Dalaran --> Caverns of Time
|
{{504, 0.255, 0.514}, {161, 0.652, 0.498}, 60, true}, -- Dalaran --> Caverns of Time
|
||||||
{{481, 0.486, 0.420}, {499, 0.482, 0.345}, 60, true}, -- Shattrath --> Isle of Quel'Danas
|
{{481, 0.486, 0.420}, {499, 0.482, 0.345}, 60, true}, -- Shattrath --> Isle of Quel'Danas
|
||||||
|
|
||||||
{{481, 0.747, 0.316}, {161, 0.652, 0.498}, 60, true}, -- Shattrath --> Caverns of Time
|
{{481, 0.747, 0.316}, {161, 0.652, 0.498}, 60, true}, -- Shattrath --> Caverns of Time
|
||||||
-- Requires Revered with Keepers of Time
|
-- Requires Revered with Keepers of Time
|
||||||
|
|
||||||
{{640, 0.493, 0.504}, {640, 0.571, 0.135}, 5, false, level_limit = 81}, -- Temple of Earth <--> Therazane's Throne
|
{{640, 0.493, 0.504}, {640, 0.571, 0.135}, 5, false, level_limit = 81}, -- Temple of Earth <--> Therazane's Throne
|
||||||
-- Requires Honored with Therazane and dependant on quest #26709
|
-- Requires Honored with Therazane and dependant on quest #26709
|
||||||
|
|
||||||
-- Ships
|
-- Ships
|
||||||
{{488, 0.497, 0.784}, {491, 0.234, 0.578}, 210}, -- Moa'ki <--> Kamagua
|
{{488, 0.497, 0.784}, {491, 0.234, 0.578}, 210}, -- Moa'ki <--> Kamagua
|
||||||
{{488, 0.479, 0.788}, {486, 0.789, 0.537}, 210}, -- Moa'ki <--> Unu'pe
|
{{488, 0.479, 0.788}, {486, 0.789, 0.537}, 210}, -- Moa'ki <--> Unu'pe
|
||||||
|
@ -253,40 +253,40 @@ local static_shared_routes =
|
||||||
{{144, 0.500, 0.500}, {73, 0.416, 0.179}, 5}, -- Ulduar, zone-in link is incorrect
|
{{144, 0.500, 0.500}, {73, 0.416, 0.179}, 5}, -- Ulduar, zone-in link is incorrect
|
||||||
{{155, 0.426, 0.203}, {71, 0.548, 0.899}, 5}, -- Forge of Souls
|
{{155, 0.426, 0.203}, {71, 0.548, 0.899}, 5}, -- Forge of Souls
|
||||||
{{157, 0.410, 0.801}, {71, 0.547, 0.916}, 5}, -- Pit of Saron
|
{{157, 0.410, 0.801}, {71, 0.547, 0.916}, 5}, -- Pit of Saron
|
||||||
|
|
||||||
-- Wrath in-zone links, all currently incorrect
|
-- Wrath in-zone links, all currently incorrect
|
||||||
-- UK
|
-- UK
|
||||||
{{80, 0.500, 0.500}, {82, 0.500, 0.500}, 5},
|
{{80, 0.500, 0.500}, {82, 0.500, 0.500}, 5},
|
||||||
{{80, 0.500, 0.500}, {84, 0.500, 0.500}, 5},
|
{{80, 0.500, 0.500}, {84, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- AN
|
-- AN
|
||||||
{{88, 0.500, 0.500}, {90, 0.500, 0.500}, 5},
|
{{88, 0.500, 0.500}, {90, 0.500, 0.500}, 5},
|
||||||
{{88, 0.500, 0.500}, {92, 0.500, 0.500}, 5},
|
{{88, 0.500, 0.500}, {92, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- Drak
|
-- Drak
|
||||||
{{96, 0.500, 0.500}, {98, 0.500, 0.500}, 5},
|
{{96, 0.500, 0.500}, {98, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- HoL
|
-- HoL
|
||||||
{{106, 0.500, 0.500}, {108, 0.500, 0.500}, 5},
|
{{106, 0.500, 0.500}, {108, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- Oculus
|
-- Oculus
|
||||||
{{110, 0.500, 0.500}, {112, 0.500, 0.500}, 5},
|
{{110, 0.500, 0.500}, {112, 0.500, 0.500}, 5},
|
||||||
{{110, 0.500, 0.500}, {114, 0.500, 0.500}, 5},
|
{{110, 0.500, 0.500}, {114, 0.500, 0.500}, 5},
|
||||||
{{110, 0.500, 0.500}, {116, 0.500, 0.500}, 5},
|
{{110, 0.500, 0.500}, {116, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- CoT
|
-- CoT
|
||||||
{{120, 0.500, 0.500}, {118, 0.500, 0.500}, 5},
|
{{120, 0.500, 0.500}, {118, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- UP
|
-- UP
|
||||||
{{122, 0.500, 0.500}, {124, 0.500, 0.500}, 5},
|
{{122, 0.500, 0.500}, {124, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- Naxx
|
-- Naxx
|
||||||
{{128, 0.500, 0.500}, {130, 0.500, 0.500}, 5},
|
{{128, 0.500, 0.500}, {130, 0.500, 0.500}, 5},
|
||||||
{{128, 0.500, 0.500}, {132, 0.500, 0.500}, 5},
|
{{128, 0.500, 0.500}, {132, 0.500, 0.500}, 5},
|
||||||
{{128, 0.500, 0.500}, {134, 0.500, 0.500}, 5},
|
{{128, 0.500, 0.500}, {134, 0.500, 0.500}, 5},
|
||||||
{{128, 0.500, 0.500}, {136, 0.500, 0.500}, 5},
|
{{128, 0.500, 0.500}, {136, 0.500, 0.500}, 5},
|
||||||
{{128, 0.500, 0.500}, {138, 0.500, 0.500}, 5},
|
{{128, 0.500, 0.500}, {138, 0.500, 0.500}, 5},
|
||||||
|
|
||||||
-- Ulduar
|
-- Ulduar
|
||||||
{{144, 0.500, 0.500}, {146, 0.500, 0.500}, 5},
|
{{144, 0.500, 0.500}, {146, 0.500, 0.500}, 5},
|
||||||
{{144, 0.500, 0.500}, {148, 0.500, 0.500}, 5},
|
{{144, 0.500, 0.500}, {148, 0.500, 0.500}, 5},
|
||||||
|
@ -300,11 +300,11 @@ local dark_portal_route = {{19, 0.550, 0.541}, {465, 0.898, 0.502}, 60}
|
||||||
|
|
||||||
-- Waygate
|
-- Waygate
|
||||||
local ridingLevel = (select(4,GetAchievementInfo(892)) and 300) or (select(4,GetAchievementInfo(890)) and 225) or (select(4,GetAchievementInfo(889)) and 150) or (select(4,GetAchievementInfo(891)) and 75) or 0 -- this is thanks to Maldivia, who is a fucking genius
|
local ridingLevel = (select(4,GetAchievementInfo(892)) and 300) or (select(4,GetAchievementInfo(890)) and 225) or (select(4,GetAchievementInfo(889)) and 150) or (select(4,GetAchievementInfo(891)) and 75) or 0 -- this is thanks to Maldivia, who is a fucking genius
|
||||||
local has_fmsl = not not GetSpellInfo(GetSpellInfo(90267))
|
local has_fmsl = not not GetSpellInfo(GetSpellInfo(90267))
|
||||||
if ridingLevel >= 225 and has_fmsl then
|
if ridingLevel >= 225 and has_fmsl then
|
||||||
table.insert(static_shared_routes, {{201, 0.505, 0.078}, {493, 0.403, 0.830}, 60, false, level_limit = 77}) -- Un'Goro Crater <--> Sholazar Basin
|
table.insert(static_shared_routes, {{201, 0.505, 0.078}, {493, 0.403, 0.830}, 60, false, level_limit = 77}) -- Un'Goro Crater <--> Sholazar Basin
|
||||||
-- Dependant on completion of quest #12613
|
-- Dependant on completion of quest #12613
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Cataclysm Quest-dependant static routes
|
-- Cataclysm Quest-dependant static routes
|
||||||
-- STILL WORKING ON THESE. See Notes under Static_Horde.
|
-- STILL WORKING ON THESE. See Notes under Static_Horde.
|
||||||
|
@ -322,21 +322,21 @@ local static_zone_transitions =
|
||||||
-- Eastern Kingdoms
|
-- Eastern Kingdoms
|
||||||
|
|
||||||
-- Kalimdor
|
-- Kalimdor
|
||||||
|
|
||||||
--Outland
|
--Outland
|
||||||
|
|
||||||
--Northrend
|
--Northrend
|
||||||
{486, 493, 0.527, 0.322}, -- Borean Tundra <--> Scholazar Basin
|
{486, 493, 0.527, 0.322}, -- Borean Tundra <--> Scholazar Basin
|
||||||
|
|
||||||
--Cataclysm zones
|
--Cataclysm zones
|
||||||
|
|
||||||
-- Work
|
-- Work
|
||||||
{4, 321, 0.117, 0.936}, -- Durotar <--> Orgrimmar (Front)
|
{4, 321, 0.117, 0.936}, -- Durotar <--> Orgrimmar (Front)
|
||||||
{4, 321, 0.366, 0.253}, -- Durotar <--> Orgrimmar (Side)
|
{4, 321, 0.366, 0.253}, -- Durotar <--> Orgrimmar (Side)
|
||||||
{181, 321, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back)
|
{181, 321, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back)
|
||||||
{772, 261, 0.687, 0.2}, -- Ahn'Qiraj <--> Silithus
|
{772, 261, 0.687, 0.2}, -- Ahn'Qiraj <--> Silithus
|
||||||
{37, 673, 0.50, 0.61}, -- Northern Stranglethorn <--> Cape of Stranglethorn
|
{37, 673, 0.50, 0.61}, -- Northern Stranglethorn <--> Cape of Stranglethorn
|
||||||
|
|
||||||
--{38, 168, 0, 0}, -- Stranglethorn World Map Wonkiness
|
--{38, 168, 0, 0}, -- Stranglethorn World Map Wonkiness
|
||||||
|
|
||||||
{43, 11, 0.687, 0.872}, -- Ashenvale <--> Northern Barrens
|
{43, 11, 0.687, 0.872}, -- Ashenvale <--> Northern Barrens
|
||||||
|
@ -401,7 +401,7 @@ local static_zone_transitions =
|
||||||
{24, 26, 0.899, 0.253}, -- Hillsbrad Foothills <--> The Hinterlands
|
{24, 26, 0.899, 0.253}, -- Hillsbrad Foothills <--> The Hinterlands
|
||||||
{40, 700, 0.80, 0.47}, -- Wetlands <--> Twilight Highlands
|
{40, 700, 0.80, 0.47}, -- Wetlands <--> Twilight Highlands
|
||||||
{35, 40, 0.252, 0}, -- Loch Modan <--> Wetlands
|
{35, 40, 0.252, 0}, -- Loch Modan <--> Wetlands
|
||||||
|
|
||||||
-- Outland
|
-- Outland
|
||||||
{477, 481, 0.783, 0.545}, -- Nagrand <--> Shattrath City -- this is aldor-only
|
{477, 481, 0.783, 0.545}, -- Nagrand <--> Shattrath City -- this is aldor-only
|
||||||
{481, 478, 0.782, 0.492}, -- Shattrath City <--> Terokkar Forest
|
{481, 478, 0.782, 0.492}, -- Shattrath City <--> Terokkar Forest
|
||||||
|
@ -415,10 +415,10 @@ local static_zone_transitions =
|
||||||
{477, 467, 0.754, 0.331}, -- Nagrand <--> Zangarmarsh
|
{477, 467, 0.754, 0.331}, -- Nagrand <--> Zangarmarsh
|
||||||
{473, 478, 0.208, 0.271}, -- Shadowmoon Valley <--> Terokkar Forest
|
{473, 478, 0.208, 0.271}, -- Shadowmoon Valley <--> Terokkar Forest
|
||||||
{478, 467, 0.341, 0.098}, -- Terokkar Forest <--> Zangarmarsh
|
{478, 467, 0.341, 0.098}, -- Terokkar Forest <--> Zangarmarsh
|
||||||
|
|
||||||
-- Northrend
|
-- Northrend
|
||||||
{486, 488, 0.967, 0.359}, -- Borean Tundra <--> Dragonblight
|
{486, 488, 0.967, 0.359}, -- Borean Tundra <--> Dragonblight
|
||||||
{501, 493, 0.208, 0.191}, -- Wintergrasp <--> Sholazar
|
{501, 493, 0.208, 0.191}, -- Wintergrasp <--> Sholazar
|
||||||
{488, 501, 0.250, 0.410}, -- Dragonblight <--> Wintergrasp
|
{488, 501, 0.250, 0.410}, -- Dragonblight <--> Wintergrasp
|
||||||
{488, 492, 0.359, 0.155}, -- Dragonblight <--> Icecrown
|
{488, 492, 0.359, 0.155}, -- Dragonblight <--> Icecrown
|
||||||
{488, 510, 0.612, 0.142}, -- Dragonblight <--> Crystalsong
|
{488, 510, 0.612, 0.142}, -- Dragonblight <--> Crystalsong
|
||||||
|
@ -451,44 +451,11 @@ end
|
||||||
function load_graph_links()
|
function load_graph_links()
|
||||||
local function convert_coordinate(coord)
|
local function convert_coordinate(coord)
|
||||||
QuestHelper: Assert(coord[1] and coord[2] and coord[3])
|
QuestHelper: Assert(coord[1] and coord[2] and coord[3])
|
||||||
--[==[
|
|
||||||
-- I hate Blizzard... They can't make up their mind weather we are on TwilightHighlands or TwilightHiglands_terrain1, but we only seem to be on one or the other.
|
|
||||||
if coord[1] == 177 and not QuestHelper_ZoneLookup[coord[1]] then
|
|
||||||
coord[1] = 184
|
|
||||||
elseif coord[1] == 184 and not QuestHelper_ZoneLookup[coord[1]] then
|
|
||||||
coord[1] = 177
|
|
||||||
end
|
|
||||||
|
|
||||||
-- I hate Blizzard... They can't make up their mind weather we are on Hyjal or Hyjal_terrain1, but we only seem to be on one or the other.
|
|
||||||
if coord[1] == 198 and not QuestHelper_ZoneLookup[coord[1]] then
|
|
||||||
coord[1] = 185
|
|
||||||
elseif coord[1] == 185 and not QuestHelper_ZoneLookup[coord[1]] then
|
|
||||||
coord[1] = 198
|
|
||||||
end
|
|
||||||
|
|
||||||
-- I hate Blizzard... They can't make up their mind weather we are on Uldum or Uldum_terrain1, but we only seem to be on one or the other.
|
|
||||||
if coord[1] == 164 and not QuestHelper_ZoneLookup[coord[1]] then
|
|
||||||
coord[1] = 210
|
|
||||||
elseif coord[1] == 210 and not QuestHelper_ZoneLookup[coord[1]] then
|
|
||||||
coord[1] = 164
|
|
||||||
end
|
|
||||||
|
|
||||||
-- I hate Blizzard... They can't make up their mind whether we are on LostIsles, LostIsles_terrain1 or LostIsles_terrain2, but we only seem to be on one.
|
|
||||||
|
|
||||||
-- Create a lookup table.
|
|
||||||
local converter = {}
|
|
||||||
converter[181] = function() return convertLostIsles(181, 208, 209) end
|
|
||||||
converter[208] = function() return convertLostIsles(208, 181, 209) end
|
|
||||||
converter[209] = function() return convertLostIsles(209, 181, 208) end
|
|
||||||
|
|
||||||
-- Use the lookup table to get the real coordinate.
|
|
||||||
if converter[coord[1]] then coord[1] = converter[coord[1]]() end
|
|
||||||
]==]
|
|
||||||
local QHZL = QuestHelper_ZoneLookup
|
local QHZL = QuestHelper_ZoneLookup
|
||||||
QuestHelper: Assert(QuestHelper_ZoneLookup[coord[1]], string.format("Coord[1] = %d", coord[1]))
|
-- QuestHelper: Assert(QuestHelper_ZoneLookup[coord[1]], string.format("Coord[1] = %d", coord[1]))
|
||||||
local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(QuestHelper_ZoneLookup[coord[1]][1], QuestHelper_ZoneLookup[coord[1]][2], coord[2], coord[3])
|
-- local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(QuestHelper_ZoneLookup[coord[1]][1], QuestHelper_ZoneLookup[coord[1]][2], coord[2], coord[3])
|
||||||
QuestHelper: Assert(c)
|
QuestHelper: Assert(c)
|
||||||
return {x = x, y = y, p = coord[1], c = c}
|
return {x = coord[2], y = coord[3], m = coord[1], f = coord[4] or 0}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function do_routes(routes)
|
local function do_routes(routes)
|
||||||
|
@ -499,16 +466,16 @@ QuestHelper:Assert(v[2], tostring(k) .. " is the key, v[2]. v[1] is " .. tostrin
|
||||||
local src = convert_coordinate(v[1])
|
local src = convert_coordinate(v[1])
|
||||||
local dst = convert_coordinate(v[2])
|
local dst = convert_coordinate(v[2])
|
||||||
QuestHelper: Assert(src.x and dst.x)
|
QuestHelper: Assert(src.x and dst.x)
|
||||||
src.map_desc = {QHFormat("WAYPOINT_REASON", QuestHelper_NameLookup[v[2][1]])}
|
src.map_desc = {QHFormat("WAYPOINT_REASON", "SOURCE")} --QuestHelper_NameLookup[v[2][1]])}
|
||||||
dst.map_desc = {QHFormat("WAYPOINT_REASON", QuestHelper_NameLookup[v[1][1]])}
|
dst.map_desc = {QHFormat("WAYPOINT_REASON", "DEST")} --QuestHelper_NameLookup[v[1][1]])}
|
||||||
|
|
||||||
local rev_cost = v[3]
|
local rev_cost = v[3]
|
||||||
if v[4] then rev_cost = nil end
|
if v[4] then rev_cost = nil end
|
||||||
QH_Graph_Plane_Makelink("static_route", src, dst, v[3], rev_cost) -- this couldn't possibly fail
|
QH_Graph_Plane_Makelink("static_route", src, dst, v[3], rev_cost) -- this couldn't possibly fail
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Generating landing_db for potential use in adding Mage portals and Hearthstone to routing
|
-- Generating landing_db for potential use in adding Mage portals and Hearthstone to routing
|
||||||
local faction_db
|
local faction_db
|
||||||
local landing_db
|
local landing_db
|
||||||
|
@ -519,11 +486,11 @@ QuestHelper:Assert(v[2], tostring(k) .. " is the key, v[2]. v[1] is " .. tostrin
|
||||||
faction_db = static_horde_routes
|
faction_db = static_horde_routes
|
||||||
landing_db = static_horde_landings
|
landing_db = static_horde_landings
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Not adding landing_db or static_shared_landings here because it depend on implimentation
|
-- Not adding landing_db or static_shared_landings here because it depend on implimentation
|
||||||
do_routes(faction_db)
|
do_routes(faction_db)
|
||||||
do_routes(static_shared_routes)
|
do_routes(static_shared_routes)
|
||||||
|
|
||||||
for k, v in ipairs(static_zone_transitions) do
|
for k, v in ipairs(static_zone_transitions) do
|
||||||
QuestHelper:Assert(v[1], tostring(k) .. " is the key, v[1]-2.")
|
QuestHelper:Assert(v[1], tostring(k) .. " is the key, v[1]-2.")
|
||||||
QuestHelper:Assert(v[3], tostring(k) .. " is the key, v[3]-2.")
|
QuestHelper:Assert(v[3], tostring(k) .. " is the key, v[3]-2.")
|
||||||
|
@ -531,18 +498,18 @@ QuestHelper:Assert(v[4], tostring(k) .. " is the key, v[4]-2.")
|
||||||
local src = convert_coordinate({v[1], v[3], v[4]})
|
local src = convert_coordinate({v[1], v[3], v[4]})
|
||||||
local dst = convert_coordinate({v[1], v[3], v[4]})
|
local dst = convert_coordinate({v[1], v[3], v[4]})
|
||||||
dst.p = v[2]
|
dst.p = v[2]
|
||||||
src.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", QuestHelper_NameLookup[v[2]]))}
|
src.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", "BORDER SOURCE"))} --QuestHelper_NameLookup[v[2]]))}
|
||||||
dst.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", QuestHelper_NameLookup[v[1]]))}
|
dst.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", "BORDER DEST"))} --QuestHelper_NameLookup[v[1]]))}
|
||||||
QH_Graph_Plane_Makelink("static_transition", src, dst, 0, 0)
|
QH_Graph_Plane_Makelink("static_transition", src, dst, 0, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
do
|
do
|
||||||
QuestHelper:Assert(dark_portal_route[1], "DPR1")
|
QuestHelper:Assert(dark_portal_route[1], "DPR1")
|
||||||
QuestHelper:Assert(dark_portal_route[2], "DPR2")
|
QuestHelper:Assert(dark_portal_route[2], "DPR2")
|
||||||
local src = convert_coordinate(dark_portal_route[1])
|
local src = convert_coordinate(dark_portal_route[1])
|
||||||
local dst = convert_coordinate(dark_portal_route[2])
|
local dst = convert_coordinate(dark_portal_route[2])
|
||||||
src.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", QuestHelper_NameLookup[dark_portal_route[2]]))}
|
src.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", "DKPTL SOURCE"))} --QuestHelper_NameLookup[dark_portal_route[2]]))}
|
||||||
dst.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", QuestHelper_NameLookup[dark_portal_route[1]]))}
|
dst.map_desc = {QHFormat("WAYPOINT_REASON", QHFormat("ZONE_BORDER_SIMPLE", "DKPTL DEST"))} --QuestHelper_NameLookup[dark_portal_route[1]]))}
|
||||||
QH_Graph_Plane_Makelink("dark_portal", src, dst, 15, 15)
|
QH_Graph_Plane_Makelink("dark_portal", src, dst, 15, 15)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,15 +33,15 @@ QH_OnUpdate(function()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
quieted = false
|
quieted = false
|
||||||
|
|
||||||
if not rc then rc = LibStub("LibRangeCheck-2.0") end
|
if not rc then rc = LibStub("LibRangeCheck-2.0") end
|
||||||
|
|
||||||
if tick <= GetTime() then
|
if tick <= GetTime() then
|
||||||
tick = tick + 1
|
tick = tick + 1
|
||||||
if tick < GetTime() then
|
if tick < GetTime() then
|
||||||
tick = GetTime()
|
tick = GetTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
local targ = UnitGUID("target")
|
local targ = UnitGUID("target")
|
||||||
if targ ~= anchor or UnitIsDead("target") then
|
if targ ~= anchor or UnitIsDead("target") then
|
||||||
for _, v in pairs(map) do QuestHelper:ReleaseTable(v) end
|
for _, v in pairs(map) do QuestHelper:ReleaseTable(v) end
|
||||||
|
@ -52,25 +52,25 @@ QH_OnUpdate(function()
|
||||||
end
|
end
|
||||||
anchor = targ
|
anchor = targ
|
||||||
end
|
end
|
||||||
|
|
||||||
local minRange, maxRange = rc:GetRange('target')
|
local minRange, maxRange = rc:GetRange('target')
|
||||||
|
|
||||||
if minRange then
|
if minRange then
|
||||||
if not maxRange then maxRange = 120 end
|
if not maxRange then maxRange = 120 end
|
||||||
|
|
||||||
minRange = math.max(0, minRange - 1)
|
minRange = math.max(0, minRange - 1)
|
||||||
maxRange = maxRange + 1
|
maxRange = maxRange + 1
|
||||||
|
|
||||||
local mnr, mxr = minRange * minRange, maxRange * maxRange
|
local mnr, mxr = minRange * minRange, maxRange * maxRange
|
||||||
local px, py = QuestHelper.routing_ax, QuestHelper.routing_ay
|
local px, py = QuestHelper.routing_ax, QuestHelper.routing_ay
|
||||||
|
|
||||||
-- first we blur
|
-- first we blur
|
||||||
local newmap = QuestHelper:CreateTable("radar")
|
local newmap = QuestHelper:CreateTable("radar")
|
||||||
for x, d in pairs(map) do
|
for x, d in pairs(map) do
|
||||||
if not newmap[x - grid] then newmap[x - grid] = QuestHelper:CreateTable("radar") end
|
if not newmap[x - grid] then newmap[x - grid] = QuestHelper:CreateTable("radar") end
|
||||||
if not newmap[x] then newmap[x] = QuestHelper:CreateTable("radar") end
|
if not newmap[x] then newmap[x] = QuestHelper:CreateTable("radar") end
|
||||||
if not newmap[x + grid] then newmap[x + grid] = QuestHelper:CreateTable("radar") end
|
if not newmap[x + grid] then newmap[x + grid] = QuestHelper:CreateTable("radar") end
|
||||||
|
|
||||||
for y, v in pairs(d) do
|
for y, v in pairs(d) do
|
||||||
newmap[x - grid][y - grid] = (newmap[x - grid][y - grid] or 0) + v
|
newmap[x - grid][y - grid] = (newmap[x - grid][y - grid] or 0) + v
|
||||||
newmap[x - grid][y] = (newmap[x - grid][y] or 0) + v * 2
|
newmap[x - grid][y] = (newmap[x - grid][y] or 0) + v * 2
|
||||||
|
@ -82,13 +82,13 @@ QH_OnUpdate(function()
|
||||||
newmap[x + grid][y] = (newmap[x + grid][y] or 0) + v * 2
|
newmap[x + grid][y] = (newmap[x + grid][y] or 0) + v * 2
|
||||||
newmap[x + grid][y + grid] = (newmap[x + grid][y + grid] or 0) + v
|
newmap[x + grid][y + grid] = (newmap[x + grid][y + grid] or 0) + v
|
||||||
end
|
end
|
||||||
|
|
||||||
QuestHelper:ReleaseTable(d)
|
QuestHelper:ReleaseTable(d)
|
||||||
end
|
end
|
||||||
QuestHelper:ReleaseTable(map)
|
QuestHelper:ReleaseTable(map)
|
||||||
map = newmap
|
map = newmap
|
||||||
|
|
||||||
|
|
||||||
-- then we crop
|
-- then we crop
|
||||||
local highest = 0
|
local highest = 0
|
||||||
local newmap = QuestHelper:CreateTable("radar")
|
local newmap = QuestHelper:CreateTable("radar")
|
||||||
|
@ -107,7 +107,7 @@ QH_OnUpdate(function()
|
||||||
something = true
|
something = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if something then
|
if something then
|
||||||
newmap[x] = newk
|
newmap[x] = newk
|
||||||
end
|
end
|
||||||
|
@ -115,7 +115,7 @@ QH_OnUpdate(function()
|
||||||
end
|
end
|
||||||
QuestHelper:ReleaseTable(map)
|
QuestHelper:ReleaseTable(map)
|
||||||
map = newmap
|
map = newmap
|
||||||
|
|
||||||
-- then we normalize
|
-- then we normalize
|
||||||
if highest > 0 then
|
if highest > 0 then
|
||||||
highest = 1 / highest -- I don't know if mult is faster in lua or not, but it often is
|
highest = 1 / highest -- I don't know if mult is faster in lua or not, but it often is
|
||||||
|
@ -125,7 +125,7 @@ QH_OnUpdate(function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- then we add
|
-- then we add
|
||||||
-- probably a more efficient way to do this
|
-- probably a more efficient way to do this
|
||||||
px, py = math.floor(px / grid + 0.5) * grid, math.floor(py / grid + 0.5) * grid
|
px, py = math.floor(px / grid + 0.5) * grid, math.floor(py / grid + 0.5) * grid
|
||||||
|
@ -148,7 +148,7 @@ QH_OnUpdate(function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- then we post
|
-- then we post
|
||||||
local widgetofs = 1
|
local widgetofs = 1
|
||||||
for x, d in pairs(map) do
|
for x, d in pairs(map) do
|
||||||
|
@ -162,7 +162,7 @@ QH_OnUpdate(function()
|
||||||
widg[1]:SetHeight(lheight)
|
widg[1]:SetHeight(lheight)
|
||||||
end
|
end
|
||||||
widgetofs = widgetofs + 1
|
widgetofs = widgetofs + 1
|
||||||
|
|
||||||
widg[1]:SetTexture(0, 1, 0, math.min(1, v * 1.2))
|
widg[1]:SetTexture(0, 1, 0, math.min(1, v * 1.2))
|
||||||
widg[1]:Show()
|
widg[1]:Show()
|
||||||
widg[2] = x
|
widg[2] = x
|
||||||
|
@ -170,25 +170,25 @@ QH_OnUpdate(function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for rem = widgetofs, #widgets do
|
for rem = widgetofs, #widgets do
|
||||||
widgets[rem][1]:Hide()
|
widgets[rem][1]:Hide()
|
||||||
widgets[rem][3] = nil
|
widgets[rem][3] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- here we replace the widgets
|
-- here we replace the widgets
|
||||||
|
|
||||||
local rotatey = (GetCVar("rotateMinimap") == "0") and 0 or GetPlayerFacing()
|
local rotatey = (GetCVar("rotateMinimap") == "0") and 0 or GetPlayerFacing()
|
||||||
rotatey = rotatey * 180 / 3.14159
|
rotatey = rotatey * 180 / 3.14159
|
||||||
|
-- WILL FAIL HERE.
|
||||||
local mapdiam = QuestHelper.Astrolabe:GetMapDiameter()
|
local mapdiam = QuestHelper.Astrolabe:GetMapDiameter()
|
||||||
local minimap = QuestHelper.Astrolabe:GetMinimapObject()
|
local minimap = QuestHelper.Astrolabe:GetMinimapObject()
|
||||||
local mapwid, maphei = minimap:GetWidth(), minimap:GetHeight()
|
local mapwid, maphei = minimap:GetWidth(), minimap:GetHeight()
|
||||||
|
|
||||||
local xds, yds = mapwid / mapdiam, maphei / mapdiam
|
local xds, yds = mapwid / mapdiam, maphei / mapdiam
|
||||||
|
|
||||||
local nwidth, nheight = xds * grid, yds * grid
|
local nwidth, nheight = xds * grid, yds * grid
|
||||||
if nwidth ~= lwidth or nheight ~= lheight then
|
if nwidth ~= lwidth or nheight ~= lheight then
|
||||||
for _, widg in pairs(widgets) do
|
for _, widg in pairs(widgets) do
|
||||||
|
@ -197,18 +197,18 @@ QH_OnUpdate(function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
lwidth, lheight = nwidth, nheight
|
lwidth, lheight = nwidth, nheight
|
||||||
|
|
||||||
local xdx, xdy, ydx, ydy = cos(rotatey), -sin(rotatey), -sin(rotatey), -cos(rotatey) -- this will be wrong, but I'll figure it out
|
local xdx, xdy, ydx, ydy = cos(rotatey), -sin(rotatey), -sin(rotatey), -cos(rotatey) -- this will be wrong, but I'll figure it out
|
||||||
xdx, ydx = xdx * xds, ydx * xds
|
xdx, ydx = xdx * xds, ydx * xds
|
||||||
xdy, ydy = xdy * yds, ydy * yds
|
xdy, ydy = xdy * yds, ydy * yds
|
||||||
|
|
||||||
local px, py = QuestHelper.routing_ax, QuestHelper.routing_ay
|
local px, py = QuestHelper.routing_ax, QuestHelper.routing_ay
|
||||||
|
|
||||||
for _, v in pairs(widgets) do
|
for _, v in pairs(widgets) do
|
||||||
if not v[3] then break end
|
if not v[3] then break end
|
||||||
|
|
||||||
local dx, dy = v[2] - px, v[3] - py
|
local dx, dy = v[2] - px, v[3] - py
|
||||||
|
|
||||||
v[1]:SetPoint("CENTER", Minimap, "CENTER", dx * xdx + dy * ydx, dx * xdy + dy * ydy)
|
v[1]:SetPoint("CENTER", Minimap, "CENTER", dx * xdx + dy * ydx, dx * xdy + dy * ydy)
|
||||||
--print("placing", dx * xdx + dy * ydx, dx * xdy + dy * ydy)
|
--print("placing", dx * xdx + dy * ydx, dx * xdy + dy * ydy)
|
||||||
end
|
end
|
||||||
|
|
Fichier diff supprimé car celui-ci est trop grand
Voir la Diff
|
@ -30,7 +30,7 @@ local default_colour_theme =
|
||||||
menu_text={1, 1, 1},
|
menu_text={1, 1, 1},
|
||||||
menu_text_highlight={0, 0, 0},
|
menu_text_highlight={0, 0, 0},
|
||||||
menu={0, 0, 0},
|
menu={0, 0, 0},
|
||||||
menu_highlight={0.3, 0.5, 0.7},
|
menu_highlight={0.3, 0.5, 0.7},
|
||||||
menu_title_text={1, 1, 1},
|
menu_title_text={1, 1, 1},
|
||||||
menu_title_text_highlight={1, 1, 1},
|
menu_title_text_highlight={1, 1, 1},
|
||||||
menu_title={0, 0.2, 0.6},
|
menu_title={0, 0.2, 0.6},
|
||||||
|
@ -54,7 +54,7 @@ function QuestHelper:GetColourTheme()
|
||||||
if date("%b%d") == "Dec25" then
|
if date("%b%d") == "Dec25" then
|
||||||
return xmas_colour_theme
|
return xmas_colour_theme
|
||||||
end
|
end
|
||||||
|
|
||||||
return default_colour_theme
|
return default_colour_theme
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -75,30 +75,30 @@ function QuestHelper:CreateUID(length)
|
||||||
local characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
local characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
for k = 1, (math.floor(GetTime() % 1000) + 5) do math.random() end -- it's sort of like seeding. only worse.
|
for k = 1, (math.floor(GetTime() % 1000) + 5) do math.random() end -- it's sort of like seeding. only worse.
|
||||||
local base = GetUnitName("player")..":"..GetRealmName()..":"..math.random(0, 2147483647)..":"..GetTime()..":"..time()
|
local base = GetUnitName("player")..":"..GetRealmName()..":"..math.random(0, 2147483647)..":"..GetTime()..":"..time()
|
||||||
|
|
||||||
for c = 1,(length or 32) do
|
for c = 1,(length or 32) do
|
||||||
local pos = 1+math.floor(self:HashString(result..base..math.random(0, 2147483647))%string.len(characters))
|
local pos = 1+math.floor(self:HashString(result..base..math.random(0, 2147483647))%string.len(characters))
|
||||||
result = result .. string.sub(characters, pos, pos)
|
result = result .. string.sub(characters, pos, pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function QuestHelper:ZoneSanity()
|
function QuestHelper:ZoneSanity()
|
||||||
local sane = true
|
local sane = true
|
||||||
|
|
||||||
for c in pairs(self.Astrolabe:GetMapVirtualContinents()) do
|
for c in pairs(self.Astrolabe:GetMapVirtualContinents()) do
|
||||||
local pz = self.Astrolabe:GetMapVirtualZones(c)
|
local pz = self.Astrolabe:GetMapVirtualZones(c)
|
||||||
pz[0] = true
|
pz[0] = true
|
||||||
for z in pairs(pz) do
|
for z in pairs(pz) do
|
||||||
local name
|
local name
|
||||||
|
|
||||||
if z == 0 then
|
if z == 0 then
|
||||||
name = self.Astrolabe:GetMapVirtualContinents()[c]
|
name = self.Astrolabe:GetMapVirtualContinents()[c]
|
||||||
else
|
else
|
||||||
name = self.Astrolabe:GetMapVirtualZones(c)[z]
|
name = self.Astrolabe:GetMapVirtualZones(c)[z]
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ assert(name) ]]
|
--[[ assert(name) ]]
|
||||||
-- c,z should be equal to name, unless c = 5 and z = 0, in which case it should be equal to name .. " Continent"
|
-- c,z should be equal to name, unless c = 5 and z = 0, in which case it should be equal to name .. " Continent"
|
||||||
if QuestHelper_Zones[c][z] ~= name then
|
if QuestHelper_Zones[c][z] ~= name then
|
||||||
|
@ -106,7 +106,7 @@ function QuestHelper:ZoneSanity()
|
||||||
QuestHelper_ErrorCatcher_ExplicitError(false, string.format("'%s' has the wrong ID (should be %d,%d).", name, c, z))
|
QuestHelper_ErrorCatcher_ExplicitError(false, string.format("'%s' has the wrong ID (should be %d,%d).", name, c, z))
|
||||||
--QuestHelper:TextOut(string.format("'%s' has the wrong ID (should be %d,%d).", name, c, z))
|
--QuestHelper:TextOut(string.format("'%s' has the wrong ID (should be %d,%d).", name, c, z))
|
||||||
end
|
end
|
||||||
|
|
||||||
local pair = QuestHelper_ZoneLookup[name]
|
local pair = QuestHelper_ZoneLookup[name]
|
||||||
if not pair then
|
if not pair then
|
||||||
sane = false
|
sane = false
|
||||||
|
@ -116,14 +116,14 @@ function QuestHelper:ZoneSanity()
|
||||||
QuestHelper_ErrorCatcher_ExplicitError(false, string.format("ZoneLookup['%s'] maps to wrong pair. It should be (%d, %d) but is (%d, %d)", name, c, z, pair[1], pair[2]))
|
QuestHelper_ErrorCatcher_ExplicitError(false, string.format("ZoneLookup['%s'] maps to wrong pair. It should be (%d, %d) but is (%d, %d)", name, c, z, pair[1], pair[2]))
|
||||||
--QuestHelper:TextOut("ZoneLookup['"..name.."'] maps to wrong pair.")
|
--QuestHelper:TextOut("ZoneLookup['"..name.."'] maps to wrong pair.")
|
||||||
end
|
end
|
||||||
|
|
||||||
local index = QuestHelper_IndexLookup[name]
|
local index = QuestHelper_IndexLookup[name]
|
||||||
if QuestHelper_ZoneLookup[index] ~= pair then
|
if QuestHelper_ZoneLookup[index] ~= pair then
|
||||||
sane = false
|
sane = false
|
||||||
QuestHelper_ErrorCatcher_ExplicitError(false, "ZoneLookup['"..name.."'] isn't equal to ZoneLookup["..index.."] they are "..tostring(QuestHelper_ZoneLookup[name]).." and "..tostring(QuestHelper_ZoneLookup[index])..", respectively.")
|
QuestHelper_ErrorCatcher_ExplicitError(false, "ZoneLookup['"..name.."'] isn't equal to ZoneLookup["..index.."] they are "..tostring(QuestHelper_ZoneLookup[name]).." and "..tostring(QuestHelper_ZoneLookup[index])..", respectively.")
|
||||||
--QuestHelper:TextOut("ZoneLookup['"..name.."'] isn't equal to ZoneLookup["..index.."] they are "..tostring(QuestHelper_ZoneLookup[name]).." and "..tostring(QuestHelper_ZoneLookup[index])..", respectively.")
|
--QuestHelper:TextOut("ZoneLookup['"..name.."'] isn't equal to ZoneLookup["..index.."] they are "..tostring(QuestHelper_ZoneLookup[name]).." and "..tostring(QuestHelper_ZoneLookup[index])..", respectively.")
|
||||||
end
|
end
|
||||||
|
|
||||||
if not index or QuestHelper_NameLookup[index] ~= name then
|
if not index or QuestHelper_NameLookup[index] ~= name then
|
||||||
sane = false
|
sane = false
|
||||||
QuestHelper_ErrorCatcher_ExplicitError(false, "NameLookup["..(index or "???").."] doesn't equal '"..name.."', it is "..tostring(QuestHelper_NameLookup[index]))
|
QuestHelper_ErrorCatcher_ExplicitError(false, "NameLookup["..(index or "???").."] doesn't equal '"..name.."', it is "..tostring(QuestHelper_NameLookup[index]))
|
||||||
|
@ -131,7 +131,7 @@ function QuestHelper:ZoneSanity()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return sane
|
return sane
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -160,11 +160,11 @@ end
|
||||||
|
|
||||||
function QuestHelper:GetUnitID(unit)
|
function QuestHelper:GetUnitID(unit)
|
||||||
local id = UnitGUID(unit)
|
local id = UnitGUID(unit)
|
||||||
|
|
||||||
if id then
|
if id then
|
||||||
return (string.sub(id, 5, 5) == "3") and tonumber(string.sub(id, 6, 12), 16) or nil
|
return (string.sub(id, 5, 5) == "3") and tonumber(string.sub(id, 6, 12), 16) or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ end
|
||||||
|
|
||||||
function QuestHelper:CountItem(item_id)
|
function QuestHelper:CountItem(item_id)
|
||||||
local count = 0
|
local count = 0
|
||||||
|
|
||||||
for bag = 0,NUM_BAG_SLOTS do
|
for bag = 0,NUM_BAG_SLOTS do
|
||||||
for slot = 1,GetContainerNumSlots(bag) do
|
for slot = 1,GetContainerNumSlots(bag) do
|
||||||
local link = GetContainerItemLink(bag, slot)
|
local link = GetContainerItemLink(bag, slot)
|
||||||
|
@ -188,14 +188,14 @@ function QuestHelper:CountItem(item_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return count
|
return count
|
||||||
end
|
end
|
||||||
|
|
||||||
function QuestHelper:ItemCooldown(item_id)
|
function QuestHelper:ItemCooldown(item_id)
|
||||||
local now = GetTime()
|
local now = GetTime()
|
||||||
local cooldown = nil
|
local cooldown = nil
|
||||||
|
|
||||||
for bag = 0,NUM_BAG_SLOTS do
|
for bag = 0,NUM_BAG_SLOTS do
|
||||||
for slot = 1,GetContainerNumSlots(bag) do
|
for slot = 1,GetContainerNumSlots(bag) do
|
||||||
local link = GetContainerItemLink(bag, slot)
|
local link = GetContainerItemLink(bag, slot)
|
||||||
|
@ -213,7 +213,7 @@ function QuestHelper:ItemCooldown(item_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return cooldown
|
return cooldown
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ function QuestHelper:TimeString(seconds)
|
||||||
--self:AppendNotificationError("2008-10-8 nil-timestring") -- we're just going to do away with this entirely, the fact is that a lot of this is going to be ripped to shreds soon anyway
|
--self:AppendNotificationError("2008-10-8 nil-timestring") -- we're just going to do away with this entirely, the fact is that a lot of this is going to be ripped to shreds soon anyway
|
||||||
return "(unknown)"
|
return "(unknown)"
|
||||||
end
|
end
|
||||||
|
|
||||||
local seconds = math.ceil(seconds)
|
local seconds = math.ceil(seconds)
|
||||||
local h, m, s = math.floor(seconds/(60*60)), math.floor(seconds/60)%60, seconds%60
|
local h, m, s = math.floor(seconds/(60*60)), math.floor(seconds/60)%60, seconds%60
|
||||||
if h > 0 then
|
if h > 0 then
|
||||||
|
@ -257,20 +257,13 @@ function QuestHelper:PercentString(pct)
|
||||||
end
|
end
|
||||||
|
|
||||||
function QuestHelper:PlayerPosition()
|
function QuestHelper:PlayerPosition()
|
||||||
return self.i, self.x, self.y
|
return self.m, self.f, self.x, self.y
|
||||||
end
|
end
|
||||||
|
|
||||||
function QuestHelper:UnitPosition(unit)
|
function QuestHelper:UnitPosition(unit)
|
||||||
local c, z, x, y = self.Astrolabe:GetUnitPosition(unit,true)
|
local m, f, x, y = self.Astrolabe:GetUnitPosition(unit,true)
|
||||||
if c then
|
if m then
|
||||||
if z == 0 then
|
return m, f, x, y
|
||||||
SetMapToCurrentZone()
|
|
||||||
z = GetCurrentMapZone()
|
|
||||||
if z ~= 0 then
|
|
||||||
x, y = self.Astrolabe:TranslateWorldMapPosition(c, 0, x, y, c, z)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return QuestHelper_IndexLookup[c][z], x, y
|
|
||||||
else
|
else
|
||||||
return self:PlayerPosition()
|
return self:PlayerPosition()
|
||||||
end
|
end
|
||||||
|
@ -290,22 +283,21 @@ function QuestHelper:Location_AbsoluteString(delayed, c, x, y)
|
||||||
return ("[|cffffffff%s/%s,%s,%s|r]"):format(delayed and "D" or "c", c and string.format("%d", c) or tostring(c), x and string.format("%.3f", x) or tostring(x), y and string.format("%.3f", y) or tostring(y))
|
return ("[|cffffffff%s/%s,%s,%s|r]"):format(delayed and "D" or "c", c and string.format("%d", c) or tostring(c), x and string.format("%.3f", x) or tostring(x), y and string.format("%.3f", y) or tostring(y))
|
||||||
end
|
end
|
||||||
|
|
||||||
function QuestHelper:Distance(i1, x1, y1, i2, x2, y2)
|
function QuestHelper:Distance(m1, x1, y1, m2, x2, y2)
|
||||||
local p1, p2 = QuestHelper_ZoneLookup[i1], QuestHelper_ZoneLookup[i2]
|
return self.Astrolabe:ComputeDistance(m1, 0, x1, y1, m2, 0, x2, y2) or 10000
|
||||||
return self.Astrolabe:ComputeDistance(p1[1], p1[2], x1, y1, p2[1], p2[2], x2, y2) or 10000
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function QuestHelper:AppendPosition(list, index, x, y, w, min_dist)
|
function QuestHelper:AppendPosition(list, index, x, y, w, min_dist)
|
||||||
if not x or not y or (x == 0 and y == 0) or x <= -0.1 or y <= -0.1 or x >= 1.1 or y >= 1.1 then
|
if not x or not y or (x == 0 and y == 0) or x <= -0.1 or y <= -0.1 or x >= 1.1 or y >= 1.1 then
|
||||||
local nc, nz, nx, ny = self.Astrolabe:GetCurrentPlayerPosition()
|
local nm, nf, nx, ny = self.Astrolabe:GetCurrentPlayerPosition()
|
||||||
--self:AppendNotificationError("2008-10-6 nil-position", string.format("nilposition, %s %s %s %s vs %s %s", tostring(nc), tostring(nz), tostring(nx), tostring(ny), tostring(x), tostring(y))) -- We're just not worrying about this too much anymore. Slash and burn.
|
--self:AppendNotificationError("2008-10-6 nil-position", string.format("nilposition, %s %s %s %s vs %s %s", tostring(nc), tostring(nz), tostring(nx), tostring(ny), tostring(x), tostring(y))) -- We're just not worrying about this too much anymore. Slash and burn.
|
||||||
return list -- This isn't a real position.
|
return list -- This isn't a real position.
|
||||||
end
|
end
|
||||||
|
|
||||||
local closest, distance = nil, 0
|
local closest, distance = nil, 0
|
||||||
w = w or 1
|
w = w or 1
|
||||||
min_dist = min_dist or 200
|
min_dist = min_dist or 200
|
||||||
|
|
||||||
for i, p in ipairs(list) do
|
for i, p in ipairs(list) do
|
||||||
if index == p[1] then
|
if index == p[1] then
|
||||||
local d = self:Distance(index, x, y, p[1], p[2], p[3])
|
local d = self:Distance(index, x, y, p[1], p[2], p[3])
|
||||||
|
@ -314,7 +306,7 @@ function QuestHelper:AppendPosition(list, index, x, y, w, min_dist)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if closest and distance < min_dist then
|
if closest and distance < min_dist then
|
||||||
local p = list[closest]
|
local p = list[closest]
|
||||||
p[2] = (p[2]*p[4]+x*w)/(p[4]+w)
|
p[2] = (p[2]*p[4]+x*w)/(p[4]+w)
|
||||||
|
@ -323,7 +315,7 @@ function QuestHelper:AppendPosition(list, index, x, y, w, min_dist)
|
||||||
else
|
else
|
||||||
table.insert(list, {index, x, y, w})
|
table.insert(list, {index, x, y, w})
|
||||||
end
|
end
|
||||||
|
|
||||||
return list
|
return list
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -459,6 +451,6 @@ function QH_fixedmessage(text)
|
||||||
whileDead = 1,
|
whileDead = 1,
|
||||||
hideOnEscape = 1
|
hideOnEscape = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
StaticPopup_Show(msgtext)
|
StaticPopup_Show(msgtext)
|
||||||
end
|
end
|
||||||
|
|
Référencer dans un nouveau ticket