Quantcast WoWInterface: SVN - KillingBlows - Diff - Rev 8 and 7 - /trunk/KillingBlows/KillingBlows.lua

WoWInterface SVN KillingBlows

[/] [trunk/] [KillingBlows/] [KillingBlows.lua] - Diff between revs 7 and 8

Show entire file | Details | Blame | View Log

Rev 7 Rev 8
Line 1... Line 1...
---------------------------------------------------------
---------------------------------------------------------
-- KillingBlows
-- KillingBlows
---------------------------------------------------------
---------------------------------------------------------
KillDB = KillDB or { Enabled = true }
KillDB = KillDB or { Enabled = true }
local KillTimer, KillCounter
local KillTimer, KillCounter
 
local KB_FILTER_ENEMY = bit.bor(
 
        COMBATLOG_OBJECT_AFFILIATION_PARTY,
 
        COMBATLOG_OBJECT_AFFILIATION_RAID,
 
        COMBATLOG_OBJECT_AFFILIATION_OUTSIDER,
 
        COMBATLOG_OBJECT_REACTION_NEUTRAL,
 
        COMBATLOG_OBJECT_REACTION_HOSTILE,
 
        COMBATLOG_OBJECT_CONTROL_PLAYER,
 
        COMBATLOG_OBJECT_TYPE_PLAYER
 
)
---------------------------------------------------------
---------------------------------------------------------
local OnLoad = function(self)
local OnLoad = function(self)
        self:UnregisterEvent("VARIABLES_LOADED")
        self:UnregisterEvent("VARIABLES_LOADED")
        SLASH_KillingBlow1 = "/killblow"
        SLASH_KillingBlow1 = "/killblow"
        SlashCmdList["KillingBlow"] = function()
        SlashCmdList["KillingBlow"] = function()
Line 17... Line 26...
        if (event == "VARIABLES_LOADED") then
        if (event == "VARIABLES_LOADED") then
                OnLoad(self)
                OnLoad(self)
        elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
        elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
                local _, cmbEvent, sGUID, _, _, _, _, dFlag = select(1, ...)
                local _, cmbEvent, sGUID, _, _, _, _, dFlag = select(1, ...)
                if (cmbEvent == "PARTY_KILL") then
                if (cmbEvent == "PARTY_KILL") then
                        if (sGUID == UnitGUID("player") and CombatLog_Object_IsA(dFlag, COMBATLOG_FILTER_HOSTILE_PLAYERS) and KillDB.Enabled) then
                        if (sGUID == UnitGUID("player") and CombatLog_Object_IsA(dFlag, KB_FILTER_ENEMY) and KillDB.Enabled) then
                                if (not KillTimer or (GetTime() - KillTimer > 60)) then
                                if (not KillTimer or (GetTime() - KillTimer > 60)) then
                                        PlaySoundFile("Interface\\AddOns\\KillingBlows\\Sounds\\firstblood.mp3")
                                        PlaySoundFile("Interface\\AddOns\\KillingBlows\\Sounds\\firstblood.mp3")
                                        KillCounter = 0
                                        KillCounter = 0
                                elseif (GetTime() - KillTimer <= 60) then
                                elseif (GetTime() - KillTimer <= 60) then
                                        KillCounter = KillCounter + 1
                                        KillCounter = KillCounter + 1