1
0
Bifurcation 0

New method for converting an invalid LostIsles terrain. If this doesn't work, then I'm going to have to go back and try something more drastic and more painful.

Cette révision appartient à :
Nathanial.C.Jones 2011-01-28 11:24:50 +00:00
Parent ffb0ffb712
révision bdb95148aa
1 fichiers modifiés avec 17 ajouts et 12 suppressions

Voir le fichier

@ -275,6 +275,13 @@ if QuestHelper:IsWrath32() then
table.insert(static_zone_transitions, {153, 71, 0.5, 0.5}) -- Hrothgar's Landing <--> Icecrown
end
local function convertLostIsles(current, other1, other2)
if QuestHelper_ZoneLookup[current] then return current end
if QuestHelper_ZoneLookup[other1] then return other1 end
if QuestHelper_ZoneLookup[other2] then return other2 end
QuestHelper: Assert(false, "LostIsles is not working.")
end
function load_graph_links()
local function convert_coordinate(coord)
QuestHelper: Assert(coord[1] and coord[2] and coord[3])
@ -286,19 +293,17 @@ function load_graph_links()
coord[1] = 198
end
-- I hate Blizzard... They can't make up their mind weather we are on LostIsles, LostIsles_terrain1 or LostIsles_terrain2, but we only seem to be on one.
-- Trust me when I say that unless there's more terrains for LostIsles, this does NOT loop back to coord[1] == 181.
if not QuestHelper_ZoneLookup[coord[1]] and coord[1] == 181 then
coord[1] = 208
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 = {
181 = function() return convertLostIsles(181, 208, 209) end,
208 = function() return convertLostIsles(208, 181, 209) end,
209 = funciton() return convertLostIsles(209, 181, 208) end
}
if not QuestHelper_ZoneLookup[coord[1]] and coord[1] == 208 then
coord[1] = 209
end
if not QuestHelper_ZoneLookup[coord[1]] and coord[1] == 209 then
coord[1] = 181
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 test = QHZL[181] or QHZL[208] or QHZL[209]