WoWInterface SVN TitanPanelRecommendedZone

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 79 to Rev 80
    Reverse comparison

Rev 79 → Rev 80

trunk/TitanRecZone/TitanRecZone.xml
18,7 → 18,7
</Frames>
</Frame>
<!-- Map Text -->
<Frame name="TRZ_WorldMap_Frame" parent="WorldMapFrame">
<Frame name="TRZ_WorldMap_Frame" parent="WorldMapFrameAreaFrame">
<Scripts>
<OnUpdate>
TRZ_WorldMapButton_OnUpdate(arg1);
26,7 → 26,7
</Scripts>
<Layers>
<Layer level="OVERLAY">
<FontString name="TRZ_WorldMap_Text" inherits="GameFontNormal" outline="THICK" virtual="true">
<FontString name="TRZ_WorldMap_Text" inherits="GameFontNormalLargeOutline" outline="THICK" virtual="true">
<Anchors>
<Anchor point="TOP" relativeTo="WorldMapFrameAreaLabel" relativePoint="BOTTOM">
<Offset>
trunk/TitanRecZone/TitanRecZone.lua
25,6 → 25,12
trz_current_continent = "";
trz_current_zone = "";
 
-- Removes unique identifiers from new zones that have the same name as older zones.
local function TRZ_ZoneNameClean(zone)
local continent = " %(" .. LT:GetContinent(zone) .. "%)"
return gsub(zone, continent, "")
end
 
local function TRZ_RGBPercToHex(r, g, b)
r = r <= 1 and r >= 0 and r or 0
g = g <= 1 and g >= 0 and g or 0
192,9 → 198,9
local complex = LT:GetComplex(zone);
if (iType ~= "Instance") then
if ( complex == nil ) then
return instanceColor .. zone .. " " .. iType;
return instanceColor .. TRZ_ZoneNameClean(zone) .. " " .. iType;
else
return instanceColor .. complex .. ":" .. zone .. " " .. iType;
return instanceColor .. complex .. ":" .. TRZ_ZoneNameClean(zone) .. " " .. iType;
end
end
if (groupSize > 5) then
203,9 → 209,9
rType=" RAID" .. groupSize .. "/" .. altGroupSize;
end
if ( complex == nil ) then
return instanceColor .. zone .. rType;
return instanceColor .. TRZ_ZoneNameClean(zone) .. rType;
else
return instanceColor .. complex .. ":" .. zone .. rType;
return instanceColor .. complex .. ":" .. TRZ_ZoneNameClean(zone) .. rType;
end
 
end
217,17 → 223,17
end
if (complex == nil) then
if (low == high) then
return format(TRZ_INSTANCE_TEXT2, instanceColor, zone, iType, low );
return format(TRZ_INSTANCE_TEXT2, instanceColor, TRZ_ZoneNameClean(zone), iType, low );
end
return format(TRZ_INSTANCE_TEXT, instanceColor, zone,
return format(TRZ_INSTANCE_TEXT, instanceColor, TRZ_ZoneNameClean(zone),
iType,
low, high );
else
complex = complex .. ":";
if ( low == high) then
return format(TRZ_INSTANCE_TEXT3, instanceColor, complex, zone, iType, low);
return format(TRZ_INSTANCE_TEXT3, instanceColor, complex, TRZ_ZoneNameClean(zone), iType, low);
end
return format(TRZ_INSTANCE_TEXT4, instanceColor, complex, zone, iType, low, high);
return format(TRZ_INSTANCE_TEXT4, instanceColor, complex, TRZ_ZoneNameClean(zone), iType, low, high);
end
end
 
241,9 → 247,9
end
local low, high = LT:GetLevel(zone);
if ( low == 0 and high == 0) then
return zoneColor .. zone .. TRZ_FONT_OFF;
return zoneColor .. TRZ_ZoneNameClean(zone) .. TRZ_FONT_OFF;
else
return zoneColor .. zone .. " (" .. low .. "-" .. high .. ")" .. TRZ_FONT_OFF;
return zoneColor .. TRZ_ZoneNameClean(zone) .. " (" .. low .. "-" .. high .. ")" .. TRZ_FONT_OFF;
end
end
 
259,7 → 265,7
factionColor = TRZ_GREEN;
end
end
return factionColor .. " [" .. zone .. "]" .. TRZ_FONT_OFF;
return factionColor .. " [" .. TRZ_ZoneNameClean(zone) .. "]" .. TRZ_FONT_OFF;
end
 
function TRZ_GetContinentText(zone,colors)
278,12 → 284,12
return continentColor .. " (" .. iContinent .. ")";
end
 
function TRZ_GetLevelText(low,high,colors)
function TRZ_GetLevelText(zone,low,high,colors)
local levelColor = TRZ_WHITE;
if ( colors ) then
levelColor = TRZ_GetColorRange(low,high);
end
return levelColor .. format("%d-%d", low, high) .. TRZ_FONT_OFF;
return levelColor .. format("%s (%d-%d)", TRZ_ZoneNameClean(zone), low, high) .. TRZ_FONT_OFF;
end
 
function TRZ_GetCityText(zone,colors)
292,25 → 298,25
local r, g, b = LT:GetFactionColor(zone);
levelColor = TRZ_RGBPercToHex(r, g, b);
end
return levelColor .. zone .. TRZ_FONT_OFF;
return levelColor .. TRZ_ZoneNameClean(zone) .. TRZ_FONT_OFF;
end
 
function TRZ_UpdateButtonText()
local zoneColor;
local playerLevel = UnitLevel("player");
local zoneName = GetRealZoneText();
local zoneName = LT:GetUniqueZoneNameForLookup(GetRealZoneText(), GetCurrentMapContinent())
if (zoneName == nil) then return end
local colorTooltip = TitanGetVar(TRZ_ID, "ShowColoredText");
 
trz_button_text = "";
trz_current_continent = LT:GetContinent(zoneName);
trz_current_continent = GetContinentName(GetCurrentMapContinent());
trz_current_zone = zoneName;
local low, high = LT:GetLevel(zoneName);
 
if (LT:IsCity(zoneName) == true) then
trz_button_text = TRZ_GetCityText(zoneName,colorTooltip);
else
trz_button_text = TRZ_GetLevelText(low,high,colorTooltip);
trz_button_text = TRZ_GetLevelText(zoneName,low,high,colorTooltip);
end
return
end
466,7 → 472,7
local wZone2;
local zoneText="";
if (WorldMapFrame.areaName ~= nil) then
wZone=WorldMapFrame.areaName;
wZone=LT:GetUniqueZoneNameForLookup(WorldMapFrame.areaName, GetCurrentMapContinent());
-- Instance display
if (WorldMapFrameAreaPetLevels:GetText()) then
TRZ_WorldMap_Text:SetPoint("TOP", WorldMapFrameAreaPetLevels, "BOTTOM");
496,6 → 502,7
if (not LT:IsZone(wZone2)) then
wZone2=WorldMapFrame.areaName;
end
wZone2=LT:GetUniqueZoneNameForLookup(wZone2, GetCurrentMapContinent()); -- Fixes issue retrieving instances from newer zones that share a name with older zones.
if (wZone ~= wZone2) then
if (LT:IsZone(wZone2)) then
if (LT:GetType(wZone2) == "Zone") then