WoWInterface SVN mikma

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /EnemyScanner2
    from Rev 689 to Rev 695
    Reverse comparison

Rev 689 → Rev 695

EnemyScanner2.lua
64,14 → 64,37
GetStats("target")
end
 
local function tooltipScanner(guid)
local tooltip = TestTooltip or CreateFrame("GameTooltip","TestTooltip",UIParent,"GameTooltipTemplate")
tooltip:SetOwner(UIParent, "ANCHOR_NONE")
tooltip:SetPoint("CENTER",UIParent,"CENTER")
tooltip:ClearLines()
tooltip:SetHyperlink('unit:' .. guid)
tooltip:Show()
local printline
local line2 = TestTooltipTextLeft2:GetText()
local line3 = TestTooltipTextLeft3:GetText()
if string.match(line2, "Level %d+") then
printline = string.match(line2, "%d+")
elseif string.match(line3, "Level %d+") then
printline = string.match(line3, "%d+")
end
if tonumber(printline) then
tooltip:Hide()
return tonumber(printline)
else
debugprint(4,printline)
return false
end
end
 
function EnemyScanner2:COMBAT_LOG_EVENT_UNFILTERED(_, _, minievent, _, guidsource, source, sourceflags, sourceflagsraid, guidtarget, target, targetflags, targetflagsraid, ...)
if isTargetHostile(sourceflags) then --and not UnitIsPVPSanctuary("player") then
if guidsource == '' then
if debug then
ChatFrame4:AddMessage(minievent..", "..guidsource and guidsource or "nil, "..source and source or "nil, "..sourceflags..", "..sourceflagsraid,...,1,0,0)
end
debugprint(4,minievent..", "..guidsource and guidsource or "nil, "..source and source or "nil, "..sourceflags..", "..sourceflagsraid,...,1,0,0)
return
end
 
source = source:match("[^-]+")
local spellID,spellName = ...
local level
114,7 → 137,7
if not texture then
texture = "Interface\\Icons\\INV_MISC_QUESTIONMARK"
end
 
 
-- If spell is greater than the one stored in database, upgrade it in the database
if level and (db[guidsource] < level) then
-- If spell level is greater than current max level in expansion, don't upgrade
126,6 → 149,15
db[guidsource] = level
end
 
local tooltiplevel
if guidsource ~= '' and db[guidsource] < 90 then
debugprint(4,"Creating tooltip for "..guidsource)
tooltiplevel = tooltipScanner(guidsource)
if tooltiplevel and tooltiplevel > level then
db[guidsource] = tooltiplevel
end
end
 
local class, classFilename, race, raceFilename, sex, name, realm = GetPlayerInfoByGUID(guidsource)
local r,g,b = RAID_CLASS_COLORS[classFilename].r,RAID_CLASS_COLORS[classFilename].g,RAID_CLASS_COLORS[classFilename].b
local levelcolor = GetQuestDifficultyColor(db[guidsource])