WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/castbar/Aloft/AloftCastWarning
    from Rev 2222 to Rev 2341
    Reverse comparison

Rev 2222 → Rev 2341

AloftCastWarningSpellProcess.lua
92,8 → 92,8
 
function AloftCastWarning:GetSpellBySpellId(spellId)
-- ChatFrame7:AddMessage("AloftCastWarning:GetSpellBySpellId(): " .. tostring(spellId))
if spellId and self.spellIdBase.realm then
local spell = self.spellIdBase.realm[spellId]
if spellId and self.spellIdBase.global.spells then
local spell = self.spellIdBase.global.spells[spellId]
return spell
end
return nil
130,7 → 130,7
["unit"] = true, -- track style of origin, so we know when we are complete
}
 
self.spellIdBase.realm[spellId] = spell
self.spellIdBase.global.spells[spellId] = spell
end
-- the case where elapsedTime <= 0.0 is expected, and no spell record should be created
else
175,9 → 175,9
end
end
 
function AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, isChanneled, effective)
function AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, isChanneled, effective)
local spell
local typ, origin = self:GetLogOriginType(originFlags)
local typ, origin = self:GetLogOriginType(originFlags, originFlags2)
 
if origin then
-- ChatFrame7:AddMessage("AloftCastWarning:RecordSpellLogInfo(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(originFlags) .. "/" .. tostring(spellSchool))
207,7 → 207,7
["info"] = true, -- track style of origin, so we know when we are complete
}
 
self.spellIdBase.realm[spellId] = spell
self.spellIdBase.global.spells[spellId] = spell
else
-- ChatFrame7:AddMessage("AloftCastWarning:RecordSpellLogInfo(): spell data mismatch, please report this; " .. tostring(subtype) .. "/" .. tostring(originFlags) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool) .. "/" .. tostring(isChanneled) .. "/" .. tostring(spellCastTime))
end
260,12 → 260,12
 
-----------------------------------------------------------------------------
 
local function range_damage(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
local function range_damage(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:RANGE_DAMAGE(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
--[[
276,12 → 276,12
]]
end
 
local function range_missed(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, missType, amountMissed)
local function range_missed(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, missType, amountMissed)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:RANGE_MISSED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(missType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
--[[
293,25 → 293,25
 
-----------------------------------------------------------------------------
 
local function spell_cast_start(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool)
local function spell_cast_start(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_CAST_START(): nameplate " .. tostring(subtype) .. "/" .. tostring(originGUId) .. "/" .. tostring(AloftTargetTrackingData:GetGUIdNameplateId(originGUId)) .. "/" .. tostring(spellId))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_CAST_START(): record " .. tostring(subtype) .. "/" .. tostring(originGUId) .. "/" .. tostring(AloftTargetTrackingData:GetGUIdNameplateId(originGUId)) .. "/" .. tostring(originFlags) .. "/" .. tostring(spellId) .. "/" .. tostring(spell and spell.name) .. "/" .. tostring(spell and spell.rank))
 
if spell and AloftCastWarning:StartActiveLogCast(timestamp, originGUId, originFlags, subtype, spellId, spell) then
if spell and AloftCastWarning:StartActiveLogCast(timestamp, originGUId, originFlags, originFlags2, subtype, spellId, spell) then
AloftCastWarning:UpdateCastWarning()
end
end
 
local function spell_damage(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
local function spell_damage(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_DAMAGE(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, school)
 
-- TODO: format resist/block/absorb/etc into an extra string?
320,12 → 320,12
end
end
 
local function spell_heal(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, amount, overhealing, critical)
local function spell_heal(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, amount, overhealing, critical)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_HEAL(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
if AloftCastWarning:EndActiveCast(originGUId, spellId, spellName, nil, SUCCEEDED, nil) then
333,12 → 333,12
end
end
 
local function spell_missed(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, missType, amountMissed)
local function spell_missed(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, missType, amountMissed)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_MISSED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(missType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
if AloftCastWarning:EndActiveCast(originGUId, spellId, spellName, nil, MISSED, missType) then
349,24 → 349,24
-----------------------------------------------------------------------------
 
-- NOTE: *_CAST_SUCCESS is invoked when channeled spells start and/or instant cast events occur
local function spell_cast_success(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool)
local function spell_cast_success(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_CAST_SUCCESS(): " .. tostring(subtype) .. "/" .. tostring(spellId))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_CAST_SUCCESS(): " .. tostring(spell and spell.id) .. "/" .. tostring(spell and spell.name) .. "/" .. tostring(spell and spell.isChanneled))
if spell and spell.isChanneled and AloftCastWarning:StartActiveLogCast(timestamp, originGUId, originFlags, subtype, spellId, spell) then
if spell and spell.isChanneled and AloftCastWarning:StartActiveLogCast(timestamp, originGUId, originFlags, originFlags2, subtype, spellId, spell) then
AloftCastWarning:UpdateCastWarning()
end
end
 
local function spell_cast_failed(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, failedType)
local function spell_cast_failed(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, failedType)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_CAST_FAILED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(failedType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
if spell and AloftCastWarning:EndActiveCast(originGUId, spellId, spellName, nil, FAILED, failedType) then
374,12 → 374,12
end
end
 
local function spell_interrupt(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, extraSpellID, extraSpellName, extraSchool)
local function spell_interrupt(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, extraSpellID, extraSpellName, extraSchool)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_INTERRUPT(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(extraSpellID) .. "/" .. tostring(extraSpellName) .. "/" .. tostring(extraSchool))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
if AloftCastWarning:EndActiveCast(originGUId, spellId, spellName, nil, INTERRUPT, extraSpellName) then
389,12 → 389,12
 
-----------------------------------------------------------------------------
 
local function spell_resurrect(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool)
local function spell_resurrect(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_RESURRECT(): " .. tostring(subtype) .. "/" .. tostring(spellId))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
if AloftCastWarning:EndActiveCast(originGUId, spellId, spellName, nil, SUCCEEDED, nil) then
402,12 → 402,12
end
end
 
local function spell_summon(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool)
local function spell_summon(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_SUMMON(): " .. tostring(subtype) .. "/" .. tostring(spellId))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
if AloftCastWarning:EndActiveCast(originGUId, spellId, spellName, nil, SUCCEEDED, nil) then
415,13 → 415,13
end
end
 
local function spell_create(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool)
local function spell_create(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_CREATE(): " .. tostring(subtype) .. "/" .. tostring(spellId))
end
 
-- TODO: a spell outcome here?
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
 
if AloftCastWarning:EndActiveCast(originGUId, spellId, spellName, nil, CREATE, nil) then
431,108 → 431,108
 
-----------------------------------------------------------------------------
 
local function spell_periodic_damage(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
local function spell_periodic_damage(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_PERIODIC_DAMAGE(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_periodic_heal(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, amount, overhealing, critical)
local function spell_periodic_heal(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, amount, overhealing, critical)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_PERIODIC_HEAL(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_periodic_missed(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, missType, amountMissed)
local function spell_periodic_missed(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, missType, amountMissed)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_PERIODIC_MISSED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(missType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
-----------------------------------------------------------------------------
 
local function spell_aura_applied(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, auraType)
local function spell_aura_applied(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, auraType)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_AURA_APPLIED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(auraType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, true, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, true, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_aura_applied_dose(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, auraType, amount)
local function spell_aura_applied_dose(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, auraType, amount)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_AURA_APPLIED_DOSE(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(auraType) .. "/" .. tostring(amount))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_aura_broken(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, auraType)
local function spell_aura_broken(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, auraType)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_AURA_BROKEN(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(auraType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_aura_broken_spell(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, extraSpellID, extraSpellName, extraSchool, auraType)
local function spell_aura_broken_spell(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, extraSpellID, extraSpellName, extraSchool, auraType)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_AURA_BROKEN_SPELL(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(extraSpellID) .. "/" .. tostring(extraSpellName) .. "/" .. tostring(extraSchool) .. "/" .. tostring(auraType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_aura_refresh(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, auraType)
local function spell_aura_refresh(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, auraType)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_AURA_REFRESH(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(auraType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, true)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, true)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_aura_removed(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, auraType)
local function spell_aura_removed(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, auraType)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_AURA_REMOVED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(auraType))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, true, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, true, false)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
local function spell_aura_removed_dose(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, auraType, amount)
local function spell_aura_removed_dose(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, auraType, amount)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SPELL_AURA_REMOVED_DOSE(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(amount))
end
 
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, nil, false)
local spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, spellSchool, originFlags, originFlags2, nil, false)
AloftCastWarning:UpdateSpellSchool(subtype, spellId, spellSchool)
end
 
-----------------------------------------------------------------------------
 
local function swing_damage(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
local function swing_damage(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SWING_DAMAGE(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
-- TODO: "attack" seems to be spellid 6603, use that somehow?
end
 
local function swing_missed(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, missType, amountMissed)
local function swing_missed(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, missType, amountMissed)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:SWING_MISSED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(missType))
end
541,13 → 541,13
 
-----------------------------------------------------------------------------
 
local function damage_shield(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
local function damage_shield(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:DAMAGE_SHIELD(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
end
 
local function damage_shield_missed(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, missType, amountMissed)
local function damage_shield_missed(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, missType, amountMissed)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:DAMAGE_SHIELD_MISSED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(missType))
end
555,7 → 555,7
 
-----------------------------------------------------------------------------
 
local function damage_split(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
local function damage_split(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, spellDamage, spellOverkill, school, resisted, blocked, absorbed, critical, glancing, crushing)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:DAMAGE_SPLIT(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellSchool))
end
563,7 → 563,7
 
-----------------------------------------------------------------------------
 
local function unit_died(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags)
local function unit_died(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags)
if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- ChatFrame7:AddMessage("AloftCastWarning:unit_died(): " .. tostring(subtype) .. "/" .. tostring(originGUId) .. "/" .. tostring(originName) .. "/" .. tostring(targetGUId) .. "/" .. tostring(targetName))
end
637,7 → 637,7
 
-- COMBAT_LOG_* event support
 
function AloftCastWarning:OnCombatLogEvent(event, timestamp, subtype, hideCaster, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, suffix1, suffix2, suffix3, suffix4, suffix5, suffix6, suffix7, suffix8, suffix9, suffix10, suffix11, suffix12)
function AloftCastWarning:OnCombatLogEvent(event, timestamp, subtype, hideCaster, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, suffix1, suffix2, suffix3, suffix4, suffix5, suffix6, suffix7, suffix8, suffix9, suffix10, suffix11, suffix12)
-- local unit
-- if AloftTargetTrackingData:GetGUIdNameplateId(originGUId) then
-- unit = "origin"
656,7 → 656,7
 
dispatchMethod = subtypeDispatchMethods[subtype]
if dispatchMethod then
dispatchMethod(timestamp, subtype, originGUId, originName, originFlags, targetGUId, targetName, targetFlags, suffix1, suffix2, suffix3, suffix4, suffix5, suffix6, suffix7, suffix8, suffix9, suffix10, suffix11, suffix12)
dispatchMethod(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, suffix1, suffix2, suffix3, suffix4, suffix5, suffix6, suffix7, suffix8, suffix9, suffix10, suffix11, suffix12)
end
end
 
855,7 → 855,7
 
-----------------------------------------------------------------------------
 
function AloftCastWarning:StartActiveLogCast(timestamp, originGUId, originFlags, subtype, spellId, spell)
function AloftCastWarning:StartActiveLogCast(timestamp, originGUId, originFlags, originFlags2, subtype, spellId, spell)
-- ChatFrame7:AddMessage("AloftCastWarning:StartActiveLogCast(): enter " .. tostring(subtype) .. "/" .. tostring(originGUId) .. "/" .. tostring(originFlags) .. "/" .. tostring(spellId) .. "/" .. tostring(spell and spell.id) .. "/" .. tostring(spell and spell.name))
 
if AloftTargetTrackingData:GetGUIdUnitid(originGUId) then
896,7 → 896,7
-- ChatFrame7:AddMessage("AloftCastWarning:StartActiveLogCast(): NO targetId " .. tostring(nameplateId) .. "/" .. tostring(originGUId) .. "/" .. tostring(spellId) .. "/" .. tostring(spellName))
if not spell then
-- spell was not found/collected at the top, attempt to record it in some basic form here; theoretically, we should never get here
spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, nil, originFlags, nil, false)
spell = AloftCastWarning:RecordSpellLogInfo(subtype, spellId, nil, originFlags, originFlags2, nil, false)
end
 
-- NOTE: comparing on the basis of (deprecated) name/rank because in certain cases the first tick of a channeled spell
1099,7 → 1099,7
 
-----------------------------------------------------------------------------
 
function AloftCastWarning:GetLogOriginType(originFlags)
function AloftCastWarning:GetLogOriginType(originFlags, originFlags2)
local value = bit_band(originFlags, COMBATLOG_OBJECT_TYPE_MASK)
if value == COMBATLOG_OBJECT_TYPE_PLAYER then
return value, "player"
AloftCastWarning.lua
195,11 → 195,12
if self.db ~= Aloft.AloftDB:GetNamespace(self.namespace, true) then self.db = Aloft.AloftDB:RegisterNamespace(self.namespace, self.defaults) end
-- ChatFrame7:AddMessage("AloftCastWarning:OnInitialize(): db " .. tostring(self.db))
 
-- spell database (two namespaces, both realm-wide)
-- spell database
self.AloftCastWarningDB = LibStub("AceDB-3.0"):New("AloftCastWarningDB", nil, "Default")
-- ChatFrame7:AddMessage("AloftCastWarning:OnInitialize(): AloftCastWarningDB " .. tostring(self.AloftCastWarningDB))
 
self.spellIdBase = self.AloftCastWarningDB:RegisterNamespace("spellIdBase", { profile = { }, realm = { } })
-- TODO: get rid of "realm" once people have a chance to run this version of Aloft
self.spellIdBase = self.AloftCastWarningDB:RegisterNamespace("spellIdBase", { profile = { }, global = { spells = { }, }, realm = { } })
-- ChatFrame7:AddMessage("AloftCastWarning:OnInitialize(): spellIdBase " .. tostring(self.spellIdBase))
 
-- TODO: get rid of this once people have a chance to run this version of Aloft
225,23 → 226,30
end
]]
 
-- TODO: get rid of these once people have a chance to run this version of Aloft
for x, _ in pairs(self.spellIdBase.realm) do
self.spellIdBase.realm[x] = nil -- old implementation, zap it
end
for x, _ in pairs(self.spellNameRankBase.realm) do
self.spellNameRankBase.realm[x] = nil -- old implementation, zap it
end
-- NOTE: for some reason just assigning realm = { } did not do the job; something in the way AceDB manages these tables
 
-- ChatFrame7:AddMessage("AloftCastWarning:OnEnable(): process spellIdBase " .. tostring(self.spellIdBase))
if not self.spellIdBase.profile.version or self.spellIdBase.profile.version ~= self.version then
self.spellIdBase.realm = { } -- entire spellIdBase is out of date, zap it
self.spellIdBase.profile.version = self.version
-- ChatFrame7:AddMessage("AloftCastWarning:OnEnable(): ----- spellIdBase VERSION ----- " .. tostring(self.spellIdBase.profile.version) .. "/" .. tostring(Aloft.version))
if not self.spellIdBase.profile.version or self.spellIdBase.profile.version ~= Aloft.version then
self.spellIdBase.profile.version = Aloft.version
self.spellIdBase.global.spells = { } -- reset spellid database, version has changed
else
-- eliminate all spells recorded in spellIdBase that have not been marked permanent, and/or that have no school, and/or are tradeskills when we don't want tradeskills
for spellId, spell in pairs(self.spellIdBase.realm) do
for spellId, spell in pairs(self.spellIdBase.global.spells) do
if not spell or not spell.id or spellId ~= spell.id or not self:IsSpellEntryValid(spell) then
-- get rid of spell
self.spellIdBase.realm[spellId] = nil
self.spellIdBase.global.spells[spellId] = nil
end
end
end
 
-- TODO: get rid of this once people have a chance to run this version of Aloft
self.spellNameRankBase.realm = { }
 
self:AdjustOptionValues()
 
self:UpdateAll()