mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 14:27:50 +01:00
Fix deleting active collections.
This commit is contained in:
parent
efdece613a
commit
ff2b9de93e
1 changed files with 10 additions and 2 deletions
|
|
@ -7,7 +7,6 @@ using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Penumbra.GameData.Actors;
|
|
||||||
|
|
||||||
namespace Penumbra.Collections;
|
namespace Penumbra.Collections;
|
||||||
|
|
||||||
|
|
@ -148,13 +147,22 @@ public partial class ModCollection
|
||||||
SetCollection( Empty.Index, CollectionType.Default );
|
SetCollection( Empty.Index, CollectionType.Default );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for( var i = 0; i < _specialCollections.Length; ++i )
|
||||||
|
{
|
||||||
|
if( idx == _specialCollections[ i ]?.Index )
|
||||||
|
{
|
||||||
|
SetCollection( Empty, ( CollectionType )i );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for( var i = 0; i < Individuals.Count; ++i )
|
for( var i = 0; i < Individuals.Count; ++i )
|
||||||
{
|
{
|
||||||
if( Individuals[ i ].Collection.Index == idx )
|
if( Individuals[ i ].Collection.Index == idx )
|
||||||
{
|
{
|
||||||
Individuals.ChangeCollection( i, Empty );
|
SetCollection( Empty, CollectionType.Individual, i );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var collection = _collections[ idx ];
|
var collection = _collections[ idx ];
|
||||||
|
|
||||||
// Clear own inheritances.
|
// Clear own inheritances.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue