WoWInterface SVN DisplacedEnergyNazi

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 13 to Rev 14
    Reverse comparison

Rev 13 → Rev 14

DisplacedEnergyNazi/DisplacedEnergyNazi.lua
160,7 → 160,7
isDBOpt = true
end
 
-- configure LibSink-2.0 options
-- configure LibSink-2.0 options; add a disabled function
self.Options.args.output = self:GetSinkAce3OptionsDataTable()
self.Options.args.output.disabled = function(i) return not self.db.profile.enable end
 
217,14 → 217,14
local function spell_dispel(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool)
local ts = time()
 
if UnitRemovedList[targetGUId] and targetGUId ~= PLAYER_GUID then
if targetGUId ~= PLAYER_GUID and UnitRemovedList[targetGUId] then
local unitid = UnitGUIdRMap[targetGUId]
 
mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_DISPEL(): " .. tostring(originName) .. "/" .. tostring(originGUId)
.. " " .. tostring(spellName) .. "/" .. tostring(spellId)
.. " dispelled " .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId) .. " @ " .. tostring((unitid and ((CheckInteractDistance(unitid, DAMAGE_RANGE) and "11.11") or "OOR")) or "nounit"))
.. " dispelled " .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId) .. " @ " .. tostring(unitid) .. "/" .. tostring(unitid and CheckInteractDistance(unitid, DAMAGE_RANGE)))
 
if unitid and CheckInteractDistance(unitid, DAMAGE_RANGE) then
if DisplacedEnergyNazi.db.profile.warnDispel and unitid and CheckInteractDistance(unitid, DAMAGE_RANGE) then
local message = L["STOP IT"] .. ": " .. originName .. " " .. L["DISPELLED Displaced Energy TOO CLOSE TO OTHERS!!!"]
mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_DISPEL(): " .. MESSAGE_BOILER:format(message))
 
238,7 → 238,7
 
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)
-- Malkorok has done damage to SOMEONE, spit out a diagnostic
if originName == L["Malkorok"] and spellId == SPELL_ID_DISPLACED_ENERGY then
if spellId == SPELL_ID_DISPLACED_ENERGY and originName == L["Malkorok"] then
local unitid = UnitGUIdRMap[targetGUId] -- get the afflicted unit's unitid
-- mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_PERIODIC_DAMAGE(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellName) .. "/" .. tostring(spellSchool) .. " || " .. tostring(originGUId) .. "/" .. tostring(originName) .. " -> " .. tostring(targetGUId) .. "/" .. tostring(targetName))
mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_PERIODIC_DAMAGE(): " .. tostring(originName) .. "/" .. tostring(originGUId)
246,7 → 246,7
end
 
-- if "Displaced Energy" (by spellid) from "Malkorok" does damage to ME...
if originName == L["Malkorok"] and spellId == SPELL_ID_DISPLACED_ENERGY and targetGUId == PLAYER_GUID then
if DisplacedEnergyNazi.db.profile.warnDamage and spellId == SPELL_ID_DISPLACED_ENERGY and originName == L["Malkorok"] and targetGUId == PLAYER_GUID then
-- iterate all units currently afflicted, to see if any are close enough to ME to cause damage, and append those names together
local names = nil
for unitGUId in pairs(UnitAfflictedList) do
294,20 → 294,22
-- mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_AURA_APPLIED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellName) .. "/" .. tostring(auraType) .. " || " .. tostring(originGUId) .. "/" .. tostring(originName) .. " -> " .. tostring(targetGUId) .. "/" .. tostring(targetName))
-- end
 
if originName == L["Malkorok"] and spellId == SPELL_ID_DISPLACED_ENERGY then
if spellId == SPELL_ID_DISPLACED_ENERGY and originName == L["Malkorok"] then
mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_AURA_APPLIED(): " .. tostring(originName) .. "/" .. tostring(originGUId)
.. " " .. tostring(spellName) .. "/" .. tostring(spellId)
.. " afflicts " .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId))
 
UnitCleanList[targetGUId] = nil
UnitAfflictedList[targetGUId] = true
UnitRemovedList[targetGUId] = nil
if DisplacedEnergyNazi.db.profile.warnAfflict then
UnitCleanList[targetGUId] = nil
UnitAfflictedList[targetGUId] = true
UnitRemovedList[targetGUId] = nil
 
local message = L["GET AWAY"] .. ": " .. targetName .. " " .. L["AFFLICTED with Displaced Energy!!!"]
mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_AURA_APPLIED(): " .. MESSAGE_BOILER:format(message))
local message = L["GET AWAY"] .. ": " .. targetName .. " " .. L["AFFLICTED with Displaced Energy!!!"]
mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_AURA_APPLIED(): " .. MESSAGE_BOILER:format(message))
 
WhisperMessage(targetName, message)
BroadcastMessage(message)
WhisperMessage(targetName, message)
BroadcastMessage(message)
end
end
end
 
316,7 → 318,7
-- mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_AURA_REMOVED(): " .. tostring(subtype) .. "/" .. tostring(spellId) .. "/" .. tostring(spellName) .. "/" .. tostring(auraType) .. " || " .. tostring(originGUId) .. "/" .. tostring(originName) .. " -> " .. tostring(targetGUId) .. "/" .. tostring(targetName))
-- end
 
if originName == L["Malkorok"] and spellId == SPELL_ID_DISPLACED_ENERGY then
if spellId == SPELL_ID_DISPLACED_ENERGY and originName == L["Malkorok"] then
mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:SPELL_AURA_REMOVED(): " .. tostring(originName) .. "/" .. tostring(originGUId)
.. " " .. tostring(spellName) .. "/" .. tostring(spellId)
.. " fades from " .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId))
330,7 → 332,7
local function unit_died(timestamp, subtype, originGUId, originName, originFlags, originFlags2, targetGUId, targetName, targetFlags)
-- mseq = mseq + 1; ChatFrame7:AddMessage(("%08d "):format(mseq) .. "DisplacedEnergyNazi:UNIT_DIED(): " .. tostring(subtype) .. " || " .. tostring(originGUId) .. "/" .. tostring(originName) .. " -> " .. tostring(targetGUId) .. "/" .. tostring(targetName))
 
local unitid = UnitGUIdRMap[targetGUId]
local unitid = UnitGUIdRMap[targetGUId] -- TODO: is this even necessary?
if unitid then
UnitCleanList[targetGUId] = true
UnitAfflictedList[targetGUId] = nil