WoWInterface SVN zz_DaVis

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 3 to Rev 4
    Reverse comparison

Rev 3 → Rev 4

zz_DaVis/core.lua New file
0,0 → 1,41
local name, addon = ...
 
local defaults,options,db,data,guid = {
}
 
local function getPref(pref)
return db[pref[#pref]]
end
 
local function setPref(pref,value)
db[pref[#pref]] = value
end
 
addon['CLParse'] = function(self, ...)
-- local event,timestamp, eventtype, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellId,spellName,spellSchool = ...
data = {...}
if(guid == data[9]) then
print(data[3])
end
end
local prefix = {"SWING","RANGE","SPELL","SPELL_PERIODIC","SPELL_BUILDING","ENVIRONMENTAL"}
local suffix = {"DAMAGE"}
local subevents = {}
for _,a in pairs(prefix) do
for _,b in pairs(suffix) do
subevents[#subevents + 1] = a .. "_" .. b
end
end
local function init()
local f = CreateFrame("Frame",name,UIParent)
f:SetWidth(100)
f:SetHeight(100)
f:SetPoint("CENTER")
addon['RegisterCLEvent'](addon,subevents,"CLParse")
options = addon['InitConfig'](addon, name, true, {
['type'] = "data source",
}, getPref, setPref)
db = addon['db']['profile'][name]
guid = UnitGUID("player")
end
addon['startup'](addon, name, name, init, true, defaults)
\ No newline at end of file
zz_DaVis/pack.xml New file
0,0 → 1,3
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="core.lua"/>
</Ui>
\ No newline at end of file
zz_DaVis/zz_DaVis.toc New file
0,0 → 1,9
## Interface: 60000
## Title: zz_DaVis
## Notes: Damage Visualization
## Author: Rilgamon
## X-WoWI-ID:
## SavedVariables: zz_DaVisDB
## OptionalDeps: Ace3, zzLibCommon
Common\common.xml
pack.xml
zz_DaVis/LibCombatLog.lua New file
0,0 → 1,42
local name, addon = ...
local embed = addon['LibInit']("LibCombatLog", 5, {"RegisterCLEvent", "UnRegisterCLEvent"})
if(type(embed) ~= 'function') then return end
local pairs = pairs
local LibCombatLog = LibStub("LibCombatLog")
LibCombatLog['regs'] = LibCombatLog['regs'] or {}
local function combatLog(...)
if(LibCombatLog['regs'][select(4,...)]) then
for k, v in pairs(LibCombatLog['regs'][select(4,...)]) do
k[v](...)
end
end
end
LibCombatLog['frame'] = LibCombatLog['frame'] or addon['RegisterFunc']({'PLAYER_ENTERING_WORLD'},"OnEvent", function(self,event,arg1)
self:UnregisterEvent(event)
self:SetScript("OnEvent", combatLog)
self:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED')
end)
local lib = {
['RegisterCLEvent'] = function(self,event,funcName)
if(type(event) ~= "string" and funcName) then
funcName = funcName or event[1]
for _,v in pairs(event) do
LibCombatLog['regs'][v] = LibCombatLog['regs'][v] or {}
LibCombatLog['regs'][v][self] = funcName
end
else
funcName = funcName or event
LibCombatLog['regs'][event] = LibCombatLog['regs'][event] or {}
LibCombatLog['regs'][event][self] = funcName
end
end,
['UnRegisterCLEvent'] = function(self, event)
if(LibCombatLog['regs'][event]) then
if(LibCombatLog['regs'][event][self]) then
LibCombatLog['regs'][event][self] = nil
end
end
end,
}
 
embed(lib)
zz_DaVis/license.txt New file
0,0 → 1,6
The following license excludes the libraries (Libs) included. See the libraries directory or website.
 
This AddOn is public domain. That means you can change it, rename it or paint it yellow.
My name (Rilgamon) is valid only for WoWInterface.com and curse.com.
If you use/offer this addon on another website please remove my name.
If you want to give me credit you can replace it with a link to my profile on WoWInterface.com.
\ No newline at end of file
zz_DaVis/icon2.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream