Remove UnitIsUnit('player',X) checks, and change UnitName calls to use Details.playername
This commit is contained in:
@@ -601,7 +601,7 @@ hooksecurefunc (_G, "DeathRecap_LoadUI", function()
|
||||
hooksecurefunc (_G, "DeathRecapFrame_OpenRecap", function(RecapID)
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
--get the player current death and link the death table with the death recapID
|
||||
local playerDeaths = currentCombat:GetPlayerDeaths(UnitName("player"))
|
||||
local playerDeaths = currentCombat:GetPlayerDeaths(Details.playername)
|
||||
if (playerDeaths) then
|
||||
local latestDeath = playerDeaths[#playerDeaths]
|
||||
if (latestDeath) then
|
||||
|
||||
@@ -151,13 +151,13 @@ local tickerCallback = function(tickerObject)
|
||||
--tick damage
|
||||
local totalPlayers = GetNumGroupMembers()
|
||||
for i = 1, totalPlayers-1 do
|
||||
local unitName, unitRealm = UnitName ("party" .. i)
|
||||
local unitName, unitRealm = UnitFullName ("party" .. i)
|
||||
if (unitName) then
|
||||
addPlayerDamage(unitName, unitRealm)
|
||||
end
|
||||
end
|
||||
|
||||
addPlayerDamage(UnitName("player"))
|
||||
addPlayerDamage(UnitFullName("player"))
|
||||
end
|
||||
|
||||
function mythicDungeonCharts:OnBossDefeated()
|
||||
|
||||
+2
-2
@@ -427,7 +427,7 @@ function Details.packFunctions.PackDamage(combatObject)
|
||||
local actorsToPack = {}
|
||||
|
||||
--get the player object from the combat > damage container
|
||||
local playerName = UnitName("player")
|
||||
local playerName = Details.playername
|
||||
local playerObject = combatObject:GetActor(DETAILS_ATTRIBUTE_DAMAGE, playerName)
|
||||
if (not playerObject) then
|
||||
if (isDebugging) then
|
||||
@@ -677,7 +677,7 @@ function Details.packFunctions.PackHeal(combatObject)
|
||||
local actorsToPack = {}
|
||||
|
||||
--get the player object from the combat > damage container
|
||||
local playerName = UnitName("player")
|
||||
local playerName = Details.playername
|
||||
local playerObject = combatObject:GetActor(DETAILS_ATTRIBUTE_HEAL, playerName)
|
||||
if (not playerObject) then
|
||||
if (isDebugging) then
|
||||
|
||||
@@ -21,7 +21,7 @@ function augmentationFunctions.BuffIn(token, time, sourceSerial, sourceName, sou
|
||||
end
|
||||
|
||||
elseif (spellId == 413984) then --ss
|
||||
if (UnitExists(targetName) and not UnitIsUnit("player", targetName)) then
|
||||
if (UnitExists(targetName) and targetName ~= Details.playername) then
|
||||
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName(targetName, spellId, sourceName)
|
||||
local versaGained = v1
|
||||
if (type(versaGained) == "number") then
|
||||
@@ -92,7 +92,7 @@ function augmentationFunctions.BuffRefresh(token, time, sourceSerial, sourceName
|
||||
end
|
||||
|
||||
elseif (spellId == 413984) then --ss
|
||||
if (UnitExists(targetName) and not UnitIsUnit("player", targetName)) then
|
||||
if (UnitExists(targetName) and targetName ~= Details.playername) then
|
||||
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName (targetName, spellId, sourceName)
|
||||
local versaGained = v1
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ function Details222.TimeCapture.StartCombatTimer(combatObject)
|
||||
Details222.TimeCapture.CombatTimeTicker = C_Timer.NewTicker(1, combatTimeTicker)
|
||||
|
||||
--debug: starting only for the player
|
||||
Details222.TimeCapture.Start(UnitName("player"), DETAILS_ATTRIBUTE_DAMAGE)
|
||||
Details222.TimeCapture.Start(Details.playername, DETAILS_ATTRIBUTE_DAMAGE)
|
||||
end
|
||||
|
||||
--combat ended on Details! end
|
||||
|
||||
Reference in New Issue
Block a user