WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/preview/Aloft/AloftCombatText
    from Rev 1907 to Rev 1990
    Reverse comparison

Rev 1907 → Rev 1990

AloftCombatText.lua
23,7 → 23,7
local SPELL_COLOR_HOLY = { 1.00, 0.90, 0.50, }
local SPELL_COLOR_FIRE = { 1.00, 0.00, 0.00, } -- red
local SPELL_COLOR_NATURE = { 0.30, 1.00, 0.30, }
local SPELL_COLOR_FROST = { 0.50, 1.00, 1.00, }
local SPELL_COLOR_FROST = { 0.50, 1.00, 1.00, }
local SPELL_COLOR_SHADOW = { 0.50, 0.50, 1.00, } -- basically the warlock class color
local SPELL_COLOR_ARCANE = { 1.00, 0.50, 1.00, }
local SPELL_COLOR_HEAL = { 1.00, 0.50, 0.00, } -- this is an imaginary catch-all color for healing spells (yellow-orange)
154,6 → 154,7
end
end
 
-- any time the update list is empty, cancel all timers (cleans up potential leaked timers)
if not next(updateList) then
self:CancelAllTimers()
end
198,6 → 199,7
combatTextRegion:Hide()
combatTextRegion:SetText("")
 
-- any time the update list is empty, cancel all timers (cleans up potential leaked timers)
if not next(updateList) then
self:CancelAllTimers()
end
206,7 → 208,7
 
function AloftCombatText:OnIsTargetDataChanged(message, aloftData)
if Aloft:IsConfigModeEnabled() and (aloftData.isTarget or aloftData:IsTarget()) then
local combatTextRegion = self:CreateCombatText(aloftData, "1234", 1.0, AloftCombatText.db.profile.colors.text)
local combatTextRegion = self:CreateCombatText(aloftData, "12345", 1.0, AloftCombatText.db.profile.colors.text)
if combatTextRegion then
combatTextRegion:SetAlpha(self.db.profile.alpha)
end
219,7 → 221,7
local aloftData = Aloft:GetTargetNameplate()
if aloftData then
if Aloft:IsConfigModeEnabled() then
local combatTextRegion = self:CreateCombatText(aloftData, "1234", 1.0, AloftCombatText.db.profile.colors.text)
local combatTextRegion = self:CreateCombatText(aloftData, "12345", 1.0, AloftCombatText.db.profile.colors.text)
if combatTextRegion then
combatTextRegion:SetAlpha(self.db.profile.alpha)
end
240,7 → 242,6
self:ScheduleRepeatingTimer(function() AloftCombatText:Update() end, 0.05)
 
-- ChatFrame7:AddMessage("AloftCombatText:PostCombatText(): show " .. tostring(aloftData.name) .. "/" .. tostring(text) .. "/" .. tostring(layoutFrame.combatTextRegion:GetText()))
return
end
 
function AloftCombatText:CreateCombatText(aloftData, text, scale, color)
274,6 → 275,7
combatTextRegion:SetAlpha(0)
combatTextRegion:Show()
 
-- ChatFrame7:AddMessage("AloftCombatText:CreateCombatText(): show " .. tostring(aloftData.name) .. "/" .. tostring(text) .. "/" .. tostring(layoutFrame.combatTextRegion:GetText()))
return combatTextRegion
end
 
455,22 → 457,31
 
-----------------------------------------------------------------------------
 
local function getNameplate(targetGUId, targetName, nameplateId)
local function getNameplate(targetGUId, rawTargetName, nameplateId)
if targetGUId == AloftCombatText:GetPlayerTargetGUId() then
return Aloft:GetTargetNameplate(targetName)
local targetName, _ = Aloft:ParseUnitName(rawTargetName, nil) -- second return value is not used
local aloftData = Aloft:GetTargetNameplate(targetName)
-- ChatFrame7:AddMessage("AloftCombatText.getNameplate() TGT " .. tostring(aloftData and aloftData.name) .. "/" .. tostring(rawTargetName) .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId) .. "/" .. tostring(nameplateId))
return aloftData
elseif nameplateId then
local nameplates = Aloft:GetNamedNameplates(targetName)
local targetName, _ = Aloft:ParseUnitName(rawTargetName) -- second return value is not used
local nameplates = Aloft:GetNamedNameplates(targetName, nil)
if nameplates then
for aloftData in pairs(nameplates) do
if nameplateId == AloftTargetTrackingData:GetNameplateId(aloftData) then
-- ChatFrame7:AddMessage("AloftCombatText.getNameplate() ENV " .. tostring(aloftData and aloftData.name) .. "/" .. tostring(rawTargetName) .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId) .. "/" .. tostring(nameplateId))
return aloftData
end
end
else
-- ChatFrame7:AddMessage("AloftCombatText:getNameplate(): no nameplates " .. tostring(targetName) .. "/" .. tostring(nameplateId))
-- nothing happens here but diagnostics
-- local targetName = Aloft:ParseUnitName(rawTargetName, nil) -- second return value is not used
-- ChatFrame7:AddMessage("AloftCombatText.getNameplate() NON 1 " .. tostring(rawTargetName) .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId) .. "/" .. tostring(nameplateId))
end
else
-- ChatFrame7:AddMessage("AloftCombatText:getNameplate(): no nameplateId " .. tostring(targetName))
-- nothing happens here but diagnostics
-- local targetName = Aloft:ParseUnitName(rawTargetName, nil) -- second return value is not used
-- ChatFrame7:AddMessage("AloftCombatText.getNameplate() NON 2 " .. tostring(rawTargetName) .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId) .. "/" .. tostring(nameplateId))
end
return nil
end