WoWInterface SVN Aloft

Compare Revisions

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

Rev 1848 → Rev 1860

AloftIsTargetData.lua
5,6 → 5,9
 
local AloftIsTargetData = Aloft:NewModule("IsTargetData", Aloft, "AceEvent-3.0", "AceTimer-3.0")
 
-- local AloftVisibility = nil
-- local AloftAlpha = nil
 
-----------------------------------------------------------------------------
 
local lastTarget = nil
58,6 → 61,9
 
function AloftIsTargetData:OnEnable()
self:RegisterEvents()
 
-- AloftVisibility = Aloft:GetModule("Visibility", true)
-- AloftAlpha = Aloft:GetModule("Alpha", true)
end
 
function AloftIsTargetData:OnDisable()
144,8 → 150,11
-----------------------------------------------------------------------------
 
-- re-acquire target if its nameplate re-appears
-- NOTE: this notion of "original" alpha does not seem to work here... but it does work in Aloft:GetNameplateByAlpha(); TODO: figure out why
function AloftIsTargetData:DoNameplateShow(aloftData)
if targetExists and aloftData.nameplateFrame:GetAlpha() == 1 then
-- 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 nameplateFrame = aloftData and aloftData.nameplateFrame
if nameplateFrame and ((nameplateFrame:GetAlpha() == 1) --[[ or (original and nameplateFrame.originalAlpha == 1) ]] ) then
lastTarget = aloftData
lastTarget.isTarget = true
-- ChatFrame7:AddMessage("IsTargetData:DoNameplateShow(): firing Aloft:OnIsTargetDataChanged, gaining target " .. tostring(aloftData.name))
170,9 → 179,10
 
function AloftIsTargetData:Update()
if targetExists then
-- ChatFrame7:AddMessage("AloftIsTargetData:Update(): target exists " .. tostring(targetExists) .. "/" .. tostring(lastTarget and lastTarget.name))
lastTarget = Aloft:GetTargetNameplate()
-- ChatFrame7:AddMessage("AloftIsTargetData:Update(): target exists " .. tostring(targetExists) .. "/" .. tostring(lastTarget and lastTarget.name))
if lastTarget then
-- ChatFrame7:AddMessage("AloftIsTargetData:Update(): last target " .. tostring(targetExists) .. "/" .. tostring(lastTarget and lastTarget.name))
lastTarget.isTarget = true
-- ChatFrame7:AddMessage("IsTargetData:Update(): firing Aloft:OnIsTargetDataChanged, gaining target " .. tostring(lastTarget.name))
self:SendMessage("Aloft:OnIsTargetDataChanged", lastTarget)