Skip to content

Commit

Permalink
Merge pull request #273 from artscout/master
Browse files Browse the repository at this point in the history
Add WorldMapHotSpots for Ringing Deeps and Hallowhall
  • Loading branch information
IrcDirk authored Sep 14, 2024
2 parents 1e03bf5 + d6159a4 commit 2ca3042
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 45 deletions.
9 changes: 6 additions & 3 deletions Data/MapWorldHotspots.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Nx.MapWorldHotspots = {
Nx.MapWorldHotspots = {
}

Nx.MapWorldHotspots2 = {
Expand Down Expand Up @@ -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
8 changes: 6 additions & 2 deletions Data/ZoneConnections.lua
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
}

79 changes: 39 additions & 40 deletions NxMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ca3042

Please sign in to comment.