/branches/preview/Aloft/AloftIsTargetData
-- re-acquire target if its nameplate re-appears |
function AloftIsTargetData:DoNameplateShow(aloftData) |
if targetExists and aloftData.nameplateFrame:GetAlpha() == 1 then |
local nameplateFrame = aloftData and aloftData.nameplateFrame |
if nameplateFrame and aloftData:IsTarget() then -- need to actually go to the underlying alpha here, we are setting the isTarget flag |
lastTarget = aloftData |
lastTarget.isTarget = true |
-- ChatFrame7:AddMessage("IsTargetData:DoNameplateShow(): firing Aloft:OnIsTargetDataChanged, gaining target " .. tostring(aloftData.name)) |
----------------------------------------------------------------------------- |
function AloftIsTargetData:UpdateData(aloftData) |
aloftData.isTarget = aloftData:IsTarget() |
aloftData.isTarget = aloftData:IsTarget() -- need to actually go to the underlying alpha here, we need to check the isTarget flag |
-- ChatFrame7:AddMessage("IsTargetData:UpdateData(): new target is " .. aloftData.name .. "/" .. tostring(aloftData.isTarget)) |
if aloftData.isTarget then |
function AloftIsTargetData:Update() |
if targetExists then |
lastTarget = Aloft:GetTargetNameplate() |
-- ChatFrame7:AddMessage("AloftIsTargetData:Update(): target exists " .. tostring(targetExists) .. "/" .. tostring(lastTarget and lastTarget.name)) |
lastTarget = Aloft:GetTargetNameplate() -- need to actually go to the underlying alpha here, we are setting the isTarget flag |
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) |