Fixing stuff from latest alpha and more development

This commit is contained in:
Tercio Jose
2023-05-30 15:45:50 -03:00
parent 0cdfa2b900
commit 9021a4de4d
31 changed files with 1549 additions and 1873 deletions
+7 -7
View File
@@ -286,11 +286,11 @@ do
---@type actor, actorcontainer, number
local actorObject, actorContainer, attempts = payload[1], payload[2], payload[3]
if (not actorObject) then
if (not actorObject or actorObject.__destroyed) then
return false
end
local spellContainerNames = actorObject:GetSpellContainerNames()
local spellContainerNames = actorObject:GetSpellContainerNames() --1x Details/functions/playerclass.lua:293: attempt to call method 'GetSpellContainerNames' (a nil value)
for i = 1, #spellContainerNames do
local spellContainer = actorObject:GetSpellContainer(spellContainerNames[i])
if (spellContainer) then
@@ -348,7 +348,7 @@ do
function Details:GuessSpec(payload)
---@type actor, actorcontainer, number
local actorObject, actorContainer, attempts = payload[1], payload[2], payload[3]
if (not actorObject) then
if (not actorObject or actorObject.__destroyed) then
return false
end
@@ -365,7 +365,7 @@ do
if (not actorSpec) then
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0", true)
if (openRaidLib) then
local unitInfo = openRaidLib.GetUnitInfo(actorObject:Name())
local unitInfo = openRaidLib.GetUnitInfo(actorObject:Name()) --1x Details/functions/playerclass.lua:368: attempt to call method 'Name' (a nil value)
if (unitInfo and unitInfo.specId and unitInfo.specId ~= 0) then
actorSpec = unitInfo.specId
end
@@ -379,7 +379,7 @@ do
--attempt to get from the spells the actor used in the current combat
if (not actorSpec) then
local currentCombatObject = Details:GetCombat(DETAILS_SEGMENTID_CURRENT)
local currentCombatObject = Details:GetCurrentCombat()
for containerId = 1, DETAILS_COMBAT_AMOUNT_CONTAINERS do
if (actorSpec) then
break
@@ -472,9 +472,9 @@ do
Details:ScheduleTimer("GuessSpec", 1, payload) --todo: replace schedule from ace3 and use our own
end
else
if (attempts and attempts < 10) then
if (attempts and attempts < 4) then
payload[3] = attempts + 1
Details:ScheduleTimer("GuessSpec", 3, payload)
Details:ScheduleTimer("GuessSpec", 4, payload)
end
end