WoWInterface SVN mikma

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /DeathNote
    from Rev 497 to Rev 504
    Reverse comparison

Rev 497 → Rev 504

DeathNote.lua
19,14 → 19,23
if self[event] then return self[event](self, event, ...) end
end)
 
local ZoneBlacklist = {
[4] = 11, -- Wintergrasp
}
local function IsBlacklistedZone(zone,continent)
for k,v in pairs(ZoneBlacklist) do
if zone == k and continent == v then
return true
end
end
end
 
local function ZoneCheck()
local instancetype = select(2,GetInstanceInfo())
if instancetype == "none" then
print("DeathNote:Enable()")
DeathNote:Enable()
pvpzone = nil
else
print("DeathNote:Disable()")
DeathNote:Disable()
pvpzone = true
end
63,32 → 72,34
end
 
function f:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, minievent, guidsource, source, sourceflags, ...)
if (minievent == "SWING_DAMAGE" or minievent == "SPELL_DAMAGE" or minievent == "SPELL_PERIODIC_DAMAGE") and checksourceflags(sourceflags) then
lastdamage = source
end
if minievent == "UNIT_DIED" and lastdamage then
local playername = UnitName("player")
if select(2,...) == playername then
local nameexists = false
local zonename = GetZoneText()
local note = "Killed "..playername.." in "..zonename
if DeathNoteDB.autoadd then
for k,v in pairs(DeathNoteDB[realmName]) do
if string.lower(v[1]) == string.lower(lastdamage) then
v[2] = note
nameexists = true
if not IsBlacklistedZone() then
if (minievent == "SWING_DAMAGE" or minievent == "SPELL_DAMAGE" or minievent == "SPELL_PERIODIC_DAMAGE") and checksourceflags(sourceflags) then
lastdamage = source
end
if minievent == "UNIT_DIED" and lastdamage then
local playername = UnitName("player")
if select(2,...) == playername then
local nameexists = false
local zonename = GetZoneText()
local note = "Killed "..playername.." in "..zonename
if DeathNoteDB.autoadd then
for k,v in pairs(DeathNoteDB[realmName]) do
if string.lower(v[1]) == string.lower(lastdamage) then
v[2] = note
nameexists = true
end
end
if not nameexists then
print("DeathNote: "..lastdamage.." damaged you before you died. Adding in the list.")
table.insert(DeathNoteDB[realmName],{lastdamage,note})
end
end
if not nameexists then
print("DeathNote: "..lastdamage.." damaged you before you died. Adding in the list.")
table.insert(DeathNoteDB[realmName],{lastdamage,note})
if DeathNoteDB.noteshare and GetNumPartyMembers() > 1 then
SendAddonMessage("DEATHNOTE",lastdamage.."|"..note,"PARTY")
end
end
if DeathNoteDB.noteshare and GetNumPartyMembers() > 1 then
SendAddonMessage("DEATHNOTE",lastdamage.."|"..note,"PARTY")
end
lastdamage = nil
end
lastdamage = nil
end
end
 
362,7 → 373,7
if not b then
ShowItemRefTooltip()
else
local string = DeathNoteDB[realmName][b][1].."|"..DeathNoteDB[realmName][b][2]
local string = DeathNoteDB[realmName][tonumber(b)][1].."|"..DeathNoteDB[realmName][tonumber(b)][2]
if GetNumPartyMembers() > 1 then
SendAddonMessage("DEATHNOTE",string,"PARTY")
end
DeathNote.toc
3,7 → 3,7
## Title: DeathNote
## Notes: Prepares hostile players for their death.
## SavedVariables: DeathNoteDB
## Version: 1.3
## Version: 1.2
 
TooltipSpacerLine.lua
DeathNote.lua
\ No newline at end of file