Fixed the issue 'Segment Not Found' while resetting data
- Fixed the issue 'Segment Not Found' while resetting data.
This commit is contained in:
parent
4d9a0d5a02
commit
443c0af3ab
2 changed files with 15 additions and 4 deletions
|
|
@ -238,10 +238,16 @@ local instanceMixins = {
|
|||
else
|
||||
---@type combat
|
||||
local combatObject = Details:GetCombat(segmentId)
|
||||
if (combatObject.__destroyed) then
|
||||
table.remove(Details:GetCombatSegments(), segmentId)
|
||||
combatObject = combatClass:NovaTabela()
|
||||
table.insert(Details:GetCombatSegments(), segmentId, combatObject)
|
||||
if (not combatObject) then
|
||||
instance:SetSegmentId(DETAILS_SEGMENTID_CURRENT)
|
||||
instance:RefreshCombat()
|
||||
return
|
||||
else
|
||||
if (combatObject.__destroyed) then
|
||||
table.remove(Details:GetCombatSegments(), segmentId)
|
||||
combatObject = combatClass:NovaTabela()
|
||||
table.insert(Details:GetCombatSegments(), segmentId, combatObject)
|
||||
end
|
||||
end
|
||||
instance.showing = combatObject
|
||||
end
|
||||
|
|
@ -403,6 +409,10 @@ local instanceMixins = {
|
|||
return instance.segmento
|
||||
end,
|
||||
|
||||
SetSegmentId = function(instance, segmentId)
|
||||
instance.segmento = segmentId
|
||||
end,
|
||||
|
||||
---return the mais attribute id and the sub attribute
|
||||
---@param instance instance
|
||||
---@return attributeid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue