/trunk
-- Function: Get continent name |
function EFM_Shared_GetContinentName(continentNum) |
local continentNames, key, val = { GetMapContinents() } ; |
local continentNames = { }; |
local continentsP6 = { GetMapContinents() }; |
local index = 0; |
for i = 2, #continentsP6, 2 do |
index = index + 1; |
continentNames[index] = continentsP6[i]; |
end |
return continentNames[continentNum]; |
end |
-- Function: Get zone name |
function EFM_Shared_GetZoneName(continentNum, zoneNum) |
local zoneNames = { GetMapZones(continentNum) } ; |
return zoneNames[zoneNum]; |
return GetMapNameByID(GetCurrentMapAreaID()) |
end |
end |
for myContinent in pairs(EFM_Data[EFM_Global_Faction]) do |
if (EFM_Data[EFM_Global_Faction][myContinent][zoneName] ~= nil) then |
if (EFM_Data[EFM_Global_Faction][myContinent][zoneName] ~= nil and myContinent == EFM_Shared_GetContinentName(GetCurrentMapContinent())) then |
for myNode in pairs(EFM_Data[EFM_Global_Faction][myContinent][zoneName]) do |
EFM_Shared_DebugMessage("Zone Node Added: "..EFM_Data[EFM_Global_Faction][myContinent][zoneName][myNode]["name"], myDebug); |
table.insert(nodeList, EFM_Data[EFM_Global_Faction][myContinent][zoneName][myNode]["name"]); |
## Interface: 50001 |
## Interface: 60200 |
## Title: Enhanced Flight Map |
## Author: Lysidia of Feathermoon |
## Version: 2.2.8 |
## Version: 2.2.9 |
## Notes: Adds enhancements to the flight system! |
## URL: http://lysaddons.game-host.org |
## Website: http://lysaddons.game-host.org |
continentMap = "Interface\\TaxiFrame\\TAXIMAP870"; |
elseif (newMap == 6) then |
continentMap = "Interface\\TaxiFrame\\TAXIMAP870"; |
elseif (newMap == 7) then |
continentMap = "Interface\\TaxiFrame\\TAXIMAP1116"; |
else |
continentMap = "Interface\\TaxiFrame\\TAXIMAP1"; |
newMap = 1; |
end |
-- New Window Button Colours |
for index = 1, 6 do |
for index = 1, 7 do |
local myButton = getglobal("EFM_MapWindowNew_Con"..index.."Text"); |
if (myButton) then |
if (index == newMap) then |
mapNum = GetCurrentMapContinent(); |
end |
if ((mapNum < 1) or (mapNum > 6)) then |
if ((mapNum < 1) or (mapNum > 7)) then |
mapNum = GetCurrentMapContinent(); |
end |
-- Function: Draw the "Offline" Map Window |
function EFM_MW_Setup() |
local continentNames = { GetMapContinents() } ; |
local continentNames = { }; |
local continentsP6 = { GetMapContinents() }; |
local index = 0; |
for i = 2, #continentsP6, 2 do |
index = index + 1; |
continentNames[index] = continentsP6[i]; |
end |
local EFM_MapWindowNew = CreateFrame("FRAME", "EFM_MapWindowNew", UIParent); |
EFM_MapWindowNew_Con6:ClearAllPoints(); |
EFM_MapWindowNew_Con6:SetPoint("TOPLEFT", EFM_MapWindowNew_Con4, "BOTTOMLEFT", 0, -2); |
EFM_MapWindowNew_Con6:SetScript("OnClick", function() EFM_MW_ChangeMap(6); end ); |
-- Draenor - Continent 7 |
local EFM_MapWindowNew_Con7 = CreateFrame("Button", "EFM_MapWindowNew_Con7", EFM_MapWindowNew, "UIPanelButtonTemplate"); |
EFM_MapWindowNew_Con7:SetWidth(138); |
EFM_MapWindowNew_Con7:SetHeight(22); |
EFM_MapWindowNew_Con7:SetText(continentNames[7]); |
EFM_MapWindowNew_Con7:RegisterForClicks("LeftButtonUp"); |
EFM_MapWindowNew_Con7:ClearAllPoints(); |
EFM_MapWindowNew_Con7:SetPoint("TOPLEFT", EFM_MapWindowNew_Con6, "BOTTOMLEFT", 0, -2); |
EFM_MapWindowNew_Con7:SetScript("OnClick", function() EFM_MW_ChangeMap(7); end ); |
end |
--[[ |
--[[ |
Timer routines for flight timers. |
-- Function: Check the in flight status |
function EFM_Timer_CheckInFlightStatus() |
if (UnitOnTaxi("player") == 1) then |
if (UnitOnTaxi("player")) then |
if (EFM_Timer_StartRecording == true) then |
EFM_Timer_StartRecording = false; |
EFM_Timer_Recording = true; |
]] |
-- Global define |
EFM_Version = "2.2.8"; |
EFM_Version = "2.2.9"; |
-- Define some stuff here to handle global stuff... |
EFM_Global_Faction = UnitFactionGroup("player"); |
2014-11-19 Version 2.2.9 |
------------------------- |
- Updated to work with Warlords of Draenor (6.0.2) |
2012-10-23 Version 2.2.8 |
------------------------- |
- Make new offline map window closable with the escape key (Google Code Issue# 19). |
-- Function: Commands to run when we get the TAXIMAP_OPEN event |
function EFM_FM_TaxiMapOpenEvent() |
local nodeStyle = 0; |
if (IsSwimming() == 1) then |
if (IsSwimming()) then |
nodeStyle = 1; |
end |
local missingHop = false; |
local nodeStyle = 0; |
if (IsSwimming() == 1) then |
if (IsSwimming()) then |
nodeStyle = 1; |
end |