WoWInterface SVN DisplacedEnergyNazi

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 7 to Rev 8
    Reverse comparison

Rev 7 → Rev 8

DisplacedEnergyNazi/DisplacedEnergyNazi.lua
121,9 → 121,8
local function WhisperMessage(unitName, message)
if DisplacedEnergyNazi.db.profile.whisper then
if unitName and message then
-- SendChatMessage(message, "WHISPER", nil, unitName)
SendChatMessage(message, "WHISPER", nil, unitName)
end
-- SendChatMessage(message, "WHISPER", nil, "Felhoof") -- diagnostic, whispers the tester
end
end
 
240,7 → 239,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
local unitid = UnitGUIdRMap[unitGUId] -- get the afflicted unit's unitid
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)
.. " " .. tostring(spellName) .. "/" .. tostring(spellId) .. " damages " .. "/" .. tostring(targetName) .. "/" .. tostring(targetGUId) .. " @ " .. tostring(unitid) .. "/" .. tostring(unitid and CheckInteractDistance(unitid, DAMAGE_RANGE)))
254,13 → 253,28
local unitid = UnitGUIdRMap[unitGUId] -- get the afflicted unit's unitid
if unitid and CheckInteractDistance(unitid, DAMAGE_RANGE) then
local n, r = UnitName(unitid)
local fn = n .. (r and ("-" .. r)) or ""
 
-- whisper to individual player
WhisperMessage(fn, L["GET AWAY"] .. ": " .. fn .. " " .. L["Displaced Energy is DAMAGING OTHERS!!!"])
-- getting a "attempt to concatenate nil value" here
if n then
local fn = nil
if r then
fn = n .. "-" .. "r"
else
fn = n
end
 
-- accumulate all potential culprits, for global message
names = (names and (names .. ", " .. fn)) or fn
if fn then
-- whisper to individual player
WhisperMessage(fn, L["GET AWAY"] .. ": " .. fn .. " " .. L["Displaced Energy is DAMAGING OTHERS!!!"])
 
-- accumulate all potential culprits, for global message
if names then
names = names .. ", " .. fn
else
names = fn
end
end
end
end
end