Mercurial > wow > skeletonkey
comparison SkeletonStats/DamageMeter.lua @ 3:07293831dd7b
- implement unit parameters table inheritance from a stock table
- UnitFrames.unit() and UnitFrames.ui() methods
| author | Nenue |
|---|---|
| date | Tue, 21 Jun 2016 08:14:22 -0400 |
| parents | cd7d06bcd98d |
| children | a30285f8191e |
comparison
equal
deleted
inserted
replaced
| 2:f7a0898d293c | 3:07293831dd7b |
|---|---|
| 102 | 102 |
| 103 dm.actor = function (guid, name, flags) | 103 dm.actor = function (guid, name, flags) |
| 104 --if not actors[guid] then | 104 --if not actors[guid] then |
| 105 local class, classFilename, race, raceFilename, sex, name, realm = GetPlayerInfoByGUID(guid) | 105 local class, classFilename, race, raceFilename, sex, name, realm = GetPlayerInfoByGUID(guid) |
| 106 | 106 |
| 107 print('|cFFFFFF00guid|r =', name, flags, 'class', class, classFilename) | 107 --print('|cFFFFFF00guid|r =', name, flags, 'class', class, classFilename) |
| 108 actors[guid] = { | 108 actors[guid] = { |
| 109 name = name, | 109 name = name, |
| 110 flags = flags, | 110 flags = flags, |
| 111 class = class, | 111 class = class, |
| 112 classFilename = classFilename, | 112 classFilename = classFilename, |
| 135 local args = {...} | 135 local args = {...} |
| 136 for key, prototype in pairs(prototypes) do | 136 for key, prototype in pairs(prototypes) do |
| 137 --print(subEvent) | 137 --print(subEvent) |
| 138 if prototype[subEvent] then | 138 if prototype[subEvent] then |
| 139 prototype[subEvent](subEvent, ...) | 139 prototype[subEvent](subEvent, ...) |
| 140 print('|cFFFFFF00' .. key .. '|r.|cFF00FFFF'..subEvent, '|r', ...) | 140 --print('|cFFFFFF00' .. key .. '|r.|cFF00FFFF'..subEvent, '|r', ...) |
| 141 end | 141 end |
| 142 end | 142 end |
| 143 | 143 |
| 144 dm.ui() | 144 dm.ui() |
| 145 return true | 145 return true |
| 216 -- DAMAGE DONE | 216 -- DAMAGE DONE |
| 217 local dd = prototypes.damageDone | 217 local dd = prototypes.damageDone |
| 218 dd.SPELL_DAMAGE = function(subEvent, ...) | 218 dd.SPELL_DAMAGE = function(subEvent, ...) |
| 219 local sourceGUID, sourceName, sourceFlags, _, destGUID, destName, destFlags, _, spellID, spellName, spellSchool, amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = ... | 219 local sourceGUID, sourceName, sourceFlags, _, destGUID, destName, destFlags, _, spellID, spellName, spellSchool, amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = ... |
| 220 | 220 |
| 221 if not sourceName then | |
| 222 return | |
| 223 end | |
| 224 | |
| 221 view[sourceName] = view[sourceName] or {} | 225 view[sourceName] = view[sourceName] or {} |
| 222 local p = view[sourceName] | 226 local p = view[sourceName] |
| 223 | 227 |
| 224 p.actor = dm.actor(sourceGUID, sourceName, sourceFlags) | 228 p.actor = dm.actor(sourceGUID, sourceName, sourceFlags) |
| 225 dm.actor(destGUID, destName, destFlags) | 229 dm.actor(destGUID, destName, destFlags) |
