--[[
Taken liberally from QuestHelper/AstrolabeQH/Astrolabe.lua which is:
Copyright (C) 2006-2008 James Carrothers
License:
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Note:
This library's source code is specifically designed to work with
World of Warcraft's interpreted AddOn system. You have an implicit
licence to use this library with these facilities since that is its
designated purpose as per:
http://www.fsf.org/licensing/licenses/gpl-faq.html#InterpreterIncompat
]]
local GetMapInfo, GetCurrentMapDungeonLevel = GetMapInfo, GetCurrentMapDungeonLevel
local VirtualContinentIndexes = {
["ScarletEnclave"] = 2125,
["UtgardeKeep1"] = 100,
["UtgardeKeep2"] = 100,
["UtgardeKeep3"] = 100,
["TheNexus"] = 734.2,
["AzjolNerub1"] = 100,
["AzjolNerub2"] = 100,
["AzjolNerub3"] = 100,
["Ahnkahet"] = 648.3,
["DrakTharonKeep1"] = 100,
["DrakTharonKeep2"] = 100,
["VioletHold"] = 170.83,
["Gundrak"] = 603.35,
["Ulduar77"] = 613.5, -- Halls of Stone
["HallsofLightning1"] = 100,
["HallsofLightning2"] = 100,
["Nexus801"] = 100, -- Oculus
["Nexus802"] = 100,
["Nexus803"] = 100,
["Nexus804"] = 100,
["CoTStratholme1"] = 750.2,
["CoTStratholme2"] = 1216.66,
["UtgardePinnacle1"] = 100, -- hey they spelled it right
["UtgardePinnacle2"] = 100,
["VaultofArchavon"] = 603.25, -- Weirdly, Emalon is actually within the "Vault of Archavon"
["Naxxramas1"] = 1237.5, -- construct quarter
["Naxxramas2"] = 1237.5, -- arachnid quarter
["Naxxramas3"] = 1237.5, -- military quarter
["Naxxramas4"] = 1237.5, -- plague quarter
["Naxxramas5"] = 1379.9, -- overview
["Naxxramas6"] = 437.3, -- lair
["TheObsidianSanctum"] = 775.1,
["TheEyeOfEternity"] = 286.7,
["Ulduar"] = 2191.7,
["Ulduar1"] = 446.5,
["Ulduar2"] = 885.6,
["Ulduar3"] = 100,
["Ulduar4"] = 100,
}
function FriendlyArrowGetInstanceMapWidth ()
local MapName = GetMapInfo()
local MapLevel = GetCurrentMapDungeonLevel()
local Width
if VirtualContinentIndexes[MapName] and MapLevel == 0 then
Width = VirtualContinentIndexes[MapName]
elseif MapName and VirtualContinentIndexes[MapName .. MapLevel] then
Width = VirtualContinentIndexes[MapName .. MapLevel]
elseif MapName == "CoTStratholme" and MapLevel == 0 then
Width = VirtualContinentIndexes["CoTStratholme2"]
end
return Width or 100
end