1
0
Bifurcation 0

Hopefully this will make the elder's names appear.

Cette révision appartient à :
Nathanial.C.Jones 2011-01-24 00:22:27 +00:00
Parent af7b77aecc
révision c7a81affaa
1 fichiers modifiés avec 33 ajouts et 23 suppressions

Voir le fichier

@ -71,6 +71,28 @@ end
local msfires = {desc = QHText("FIND_CUSTOM_LOCATION"), tracker_desc = QHText("FIND_CUSTOM_LOCATION")}
local function QH_FindCoord(x, y, z, label)
for z, nam in pairs(QuestHelper_NameLookup) do
if nam:lower():find(locz:lower()) then
locz = z
break
end
end
if type(locz) == "number" then
local ec, ez = unpack(QuestHelper_ZoneLookup[locz])
local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(ec, ez, locx / 100, locy / 100)
local node = {loc = {x = x, y = y, p = locz, c = QuestHelper_ParentLookup[locz]}, why = msfires, map_desc = {lable}, tracker_desc = label, tracker_hidden = true}
local cluster = {node}
node.cluster = cluster
node.map_suppress_ignore = true
node.map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(cluster) end) end
QH_Route_ClusterAdd(cluster)
end
end
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
local locx, locy, locz
@ -87,25 +109,7 @@ local function QH_FindLoc(locd)
end
if locz then
for z, nam in pairs(QuestHelper_NameLookup) do
if nam:lower():find(locz:lower()) then
locz = z
break
end
end
if type(locz) == "number" then
local ec, ez = unpack(QuestHelper_ZoneLookup[locz])
local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(ec, ez, locx / 100, locy / 100)
local node = {loc = {x = x, y = y, p = locz, c = QuestHelper_ParentLookup[locz]}, why = msfires, map_desc = {QHText("FIND_CUSTOM_LOCATION")}, tracker_desc = QHText("FIND_CUSTOM_LOCATION"), tracker_hidden = true}
local cluster = {node}
node.cluster = cluster
node.map_suppress_ignore = true
node.map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(cluster) end) end
QH_Route_ClusterAdd(cluster)
end
QH_FindCoord(locx, locy, locz, QHText("FIND_CUSTOM_LOCATION"))
end
end
@ -194,14 +198,20 @@ local function QH_FindElders(elder_or_achievement, all_elders)
for elder, elder_loc in pairs(eldrs) do
if not all_elders then
if achievement_match then -- just add it
QH_FindLoc(string.upper(elder_loc))
local locz, locx, locy = elder_loc:match("^(.+) (%d+) (%d+)$")
locx, locy = tonumber(locx), tonumber(locy)
QH_FindCoord(locx, locy, locz, 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
QH_FindLoc(string.upper(elder_loc))
local locz, locx, locy = elder_loc:match("^(.+) (%d+) (%d+)$")
locx, locy = tonumber(locx), tonumber(locy)
QH_FindCoord(locx, locy, locz, elder)
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.
else -- We came in without an input, therefore we add all.
QH_FindLoc(string.upper(elder_loc))
local locz, locx, locy = elder_loc:match("^(.+) (%d+) (%d+)$")
locx, locy = tonumber(locx), tonumber(locy)
QH_FindCoord(locx, locy, locz, elder)
end
end
@ -224,7 +234,7 @@ function QH_FindName(name)
QH_FindLoc(locd)
elseif elder_loc then
if elder_loc == true then QH_FindElders(nil, true)
else QH_FindElders(elder_loc)
else QH_FindElders(string.upper(elder_loc))
end
else
if not DB_Ready() then