if TeleporterGetOption("showInWrongZone") is true. the AtZone function always return true:
local function AtZone(requiredZone)
return function()
if TeleporterGetOption("showInWrongZone") then
return true
end
local mapID = C_Map.GetBestMapForUnit("player")
while mapID ~= 0 do
if mapID == requiredZone then
return true
end
mapID = C_Map.GetMapInfo(mapID).parentMapID
end
return false
end
end
then the function() return AtZone(MapIDMaw)() and not AtZone(MapIDKorthia)()) end for Cypher of Relocation will be false. which is not expected when TeleporterGetOption("showInWrongZone") option is true.
in this special case, we can just add an additional TeleporterGetOption("showInWrongZone") or before the AtZone function called.
in the future, if there are more case like the "Maw with Korthia", you should abstract a comprehensive function to avoid this issue.
btw, whats IDE are you using, if it's vscode, try to open this in setting, to avoid white space:
if
TeleporterGetOption("showInWrongZone")
is true. theAtZone
function always return true:then the
function() return AtZone(MapIDMaw)() and not AtZone(MapIDKorthia)()) end
for Cypher of Relocation will be false. which is not expected whenTeleporterGetOption("showInWrongZone")
option is true.in this special case, we can just add an additional
TeleporterGetOption("showInWrongZone") or
before the AtZone function called.in the future, if there are more case like the "Maw with Korthia", you should abstract a comprehensive function to avoid this issue.
btw, whats IDE are you using, if it's vscode, try to open this in setting, to avoid white space: