Quantcast WoWInterface: SVN - AlphaMapFansUpdate - Path Comparison - /branches Rev 11 and /branches Rev 12

WoWInterface SVN AlphaMapFansUpdate

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches
    from Rev 11 to Rev 12
    Reverse comparison

Rev 11 → Rev 12

AlphaMapBeta/AlphaMap_POI_MailBoxes/AlphaMap_POI_MailBoxes.lua
25,9 → 25,9
for _, poi in ipairs(AM_MAILBOX_LOCS[m]) do
if ( ( not poi.floor ) or ( poi.floor == lFloor ) ) then
i = i + 1;
note = getglobal("AM_POI_Note_"..i);
note = getglobal("AM_POIM_Note_"..i);
if ( not note ) then
note = CreateFrame("Button", "AM_POI_Note_"..i, frame, "AM_GenPOI_Template");
note = CreateFrame("Button", "AM_POIM_Note_"..i, frame, "AM_GenPOI_Template");
note:SetScript("OnEnter", function(self)
local x, y = GetCursorPosition();
if ( x > 500 ) then
52,13 → 52,13
end)
note:SetScript("OnClick", function(self, mouseButton)
if ( mouseButton == "LeftButton" ) then
local map = AML.AlphaMap_GetMap(self.toMap);
local map = AMap.AlphaMap_GetMap(self.toMap);
 
if ( map ) then
AlphaMapFrame_Update( map );
 
elseif ( self.toWorldMap ) then
local cont, zone = AML.AlphaMap_GetWorldMap(self.toWorldMap);
local cont, zone = AMap.AlphaMap_GetWorldMap(self.toWorldMap);
if ( cont ~= "error" ) then
SetMapZoom(cont, zone); -- ))((
AM_WorldMapSelected = true;
72,7 → 72,7
end
end)
end
noteT = getglobal("AM_POI_Note_"..i.."Texture");
noteT = getglobal("AM_POIM_Note_"..i.."Texture");
noteT:SetTexture( poi.icon );
 
x = ( poi.x * width ) / amUnitScale;
92,11 → 92,11
end
 
i = i + 1;
note = getglobal("AM_POI_Note_"..i);
note = getglobal("AM_POIM_Note_"..i);
while (note) do
note:Hide();
i = i + 1;
note = getglobal("AM_POI_Note_"..i);
note = getglobal("AM_POIM_Note_"..i);
end
 
end
129,11 → 129,11
 
-- Insert MailBox Display function code in to the main AlphaMap POI Plugin array
-- AlphaMap will loop through these functions to display the required POIs
table.insert(AML.CustomPOIs, DisplayMailBoxLocs);
table.insert(AMap.CustomPOIs, DisplayMailBoxLocs);
 
-- Set up the Control Check Button allowing people to toggle
-- display of MailBox Locations off and on from the AlphaMap
local i = #(AML.CustomPOIControls) + 1;
local i = #(AMap.CustomPOIControls) + 1;
local controlButton = CreateFrame("Button", "AM_POIC"..i, UIParent, "AM_GenPOIControl_Template");
controlButton.id = i;
local controlButtonT = getglobal("AM_POIC"..i.."Texture");
174,7 → 174,7
 
-- Insert the Created control button in to the main AlphaMap array
-- for display when the Control & Alt keys are pressed together
table.insert(AML.CustomPOIControls, controlButton);
table.insert(AMap.CustomPOIControls, controlButton);
 
end
 
AlphaMapBeta/AlphaMap_POI_Instances/AlphaMap_POI_Instances.lua
25,9 → 25,9
for _, poi in ipairs(AM_INSTANCE_LOCS[m]) do
if ( ( not poi.floor ) or ( poi.floor == lFloor ) ) then
i = i + 1;
note = getglobal("AM_POI_Note_"..i);
note = getglobal("AM_POII_Note_"..i);
if ( not note ) then
note = CreateFrame("Button", "AM_POI_Note_"..i, frame, "AM_GenPOI_Template");
note = CreateFrame("Button", "AM_POII_Note_"..i, frame, "AM_GenPOI_Template");
note:SetScript("OnEnter", function(self)
local x, y = GetCursorPosition();
if ( x > 500 ) then
52,13 → 52,13
end)
note:SetScript("OnClick", function(self, mouseButton)
if ( mouseButton == "LeftButton" ) then
local map = AML.AlphaMap_GetMap(self.toMap);
local map = AMap.AlphaMap_GetMap(self.toMap);
 
if ( map ) then
AlphaMapFrame_Update( map );
 
elseif ( self.toWorldMap ) then
local cont, zone = AML.AlphaMap_GetWorldMap(self.toWorldMap);
local cont, zone = AMap.AlphaMap_GetWorldMap(self.toWorldMap);
if ( cont ~= "error" ) then
SetMapZoom(cont, zone); -- ))((
AM_WorldMapSelected = true;
72,7 → 72,7
end
end)
end
noteT = getglobal("AM_POI_Note_"..i.."Texture");
noteT = getglobal("AM_POII_Note_"..i.."Texture");
noteT:SetTexture( poi.icon );
 
x = ( poi.x * width ) / amUnitScale;
92,11 → 92,11
end
 
i = i + 1;
note = getglobal("AM_POI_Note_"..i);
note = getglobal("AM_POII_Note_"..i);
while (note) do
note:Hide();
i = i + 1;
note = getglobal("AM_POI_Note_"..i);
note = getglobal("AM_POII_Note_"..i);
end
 
end
129,11 → 129,11
 
-- Insert Instance Display function code in to the main AlphaMap POI Plugin array
-- AlphaMap will loop through these functions to display the required POIs
table.insert(AML.CustomPOIs, DisplayInstanceLocs);
table.insert(AMap.CustomPOIs, DisplayInstanceLocs);
 
-- Set up the Control Check Button allowing people to toggle
-- display of Instance Locations off and on from the AlphaMap
local i = #(AML.CustomPOIControls) + 1;
local i = #(AMap.CustomPOIControls) + 1;
local controlButton = CreateFrame("Button", "AM_POIC"..i, UIParent, "AM_GenPOIControl_Template");
controlButton.id = i;
local controlButtonT = getglobal("AM_POIC"..i.."Texture");
174,7 → 174,7
 
-- Insert the Created control button in to the main AlphaMap array
-- for display when the Control & Alt keys are pressed together
table.insert(AML.CustomPOIControls, controlButton);
table.insert(AMap.CustomPOIControls, controlButton);
 
end
 
AlphaMapBeta/AlphaMap/AlphaMap.lua
60,7 → 60,10
AM_Raid_Progress_Types = {};
AM_BG_Types = {};
 
local AMap = {};
AMap = {};
AMap.CustomPOIs = {};
AMap.CustomPOIControls = {};
 
local AM_UPDATE_INTERVAL_SMAX = 0.66;
local AM_UPDATE_INTERVAL_PMAX = 0.08;
local AM_Update_Timer_S = 0;
236,11 → 239,8
------------------------
local AML = {};
 
AML.CustomPOIs = {};
AML.CustomPOIControls = {};
 
function AML.ProcessCustomPOIs(c, z, m, frame)
for _, func in ipairs(AML.CustomPOIs) do
for _, func in ipairs(AMap.CustomPOIs) do
func(c, z, m, frame);
end
end
277,43 → 277,6
return nil;
end
 
function AML.AlphaMap_GetMap(mapData, pX, pY)
if ( ( mapData ) and ( type(mapData) == "string" ) ) then
for i=1, getn(AM_ALPHAMAP_LIST), 1 do
if ( ( AM_ALPHAMAP_LIST[i].area ) and ( AM_ALPHAMAP_LIST[i].area == mapData ) and ( pX ) and ( pY ) ) then
if ( ( pX > AM_ALPHAMAP_LIST[i].wmData.minX ) and
( pX < AM_ALPHAMAP_LIST[i].wmData.maxX ) and
( pY > AM_ALPHAMAP_LIST[i].wmData.minY ) and
( pY < AM_ALPHAMAP_LIST[i].wmData.maxY ) ) then
return AM_ALPHAMAP_LIST[i], i, AM_ALPHAMAP_LIST[i].filename;
end
 
elseif ( AM_ALPHAMAP_LIST[i].filename == mapData ) then
if ( AM_ValidMaps[mapData] ) then
return AM_ALPHAMAP_LIST[i], i, mapData;
end
 
elseif ( AM_ALPHAMAP_LIST[i].name == mapData ) then
local map = AM_ALPHAMAP_LIST[i].filename;
if ( AM_ValidMaps[map] ) then
return AM_ALPHAMAP_LIST[i], i, map;
end
 
end
end
 
elseif ( ( mapData ) and ( type(mapData) == "number" ) ) then
if ( AM_ALPHAMAP_LIST[mapData] ) then
local map = AM_ALPHAMAP_LIST[mapData].filename;
if ( AM_ValidMaps[map] ) then
return AM_ALPHAMAP_LIST[mapData].Display, AM_ALPHAMAP_LIST[mapData].type;
end
end
end
 
return nil;
end
 
function AML.AlphaMap_Print(msg, r, g, b, frame, id)
if ( Print ) then
Print(msg, r, g, b, frame, id);
1261,8 → 1224,51
return numOverlays;
end
 
 
 
 
 
-- Made global
 
function AMap.AlphaMap_GetMap(mapData, pX, pY)
if ( ( mapData ) and ( type(mapData) == "string" ) ) then
for i=1, getn(AM_ALPHAMAP_LIST), 1 do
if ( ( AM_ALPHAMAP_LIST[i].area ) and ( AM_ALPHAMAP_LIST[i].area == mapData ) and ( pX ) and ( pY ) ) then
if ( ( pX > AM_ALPHAMAP_LIST[i].wmData.minX ) and
( pX < AM_ALPHAMAP_LIST[i].wmData.maxX ) and
( pY > AM_ALPHAMAP_LIST[i].wmData.minY ) and
( pY < AM_ALPHAMAP_LIST[i].wmData.maxY ) ) then
return AM_ALPHAMAP_LIST[i], i, AM_ALPHAMAP_LIST[i].filename;
end
 
elseif ( AM_ALPHAMAP_LIST[i].filename == mapData ) then
if ( AM_ValidMaps[mapData] ) then
return AM_ALPHAMAP_LIST[i], i, mapData;
end
 
elseif ( AM_ALPHAMAP_LIST[i].name == mapData ) then
local map = AM_ALPHAMAP_LIST[i].filename;
if ( AM_ValidMaps[map] ) then
return AM_ALPHAMAP_LIST[i], i, map;
end
 
end
end
 
elseif ( ( mapData ) and ( type(mapData) == "number" ) ) then
if ( AM_ALPHAMAP_LIST[mapData] ) then
local map = AM_ALPHAMAP_LIST[mapData].filename;
if ( AM_ValidMaps[map] ) then
return AM_ALPHAMAP_LIST[mapData].Display, AM_ALPHAMAP_LIST[mapData].type;
end
end
end
 
return nil;
end
 
-- )(
function AML.AlphaMap_GetWorldMap(map)
function AMap.AlphaMap_GetWorldMap(map)
if ( mapMapper[map] ) then
return mapMapper[map].c, mapMapper[map].z;
end
1485,6 → 1491,7
end
 
elseif( event == "VARIABLES_LOADED") then
 
if ( ( MetaMap_OptionsButton ) or ( Cartographer ) ) then
applyAMMapChanges = nil;
AM_OptionsGM_Change:Disable();
2171,17 → 2178,17
else
if ( playerX > 0 ) then
local zoneNameExt = zoneName..AM_EXTERIOR;
amAlphaMapMap = AML.AlphaMap_GetMap(zoneNameExt);
amAlphaMapMap = AMap.AlphaMap_GetMap(zoneNameExt);
 
if ( not amAlphaMapMap ) then
amAlphaMapMap = AML.AlphaMap_GetMap(mapFileName, playerX, playerY);
amAlphaMapMap = AMap.AlphaMap_GetMap(mapFileName, playerX, playerY);
end
else
-- trigger a second test for 1 second later... ?
end
 
if ( not amAlphaMapMap ) then
amAlphaMapMap = AML.AlphaMap_GetMap(zoneName);
amAlphaMapMap = AMap.AlphaMap_GetMap(zoneName);
end
 
if ( ( amAlphaMapMap ) and ( mapFileName ) ) then
4184,10 → 4191,10
 
function DrawAlphaMapGatherer()
 
if ( AMap.drawingG ) then
if ( AML.drawingG ) then
return;
else
AMap.drawingG = true;
AML.drawingG = true;
end
 
local setting = Gatherer.Config.GetSetting;
4254,7 → 4261,7
mainNote = getglobal("AlphaMapGathererPOI"..noteCount);
end
 
AMap.drawingG = nil;
AML.drawingG = nil;
end
 
function AlphaMapNotes_OnEnter( id, noteFrame )
4765,7 → 4772,7
 
elseif ( ( GetMapInfo() ) and ( GetCurrentMapContinent() == -1 ) ) then
local mapFileName = GetMapInfo();
local amMap = AML.AlphaMap_GetMap(mapFileName);
local amMap = AMap.AlphaMap_GetMap(mapFileName);
if ( amMap ) then
AML.AM_CopySettings(AlphaMapConfigurations[ AML.AM_Strip(amMap.filename) ], AlphaMapConfig);
local settingLabel = amMap.displayname;
4820,7 → 4827,7
local amMap = nil;
local mapFileName = GetMapInfo();
if ( mapFileName ) then
amMap = AML.AlphaMap_GetMap(mapFileName);
amMap = AMap.AlphaMap_GetMap(mapFileName);
end
AlphaMapFrame_Update(amMap);
amMapNeedsRefresh = nil;
5968,7 → 5975,7
return;
end
if ( ( not AlphaMapFrame:IsVisible() ) and ( MiniMapBattlefieldFrame.status == "active" ) ) then
local am = AML.AlphaMap_GetMap(lastEnteredZone);
local am = AMap.AlphaMap_GetMap(lastEnteredZone);
if ( ( am ) and ( AM_BG_Types[am.type] ) ) then
local settings = AlphaMapConfigurations[ AML.AM_Strip(am.filename) ];
if ( settings.autoOpen ) then -- previously .amInBG
6231,14 → 6238,14
 
if ( mBttn == "LeftButton" ) then
local bttnName = parent:GetName();
local iMap = AML.AlphaMap_GetMap(parent.toMap);
local iMap = AMap.AlphaMap_GetMap(parent.toMap);
if ( iMap ) then
getglobal(bttnName.."Highlight"):Hide();
AlphaMapFrame_Update( iMap );
 
elseif ( parent.toWorldMap ) then
getglobal(bttnName.."Highlight"):Hide();
local cont, zone = AML.AlphaMap_GetWorldMap(parent.toWorldMap);
local cont, zone = AMap.AlphaMap_GetWorldMap(parent.toWorldMap);
if ( cont ~= "error" ) then
SetMapZoom(cont, zone); -- ))((
AM_WorldMapSelected = true;
6397,7 → 6404,7
local parent = note:GetParent();
local keyID = parent.control:GetID();
if ( mBttn == "LeftButton" ) then
local iMap = AML.AlphaMap_GetMap(parent.toMap);
local iMap = AMap.AlphaMap_GetMap(parent.toMap);
if ( iMap ) then
for n=1, amNotesPerPage, 1 do
getglobal("AlphaMapAlphaMapButtonDtl"..n.."Highlight"):Hide();
6408,7 → 6415,7
for n=1, amNotesPerPage, 1 do
getglobal("AlphaMapAlphaMapButtonDtl"..n.."Highlight"):Hide();
end
local cont, zone = AML.AlphaMap_GetWorldMap(parent.toWorldMap);
local cont, zone = AMap.AlphaMap_GetWorldMap(parent.toWorldMap);
if ( cont ~= "error" ) then
SetMapZoom(cont, zone); -- ))((
AM_WorldMapSelected = true;
6762,7 → 6769,7
amAlphaMapMap = nil;
else
local mType = sortedMapListType;
local map = AML.AlphaMap_GetMap( sortedMapList[selected].name );
local map = AMap.AlphaMap_GetMap( sortedMapList[selected].name );
amMapType = mType;
amAlphaMapMap = map;
if ( not AlphaMapFrame:IsVisible() ) then
7460,7 → 7467,7
 
elseif ( ( GetMapInfo() ) and ( GetCurrentMapContinent() == -1 ) ) then
local mapFileName = GetMapInfo();
local amMap = AML.AlphaMap_GetMap(mapFileName);
local amMap = AMap.AlphaMap_GetMap(mapFileName);
if ( amMap ) then
-- v3.00 Needs type re-writing x
if ( AlphaMapConfig[amMap.type] ) then
7663,7 → 7670,7
CloseDropDownMenus();
if ( AlphaMapAlphaMapFrame:IsVisible() ) then
if ( ( amAlphaMapMap ) and ( not AM_Minimap_Data[amAlphaMapMap.filename] ) and ( MouseIsOver(AlphaMapAlphaMapFrame) ) ) then
local iMap = AML.AlphaMap_GetMap(amAlphaMapMap.toMap);
local iMap = AMap.AlphaMap_GetMap(amAlphaMapMap.toMap);
 
if ( ( mouseButton == "LeftButton" ) and ( not amAlphaMapMap.zoomed ) ) then
local x, y = GetCursorPosition();
7684,7 → 7691,7
AlphaMapFrame_Update( iMap );
 
elseif ( amAlphaMapMap.toWorldMap ) then
local cont, zone = AML.AlphaMap_GetWorldMap(amAlphaMapMap.toWorldMap);
local cont, zone = AMap.AlphaMap_GetWorldMap(amAlphaMapMap.toWorldMap);
if ( cont ~= "error" ) then
SetMapZoom(cont, zone); -- ))((
AM_WorldMapSelected = true;
7962,9 → 7969,9
if ( ( IsControlKeyDown() ) and ( IsAltKeyDown() ) and ( not AlphaMapAlphaMapFrame:IsVisible() )
and ( not AML.controlsVisible ) ) then
 
local b, controls = 1, #(AML.CustomPOIControls);
local b, controls = 1, #(AMap.CustomPOIControls);
local xO = ( controls - 1 ) * 22;
local control, prevC = AML.CustomPOIControls[b];
local control, prevC = AMap.CustomPOIControls[b];
 
if ( control ) then
control:ClearAllPoints();
7972,21 → 7979,21
control:Show();
prevC = control;
b = b + 1;
control = AML.CustomPOIControls[b];
control = AMap.CustomPOIControls[b];
while ( control ) do
control:ClearAllPoints();
control:SetPoint("LEFT", prevC:GetName(), "RIGHT", 1, 0);
control:Show();
prevC = control;
b = b + 1;
control = AML.CustomPOIControls[b];
control = AMap.CustomPOIControls[b];
end
end
AML.controlsVisible = true;
 
elseif ( ( ( not IsControlKeyDown() ) or ( not IsAltKeyDown() ) or ( AlphaMapAlphaMapFrame:IsVisible() ) )
and ( AML.controlsVisible ) ) then
for _, control in ipairs(AML.CustomPOIControls) do
for _, control in ipairs(AMap.CustomPOIControls) do
control:Hide();
end
AML.controlsVisible = false;
8592,11 → 8599,11
end
 
if ( ( targ ) and ( targ ~= "" ) and ( not UnitPlayerControlled("target") ) and ( inInstance ) ) then
local mapData, _, filename = AML.AlphaMap_GetMap( GetRealZoneText() );
local mapData, _, filename = AMap.AlphaMap_GetMap( GetRealZoneText() );
if ( mapData ) then
if ( AM_LINKED_DUNGEONS[filename] ) then
for dungeon in pairs( AM_LINKED_DUNGEONS[filename] ) do
mapData = AML.AlphaMap_GetMap(dungeon);
mapData = AMap.AlphaMap_GetMap(dungeon);
if ( mapData ) then
done = AM_HighlightBoss_Dungeon(mapData, targ, dType);
if ( done ) then
8641,11 → 8648,11
local done = nil;
 
if ( inInstance ) then
local mapData, _, filename = AML.AlphaMap_GetMap( GetRealZoneText() );
local mapData, _, filename = AMap.AlphaMap_GetMap( GetRealZoneText() );
if ( mapData ) then
if ( AM_LINKED_DUNGEONS[filename] ) then
for dungeon in pairs( AM_LINKED_DUNGEONS[filename] ) do
mapData = AML.AlphaMap_GetMap(dungeon);
mapData = AMap.AlphaMap_GetMap(dungeon);
if ( mapData ) then
done = AM_CheckBoss_Dungeon(msg, dType, mapData);
if ( done ) then
8790,7 → 8797,7
local amMap = amAlphaMapMap;
local amTyp = amMapType;
local mapFileName = GetMapInfo();
local tmpAmMap = AML.AlphaMap_GetMap(mapFileName);
local tmpAmMap = AMap.AlphaMap_GetMap(mapFileName);
 
if ( not updatingPaused ) then
updatingPaused = true;