diff --git a/Data/MapWorldHotspots.lua b/Data/MapWorldHotspots.lua index ba55d74..9814892 100644 --- a/Data/MapWorldHotspots.lua +++ b/Data/MapWorldHotspots.lua @@ -1,4 +1,4 @@ -Nx.MapWorldHotspots = { +Nx.MapWorldHotspots = { } Nx.MapWorldHotspots2 = { @@ -128,8 +128,11 @@ Nx.MapWorldHotspots2 = { -- Alli and horde cities - need? what about ashran? [588] = "000000fffffe", [622] = "000000fffffe", - [624] = "000000fffffe" -} + [624] = "000000fffffe", +-- Khaz Algar + [2214] = "6140511eb7d67d6051428f09", + [2215] = "3ff0a3451dc18510a32b8a8eb090a307a028b980a310a8f5" +} ------------------------------------------------------------------------------- --EOF diff --git a/Data/ZoneConnections.lua b/Data/ZoneConnections.lua index 47a891d..91273de 100644 --- a/Data/ZoneConnections.lua +++ b/Data/ZoneConnections.lua @@ -1,4 +1,4 @@ -local L = LibStub("AceLocale-3.0"):GetLocale("Carbonite") +local L = LibStub("AceLocale-3.0"):GetLocale("Carbonite") Nx.ZoneConnections = { "7|1||14|14.4|31.7||25|69.3|70", @@ -128,6 +128,10 @@ Nx.ZoneConnections = { "7|1||390|44.11|14.3||379|55.54|92.34", "7|1||379|30.11|63.39||388|70.39|43.79", "7|1||388|61.24|82.84||422|44.69|10.31", - "7|1||418|75.3|5.21||376|81.9|48.84" + "7|1||418|75.3|5.21||376|81.9|48.84", + "7|1||2339|35.7|59.6||2214|42.2|28.4", + "7|1||2214|48.3|66.4||2255|69.9|22.2", + "7|1||2214|39.6|25.1||2215|77.8|42.9", + "7|1||2215|42.3|83.4||2255|26.1|32.8", } diff --git a/NxMap.lua b/NxMap.lua index d882713..6f95e44 100644 --- a/NxMap.lua +++ b/NxMap.lua @@ -9434,61 +9434,60 @@ function Nx.Map:InitTables() Nx.ZoneConnections = Nx["ZoneConnections"] or Nx.ZoneConnections -- Copy unmunged data to munged data -- Init zone connections - for n = 0, 1999 do + for n = 0, 2999 do local mapId = n local winfo = worldInfo[mapId] - if not winfo then - break - end - local cons = {} - winfo.Connections = cons - if winfo.Short then + if winfo then + local cons = {} + winfo.Connections = cons + if winfo.Short then - end - for _, str in ipairs (Nx.ZoneConnections) do + end + for _, str in ipairs (Nx.ZoneConnections) do - local flags, conTime, name1, z1, x1, y1, name2, z2, x2, y2 = Nx.Split ("|",str) + local flags, conTime, name1, z1, x1, y1, name2, z2, x2, y2 = Nx.Split ("|",str) - local mapId1 = tonumber(z1) - local mapId2 = tonumber(z2) - conTime = tonumber(conTime) - flags = tonumber(flags) + local mapId1 = tonumber(z1) + local mapId2 = tonumber(z2) + conTime = tonumber(conTime) + flags = tonumber(flags) - if not (mapId1 and mapId2) then --- Nx.prt ("zone conn err %s to %s", z1 - 35, z2 - 35) - conTime = 0 - end + if not (mapId1 and mapId2) then + -- Nx.prt ("zone conn err %s to %s", z1 - 35, z2 - 35) + conTime = 0 + end - if conTime == 1 and (mapId == mapId1 or (mapId == mapId2 and bit.band (flags, 1) == 1)) then + if conTime == 1 and (mapId == mapId1 or (mapId == mapId2 and bit.band (flags, 1) == 1)) then - local cont1 = self:IdToContZone (mapId1) - local cont2 = self:IdToContZone (mapId2) + local cont1 = self:IdToContZone (mapId1) + local cont2 = self:IdToContZone (mapId2) - if cont1 == cont2 then + if cont1 == cont2 then - if mapId == mapId2 then -- Swap? - mapId1, mapId2 = mapId2, mapId1 - x1, y1, x2, y2 = x2, y2, x1, y1 - end + if mapId == mapId2 then -- Swap? + mapId1, mapId2 = mapId2, mapId1 + x1, y1, x2, y2 = x2, y2, x1, y1 + end - local zcons = cons[mapId2] or {} - cons[mapId2] = zcons + local zcons = cons[mapId2] or {} + cons[mapId2] = zcons - if x1 ~= 0 and y1 ~= 0 then -- Specific connection? Else connects anywhere + if x1 ~= 0 and y1 ~= 0 then -- Specific connection? Else connects anywhere - local con = {} - tinsert (zcons, con) + local con = {} + tinsert (zcons, con) - x1, y1 = self:GetWorldPos (mapId1, x1, y1) - x2, y2 = self:GetWorldPos (mapId2, x2, y2) + x1, y1 = self:GetWorldPos (mapId1, x1, y1) + x2, y2 = self:GetWorldPos (mapId2, x2, y2) - con.StartMapId = mapId1 - con.StartX = x1 - con.StartY = y1 - con.EndMapId = mapId2 - con.EndX = x2 - con.EndY = y2 - con.Dist = ((x1 - x2) ^ 2 + (y1 - y2) ^ 2) ^ .5 + con.StartMapId = mapId1 + con.StartX = x1 + con.StartY = y1 + con.EndMapId = mapId2 + con.EndX = x2 + con.EndY = y2 + con.Dist = ((x1 - x2) ^ 2 + (y1 - y2) ^ 2) ^ .5 + end end -- else