+ Reply to Thread
Results 1 to 1 of 1

Thread: [Addon] Super Meter - Player Death Log

  1. #1
    Rift Chaser Ferather's Avatar
    Join Date
    Jun 2011
    Posts
    341

    Default [Addon] Super Meter - Player Death Log

    Hi Hi,
    I have recently added "Unknown Sources" to the Super Meter player death log, However in doing so ive noticed that sometimes it doesn't pickup the damage dealt, the units name or targets name, also sometimes instead of a target\caster name I get a blank name instead.

    Code:
    Code:
    function SuperMeter.Event.Damage(params)
    	if not SuperMeter_enabled then return end
    	if not SuperMeter.state.all.inCombat then return end
    
    	local caster = params.caster
    	local target = params.target
    	local damageType = params.type
    	local abilityName = params.abilityName
    	local allCaster = SuperMeter.state.all:GetUnit(caster, true)
    	local allTarget = SuperMeter.state.all:GetUnit(target, false)
    	local currentCaster = SuperMeter.state.encounters[SuperMeter.state.encounterIndex]:GetUnit(caster, true)
    	local currentTarget = SuperMeter.state.encounters[SuperMeter.state.encounterIndex]:GetUnit(target, false)
    
    	if damageType == nil then
    		damageType = "Physical"
    	elseif damageType == "air" then
    		damageType = "Air"
    	elseif damageType == "death" then
    		damageType = "Death"
    	elseif damageType == "earth" then
    		damageType = "Earth"
    	elseif damageType == "fire" then
    		damageType = "Fire"
    	elseif damageType == "life" then
    		damageType = "Life"
    	elseif damageType == "water" then
    		damageType = "Water"
    	end
    
    	if SuperMeter.state.all:IsPet(caster) then
    		abilityName = abilityName .. " (Pet) (" .. damageType .. ")"
    	else
    		abilityName = abilityName .. " (" .. damageType .. ")"
    	end
    
    	if params.overkill then
    		local Attack = "Unknown"
    		local Attacker = "Unknown"
    		local Critical = ""
    		local Damage = "Unknown"
    		local Absorbed = ""
    		local Blocked = ""
    		local Deflected = ""
    		local Overkill = ""
    		local Victim = "Unknown"
    		
    		if params.abilityName == "attack" then
    			params.abilityName = "Attack"
    		end
    		
    		if abilityName then
    			Attack = params.abilityName
    		end
    		if currentCaster then
    			Attacker = currentCaster.name
    		end
    		if currentTarget then
    			Victim = currentTarget.name
    		end
    		if params.damage then
    			Damage = params.damage
    		end
    		if params.crit then
    			Critical = " Critically"
    		end
    		if params.damageAbsorbed then
    			Absorbed = " (" .. params.damageAbsorbed .. " Absorbed)"
    		end
    		if params.damageBlocked then
    			Blocked = " (" .. params.damageBlocked .. " Blocked)"
    		end
    		if params.damageDeflected then
    			Deflected = " (" .. params.damageDeflected .. " Deflected)"
    		end
    		if params.overkill then
    			Overkill = " (" .. params.overkill .. " Overkill)"
    		end
    		
    		if currentTarget then
    			if currentTarget.player then
    				data = Attacker .. "'s " .. Attack .. Critical .. " Hits " .. Victim .. " For " .. Damage .. " " .. damageType .. " Damage" .. Absorbed .. Blocked .. Deflected .. Overkill .. ".\n"
    				table.insert(SuperMeter.state.encounters[SuperMeter.state.encounterIndex], data)
    				text = table.concat(SuperMeter.state.encounters[SuperMeter.state.encounterIndex])
    				table.insert(SuperMeter.state.all, data)
    				SuperMeter.UI.DeathLog:Show(text)
    			end
    		end
    	end
    end
    This leads me to believe something isn't updating fast enough or the information isnt being collected for some reason.

    An example:

    's Power Strike hits Ferather for unknown damage (Physical) (1 Overkill)

    Can anyone help?
    Last edited by Ferather; 09-12-2012 at 01:48 PM.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts