Fixing stuff from latest alpha and more development
This commit is contained in:
@@ -133,8 +133,8 @@ function Details:CreateCallbackListeners()
|
||||
end
|
||||
|
||||
current_encounter = false
|
||||
Details:Destroy (current_table_dbm)
|
||||
Details:Destroy (current_table_bigwigs)
|
||||
Details:Destroy(current_table_dbm)
|
||||
Details:Destroy(current_table_bigwigs)
|
||||
end
|
||||
end)
|
||||
event_frame:RegisterEvent("ENCOUNTER_START")
|
||||
|
||||
+6
-2
@@ -5,11 +5,11 @@ local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0", true)
|
||||
local addonName, Details222 = ...
|
||||
|
||||
local actorSpellContainers = {
|
||||
"debuff", "buff", "spell", "cooldowns"
|
||||
"debuff", "buff", "spell", "cooldowns", "crowdcontrol"
|
||||
}
|
||||
|
||||
Details222.Mixins.ActorMixin = {
|
||||
---return a table containing the spellContainers names: 'debuff', 'buff', 'spell', 'cooldowns'
|
||||
---return a table containing the spellContainers names: 'debuff', 'buff', 'spell', 'cooldowns', 'crowdcontrol'
|
||||
---@return string[]
|
||||
GetSpellContainerNames = function()
|
||||
return actorSpellContainers
|
||||
@@ -31,6 +31,10 @@ Details222.Mixins.ActorMixin = {
|
||||
|
||||
elseif (containerType == "cooldowns") then
|
||||
return actor.cooldowns_defensive_spells
|
||||
|
||||
elseif (containerType == "crowdcontrol") then
|
||||
---@cast actor actorutility
|
||||
return actor.cc_done_spells
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
@@ -809,7 +809,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
|
||||
--reset spec cache if broadcaster requested
|
||||
if (Details.streamer_config.reset_spec_cache) then
|
||||
Details:Destroy (Details.cached_specs)
|
||||
Details:Destroy(Details.cached_specs)
|
||||
end
|
||||
|
||||
C_Timer.After(0.5, DetailsMythicPlusFrame.OnChallengeModeStart)
|
||||
|
||||
@@ -114,7 +114,7 @@ function Details:RefreshPlaterIntegration()
|
||||
if (Plater and Details.plater.realtime_dps_enabled or Details.plater.realtime_dps_player_enabled or Details.plater.damage_taken_enabled) then
|
||||
|
||||
--wipe the cache
|
||||
Details:Destroy (plater_integration_frame.DamageTaken)
|
||||
Details:Destroy(plater_integration_frame.DamageTaken)
|
||||
|
||||
--read cleu events
|
||||
plater_integration_frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+2
-60
@@ -275,7 +275,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
local segmentToErase = tonumber(segmentId)
|
||||
local combatObject = tremove(Details.tabela_historico.tabelas, segmentToErase)
|
||||
if (combatObject) then
|
||||
Details:Destroy(combatObject)
|
||||
Details:DestroyCombat(combatObject)
|
||||
Details:Msg("segment removed.")
|
||||
collectgarbage()
|
||||
else
|
||||
@@ -1361,7 +1361,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
for i = 25, 1, -1 do
|
||||
local pastCombat = segmentHistory [i]
|
||||
if (pastCombat and pastCombat ~= newCombat) then
|
||||
Details:Destroy(pastCombat)
|
||||
Details:DestroyCombat(pastCombat)
|
||||
segmentHistory [i] = nil
|
||||
end
|
||||
end
|
||||
@@ -1575,64 +1575,6 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
elseif (msg == "survey") then
|
||||
Details.Survey.OpenSurveyPanel()
|
||||
|
||||
elseif (msg == "share") then
|
||||
|
||||
local f = {}
|
||||
|
||||
local elapsed = GetTime()
|
||||
|
||||
local ignoredKeys = {
|
||||
minha_barra = true,
|
||||
__index = true,
|
||||
shadow = true,
|
||||
links = true,
|
||||
__call = true,
|
||||
_combat_table = true,
|
||||
previous_combat = true,
|
||||
owner = true,
|
||||
}
|
||||
|
||||
local keys = {}
|
||||
|
||||
--copy from table2 to table1 overwriting values
|
||||
function f.copy(t1, t2)
|
||||
if (t1.Timer) then
|
||||
t1, t2 = t1.t1, t1.t2
|
||||
end
|
||||
for key, value in pairs(t2) do
|
||||
if (not ignoredKeys [key] and type(value) ~= "function") then
|
||||
if (key == "targets") then
|
||||
t1 [key] = {}
|
||||
|
||||
elseif (type(value) == "table") then
|
||||
t1 [key] = t1 [key] or {}
|
||||
|
||||
--print(key, value)
|
||||
--local d = C_Timer.NewTimer(1, f.copy)
|
||||
--d.t1 = t1 [key]
|
||||
--d.t2 = t2 [key]
|
||||
--d.Timer = true
|
||||
|
||||
keys [key] = true
|
||||
|
||||
f.copy(t1 [key], t2 [key])
|
||||
else
|
||||
t1 [key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
return t1
|
||||
end
|
||||
|
||||
--local copySegment = f.copy({}, _detalhes.tabela_vigente)
|
||||
local copySegment = f.copy({}, Details.tabela_historico.tabelas [2])
|
||||
|
||||
--the segment received is raw and does not have metatables, need to refresh them
|
||||
local zipData = Details:CompressData (copySegment, "print")
|
||||
|
||||
--print(zipData)
|
||||
--Details:Dump (keys)
|
||||
Details:Dump ({zipData})
|
||||
else
|
||||
|
||||
--if (_detalhes.opened_windows < 1) then
|
||||
|
||||
@@ -253,6 +253,7 @@ do
|
||||
customItemList[388948] = {itemId = 193732} --trinket: Globe of Jagged Ice
|
||||
customItemList[381760] = {itemId = 193786, isPassive = true} --trinket: Mutated Magmammoth Scale (melee)
|
||||
customItemList[389839] = {itemId = 193757, isPassive = true} --trinket: Ruby Whelp Shell
|
||||
customItemList[401428] = {itemId = 202615, isPassive = true} --trinket: Vessel of Searing Shadow
|
||||
end
|
||||
|
||||
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
|
||||
@@ -392,11 +393,21 @@ do
|
||||
return
|
||||
end
|
||||
|
||||
local spellName, rank, spellIcon = GetSpellInfo(spellId)
|
||||
--do nothing if the spell is already cached
|
||||
local spellInfo = rawget(Details.spellcache, spellId)
|
||||
if (spellInfo) then
|
||||
return
|
||||
end
|
||||
|
||||
local spellName, rank, spellIcon = Details.GetSpellInfo(spellId)
|
||||
if (not spellName) then
|
||||
spellName, rank, spellIcon = GetSpellInfo(spellId)
|
||||
end
|
||||
|
||||
if (spellName) then
|
||||
rawset (Details.spellcache, spellId, {spellName .. Loc ["STRING_DOT"], rank, spellIcon})
|
||||
rawset(Details.spellcache, spellId, {spellName .. Loc ["STRING_DOT"], rank, spellIcon})
|
||||
else
|
||||
rawset (Details.spellcache, spellId, {"Unknown DoT Spell? " .. Loc ["STRING_DOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]})
|
||||
rawset(Details.spellcache, spellId, {"Unknown DoT Spell? " .. Loc ["STRING_DOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]})
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user