WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/border/Aloft/Aloft
    from Rev 1848 to Rev 1865
    Reverse comparison

Rev 1848 → Rev 1865

Aloft.lua
32,6 → 32,9
 
local SML = LibStub("LibSharedMedia-3.0")
 
local AloftVisibility = nil
local AloftAlpha = nil
 
-----------------------------------------------------------------------------
 
Aloft.namespace = "aloft"
394,6 → 397,9
end
self.showClassColorInVKey = GetCVarBool("ShowClassColorInNameplate")
 
AloftVisibility = Aloft:GetModule("Visibility", true)
AloftAlpha = Aloft:GetModule("Alpha", true)
 
--[[
table.insert(PreLoadDebugHistory, "ALOFT END")
 
727,6 → 733,7
 
-----------------------------------------------------------------------------
 
-- NOTE: this notion of "original" alpha does seem to work here... but it does not work in AloftIsTargetData:DoNameplateShow(); TODO: figure out why
function Aloft:GetTargetNameplate(unitName)
-- ChatFrame7:AddMessage("Aloft:GetTargetNameplate(): enter")
 
739,7 → 746,8
end
-- ChatFrame7:AddMessage("Aloft:GetTargetNameplate(): seek " .. (targetName or "<NOTARGET>"))
 
local aloftData = self:GetNameplateByAlpha(targetName, 1)
local original = AloftAlpha and AloftAlpha:IsEnabled() and AloftVisibility and AloftVisibility:IsEnabled() and AloftVisibility.db and AloftVisibility.db.profile and AloftVisibility.db.profile.useAlpha and AloftVisibility.db.profile.target
local aloftData = self:GetNameplateByAlpha(targetName, 1, original)
if (not aloftData) then
-- ChatFrame7:AddMessage("Aloft:GetTargetNameplate(): no nameplate")
noTargetNameplate = true
751,7 → 759,8
return aloftData
end
 
function Aloft:GetNameplateByAlpha(unitName, nameplateAlpha)
-- NOTE: this notion of "original" alpha does seem to work here... but it does not work in AloftIsTargetData:DoNameplateShow(); TODO: figure out why
function Aloft:GetNameplateByAlpha(unitName, nameplateAlpha, original)
-- ChatFrame7:AddMessage("Aloft:GetNameplateByAlpha(): enter" --[[.. debugstack()]])
 
if not unitName then return end
761,7 → 770,8
-- local aloftData = nameToNameplateMap[unitName]
if (nameToNameplateMultiMap[unitName]) then
for aloftData in pairs(nameToNameplateMultiMap[unitName]) do
if aloftData and aloftData.nameplateFrame:GetAlpha() == nameplateAlpha then
local nameplateFrame = aloftData and aloftData.nameplateFrame
if nameplateFrame and ((nameplateFrame:GetAlpha() == nameplateAlpha) or (original and nameplateFrame.originalAlpha == nameplateAlpha)) then
-- ChatFrame7:AddMessage("Aloft:GetNameplateByAlpha(): fast " .. tostring(aloftData.name))
return aloftData
end
771,13 → 781,16
-- full visible nameplate search
-- ChatFrame7:AddMessage("Aloft:GetNameplateByAlpha(): iterate visible nameplates")
for aloftData in pairs(visibleNameplateList) do
if aloftData.name == unitName and aloftData.nameplateFrame:GetAlpha() == nameplateAlpha then
-- record it for future reference
nameToNameplateMap[unitName] = aloftData -- most recently seen nameplate with this unit name
if (not nameToNameplateMultiMap[unitName]) then nameToNameplateMultiMap[unitName] = { } end
nameToNameplateMultiMap[aloftData.name][aloftData] = true
-- ChatFrame7:AddMessage("Aloft:GetNameplateByAlpha(): slow " .. tostring(aloftData.name))
return aloftData
if aloftData.name == unitName then
local nameplateFrame = aloftData and aloftData.nameplateFrame
if nameplateFrame and ((nameplateFrame:GetAlpha() == nameplateAlpha) or (original and nameplateFrame.originalAlpha == nameplateAlpha)) then
-- record it for future reference
nameToNameplateMap[unitName] = aloftData -- most recently seen nameplate with this unit name
if (not nameToNameplateMultiMap[unitName]) then nameToNameplateMultiMap[unitName] = { } end
nameToNameplateMultiMap[aloftData.name][aloftData] = true
-- ChatFrame7:AddMessage("Aloft:GetNameplateByAlpha(): slow " .. tostring(aloftData.name))
return aloftData
end
end
end
 
916,6 → 929,9
local _, healthBarMaxValue = healthBar:GetMinMaxValues()
aloftData.healthBarMaxValue = healthBarMaxValue
 
aloftData.isTarget = nil
aloftData.nameplateFrame.originalAlpha = nil
 
aloftData.isBoss = aloftData.bossIconRegion:IsShown()
 
local levelTextRegion = aloftData.levelTextRegion