@@ -745,8 +745,36 @@ public async Task<List<IItemModel>> GetSameModelList(IItemModel item)
745
745
var slot = item . GetItemSlotAbbreviation ( ) ;
746
746
var imcEntries = info . GetAllEntries ( slot ) ;
747
747
748
+ if ( sameModelItems . Any ( x => x . ModelInfo . ImcSubsetID != 0 ) )
749
+ {
750
+ // Need to list default IMC set.
751
+ // Need to create a new item for it.
752
+ var npcItem = new XivGear ( )
753
+ {
754
+ Name = "NPC Equipment e" + item . ModelInfo . PrimaryID + " " + slot + " Default Variant" ,
755
+ ModelInfo = new XivGearModelInfo ( ) ,
756
+ PrimaryCategory = item . PrimaryCategory ,
757
+ SecondaryCategory = item . SecondaryCategory ,
758
+ TertiaryCategory = item . TertiaryCategory ,
759
+ DataFile = item . DataFile ,
760
+ } ;
761
+ npcItem . ModelInfo . PrimaryID = item . ModelInfo . PrimaryID ;
762
+ npcItem . ModelInfo . SecondaryID = item . ModelInfo . SecondaryID ;
763
+ npcItem . ModelInfo . ImcSubsetID = 0 ;
764
+ try
765
+ {
766
+ ( ( XivGearModelInfo ) npcItem . ModelInfo ) . IsWeapon = ( ( XivGearModelInfo ) item . ModelInfo ) . IsWeapon ;
767
+ }
768
+ catch
769
+ {
770
+ // No-op. Should never actually get here, but safety check on the cast.
771
+ }
772
+
773
+ sameModelItems . Add ( npcItem ) ;
774
+ }
775
+
748
776
// Need to verify all of our IMC sets are properly represented in the item list.
749
- for ( int i = 0 ; i < imcEntries . Count ; i ++ )
777
+ for ( int i = 1 ; i <= imcEntries . Count ; i ++ )
750
778
{
751
779
// Already in it. All set.
752
780
if ( sameModelItems . Any ( x => x . ModelInfo . ImcSubsetID == i ) ) continue ;
0 commit comments