*** Skada.lua Mon May 31 20:04:07 2010 --- Skada.lua.patched Tue Jun 1 15:24:30 2010 *************** function Skada:COMBAT_LOG_EVENT_UNFILTER *** 1645,1650 **** --- 1645,1665 ---- local dst_is_interesting = nil local src_is_interesting_nopets = nil local dst_is_interesting_nopets = nil + local xdamage_event = nil + + if srcName and dstName and srcGUID ~= dstGUID and (eventtype == 'SPELL_DAMAGE' or eventtype == 'SPELL_BUILDING_DAMAGE' or eventtype == 'RANGE_DAMAGE' or eventtype == 'SWING_DAMAGE' or eventtype == 'SPELL_PERIODIC_DAMAGE') then + -- AWS: Storing result for these conditionals for use below + xdamage_event = true + if not self.current then + src_is_interesting = band(srcFlags, RAID_FLAGS) ~= 0 or (band(srcFlags, PET_FLAGS) ~= 0 and pets[srcGUID]) + -- AWS: To avoid incoming periodic damage (e.g. from a debuff) triggering combat, we simply do not initialize + -- dst_is_interesting for periodic damage... + if eventtype ~= 'SPELL_PERIODIC_DAMAGE' then + dst_is_interesting = band(dstFlags, RAID_FLAGS) ~= 0 or (band(dstFlags, PET_FLAGS) ~= 0 and pets[dstGUID]) + end + if src_is_interesting or dst_is_interesting then self:StartCombat() end + end + end if self.current and combatlogevents[eventtype] then for i, mod in ipairs(combatlogevents[eventtype]) do *************** function Skada:COMBAT_LOG_EVENT_UNFILTER *** 1710,1724 **** end end ! -- Detect combat start. ! -- Not happy about this, really. Why can't there be a UNIT_ENTERED_COMBAT? ! --[[ ! if not self.current and srcName and srcGUID ~= dstGUID and dstName and src_is_interesting and (eventtype == 'SPELL_DAMAGE' or eventtype == 'SPELL_PERIODIC_DAMAGE' or eventtype == 'SPELL_BUILDING_DAMAGE' or eventtype == 'RANGE_DAMAGE' or eventtype == "SWING_DAMAGE") then ! self:StartCombat() ! else ! --]] ! ! if self.current and srcName and srcGUID ~= dstGUID and dstName and src_is_interesting and (eventtype == 'SPELL_DAMAGE' or eventtype == 'SPELL_PERIODIC_DAMAGE' or eventtype == 'SPELL_BUILDING_DAMAGE' or eventtype == 'RANGE_DAMAGE' or eventtype == "SWING_DAMAGE") then -- Store mob name for set name. For now, just save first unfriendly name available, or first boss available. if not self.current.gotboss and boss.BossIDs[tonumber(dstGUID:sub(9, 12), 16)] then self.current.mobname = dstName --- 1725,1731 ---- end end ! if self.current and src_is_interesting and xdamage_event then -- Store mob name for set name. For now, just save first unfriendly name available, or first boss available. if not self.current.gotboss and boss.BossIDs[tonumber(dstGUID:sub(9, 12), 16)] then self.current.mobname = dstName