Fixing stuff from latest alpha and more development
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user