Advertisement
Guest User

EFM 6.x patch

a guest
Nov 20th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.68 KB | None | 0 0
  1. diff -ruN EnhancedFlightMap/FlightMaster.lua EnhancedFlightMap-6.x/FlightMaster.lua
  2. --- EnhancedFlightMap/FlightMaster.lua  2014-11-20 20:59:13.000000000 -0500
  3. +++ EnhancedFlightMap-6.x/FlightMaster.lua  2014-11-20 21:00:29.000000000 -0500
  4. @@ -22,7 +22,7 @@
  5.     local deadNodes     = {};
  6.  
  7.     local nodeStyle     = 0;
  8. -   if (IsSwimming() == 1) then
  9. +   if (IsSwimming()) then
  10.         nodeStyle   = 1;
  11.         EFM_Shared_DebugMessage("Player is Swimming.", Lys_Debug);
  12.     end
  13. @@ -76,7 +76,7 @@
  14.  -- Function: Commands to run when we get the TAXIMAP_OPEN event
  15.  function EFM_FM_TaxiMapOpenEvent()
  16.     local nodeStyle = 0;
  17. -   if (IsSwimming() == 1) then
  18. +   if (IsSwimming()) then
  19.         nodeStyle   = 1;
  20.     end
  21.  
  22. @@ -141,7 +141,7 @@
  23.     local missingHop    = false;
  24.     local nodeStyle     = 0;
  25.    
  26. -   if (IsSwimming() == 1) then
  27. +   if (IsSwimming()) then
  28.         nodeStyle   = 1;
  29.     end
  30.  
  31. diff -ruN EnhancedFlightMap/MapWindow.lua EnhancedFlightMap-6.x/MapWindow.lua
  32. --- EnhancedFlightMap/MapWindow.lua 2014-11-20 20:59:13.000000000 -0500
  33. +++ EnhancedFlightMap-6.x/MapWindow.lua 2014-11-20 21:16:35.000000000 -0500
  34. @@ -160,13 +160,15 @@
  35.         continentMap    = "Interface\\TaxiFrame\\TAXIMAP870";
  36.     elseif (newMap == 6) then
  37.         continentMap    = "Interface\\TaxiFrame\\TAXIMAP870";
  38. +   elseif (newMap == 7) then
  39. +       continentMap    = "Interface\\TaxiFrame\\TAXIMAP1116";
  40.     else
  41.         continentMap    = "Interface\\TaxiFrame\\TAXIMAP1";
  42.         newMap      = 1;
  43.     end
  44.  
  45.     -- New Window Button Colours
  46. -   for index = 1, 6 do
  47. +   for index = 1, 7 do
  48.         local myButton = getglobal("EFM_MapWindowNew_Con"..index.."Text");
  49.         if (myButton) then
  50.             if (index == newMap) then
  51. @@ -196,7 +198,7 @@
  52.         mapNum = GetCurrentMapContinent();
  53.     end
  54.  
  55. -   if ((mapNum < 1) or (mapNum > 6)) then
  56. +   if ((mapNum < 1) or (mapNum > 7)) then
  57.         mapNum = GetCurrentMapContinent();
  58.     end
  59.  
  60. @@ -216,7 +218,13 @@
  61.  
  62.  -- Function: Draw the "Offline" Map Window
  63.  function EFM_MW_Setup()
  64. -   local continentNames = { GetMapContinents() } ;
  65. +   local continentNames = { };
  66. +   local continentsP6 = { GetMapContinents() };
  67. +   local index = 0;
  68. +   for i = 2, #continentsP6, 2 do
  69. +       index = index + 1;
  70. +       newInstance.ContinentList[index] = continentsP6[i];
  71. +   end
  72.  
  73.     local EFM_MapWindowNew = CreateFrame("FRAME", "EFM_MapWindowNew", UIParent);
  74.  
  75. @@ -343,7 +351,8 @@
  76.     EFM_MapWindowNew_Con5:SetPoint("TOPLEFT", EFM_MapWindowNew_Con4, "BOTTOMLEFT", 0, -2);
  77.     EFM_MapWindowNew_Con5:SetScript("OnClick", function() EFM_MW_ChangeMap(5); end );
  78.     -- DO NOT REMOVE THIS CODEBLOCK! --
  79. -]]
  80. +]]
  81. +
  82.     -- Pandaria - Continent 6
  83.     local EFM_MapWindowNew_Con6 = CreateFrame("Button", "EFM_MapWindowNew_Con6", EFM_MapWindowNew, "UIPanelButtonTemplate");
  84.     EFM_MapWindowNew_Con6:SetWidth(138);
  85. @@ -353,4 +362,15 @@
  86.     EFM_MapWindowNew_Con6:ClearAllPoints();
  87.     EFM_MapWindowNew_Con6:SetPoint("TOPLEFT", EFM_MapWindowNew_Con4, "BOTTOMLEFT", 0, -2);
  88.     EFM_MapWindowNew_Con6:SetScript("OnClick", function() EFM_MW_ChangeMap(6); end );
  89. +
  90. +   -- Draenor - Continent 7
  91. +   local EFM_MapWindowNew_Con7 = CreateFrame("Button", "EFM_MapWindowNew_Con7", EFM_MapWindowNew, "UIPanelButtonTemplate");
  92. +   EFM_MapWindowNew_Con7:SetWidth(138);
  93. +   EFM_MapWindowNew_Con7:SetHeight(22);
  94. +   EFM_MapWindowNew_Con7:SetText(continentNames[7]);
  95. +   EFM_MapWindowNew_Con7:RegisterForClicks("LeftButtonUp");
  96. +   EFM_MapWindowNew_Con7:ClearAllPoints();
  97. +   EFM_MapWindowNew_Con7:SetPoint("TOPLEFT", EFM_MapWindowNew_Con6, "BOTTOMLEFT", 0, -2);
  98. +   EFM_MapWindowNew_Con7:SetScript("OnClick", function() EFM_MW_ChangeMap(7); end );
  99. +
  100.  end
  101. diff -ruN EnhancedFlightMap/Timer.lua EnhancedFlightMap-6.x/Timer.lua
  102. --- EnhancedFlightMap/Timer.lua 2014-11-20 20:59:13.000000000 -0500
  103. +++ EnhancedFlightMap-6.x/Timer.lua 2014-11-20 21:19:35.000000000 -0500
  104. @@ -39,7 +39,7 @@
  105.  
  106.  -- Function: Check the in flight status
  107.  function EFM_Timer_CheckInFlightStatus()
  108. -   if (UnitOnTaxi("player") == 1) then
  109. +   if (UnitOnTaxi("player")) then
  110.         if (EFM_Timer_StartRecording == true) then
  111.             EFM_Timer_StartRecording    = false;
  112.             EFM_Timer_Recording         = true;
  113. diff -ruN EnhancedFlightMap/nodeinfo.lua EnhancedFlightMap-6.x/nodeinfo.lua
  114. --- EnhancedFlightMap/nodeinfo.lua  2014-11-20 20:59:13.000000000 -0500
  115. +++ EnhancedFlightMap-6.x/nodeinfo.lua  2014-11-20 21:19:00.000000000 -0500
  116. @@ -268,7 +268,7 @@
  117.     end
  118.    
  119.     for myContinent in pairs(EFM_Data[EFM_Global_Faction]) do
  120. -       if (EFM_Data[EFM_Global_Faction][myContinent][zoneName] ~= nil) then
  121. +       if (EFM_Data[EFM_Global_Faction][myContinent][zoneName] ~= nil and myContinent == EFM_Shared_GetContinentName(GetCurrentMapContinent())) then
  122.             for myNode in pairs(EFM_Data[EFM_Global_Faction][myContinent][zoneName]) do
  123.                 EFM_Shared_DebugMessage("Zone Node Added: "..EFM_Data[EFM_Global_Faction][myContinent][zoneName][myNode]["name"], myDebug);
  124.                 table.insert(nodeList, EFM_Data[EFM_Global_Faction][myContinent][zoneName][myNode]["name"]);
  125. diff -ruN EnhancedFlightMap/shared_functions.lua EnhancedFlightMap-6.x/shared_functions.lua
  126. --- EnhancedFlightMap/shared_functions.lua  2014-11-20 20:59:13.000000000 -0500
  127. +++ EnhancedFlightMap-6.x/shared_functions.lua  2014-11-20 21:22:20.000000000 -0500
  128. @@ -98,14 +98,18 @@
  129.  
  130.  -- Function: Get continent name
  131.  function EFM_Shared_GetContinentName(continentNum)
  132. -   local continentNames, key, val = { GetMapContinents() } ;
  133. +   local continentNames = { };
  134. +   local continentsP6 = { GetMapContinents() };
  135. +   local index = 0;
  136. +   for i = 2, #continentsP6, 2 do
  137. +       index = index + 1;
  138. +       continentNames[index] = continentsP6[i];
  139. +   end
  140.  
  141.     return continentNames[continentNum];
  142.  end
  143.  
  144.  -- Function: Get zone name
  145.  function EFM_Shared_GetZoneName(continentNum, zoneNum)
  146. -   local zoneNames = { GetMapZones(continentNum) } ;
  147. -
  148. -   return zoneNames[zoneNum];
  149. +   return GetMapNameByID(GetCurrentMapAreaID())
  150.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement