diff --git a/Penumbra/Mods/ItemSwap/EquipmentSwap.cs b/Penumbra/Mods/ItemSwap/EquipmentSwap.cs index 4f49ef62..a1de7b7a 100644 --- a/Penumbra/Mods/ItemSwap/EquipmentSwap.cs +++ b/Penumbra/Mods/ItemSwap/EquipmentSwap.cs @@ -60,7 +60,8 @@ public static class EquipmentSwap foreach( var slot in ConvertSlots( slotFrom, rFinger, lFinger ) ) { (var imcFileFrom, var variants, affectedItems) = GetVariants( slot, idFrom, idTo, variantFrom ); - var imcFileTo = new ImcFile( new ImcManipulation( slot, variantTo, idTo.Value, default ) ); + var imcManip = new ImcManipulation( slot, variantTo, idTo.Value, default ); + var imcFileTo = new ImcFile( imcManip); var isAccessory = slot.IsAccessory(); var estType = slot switch @@ -72,7 +73,7 @@ public static class EquipmentSwap var skipFemale = false; var skipMale = false; - var mtrlVariantTo = imcFileTo.GetEntry( ImcFile.PartIndex( slot ), variantTo ).MaterialId; + var mtrlVariantTo = manips( imcManip.Copy( imcFileTo.GetEntry( ImcFile.PartIndex( slot ), variantTo ) ) ).Imc.Entry.MaterialId; foreach( var gr in Enum.GetValues< GenderRace >() ) { switch( gr.Split().Item1 ) diff --git a/Penumbra/UI/Classes/ItemSwapWindow.cs b/Penumbra/UI/Classes/ItemSwapWindow.cs index 69a4494c..cbef6c19 100644 --- a/Penumbra/UI/Classes/ItemSwapWindow.cs +++ b/Penumbra/UI/Classes/ItemSwapWindow.cs @@ -421,7 +421,7 @@ public class ItemSwapWindow : IDisposable if( _affectedItems is { Length: > 1 } ) { ImGui.SameLine(); - ImGuiUtil.DrawTextButton( $"which will also affect {_affectedItems.Length} other Items.", Vector2.Zero, Colors.PressEnterWarningBg ); + ImGuiUtil.DrawTextButton( $"which will also affect {_affectedItems.Length - 1} other Items.", Vector2.Zero, Colors.PressEnterWarningBg ); if( ImGui.IsItemHovered() ) { ImGui.SetTooltip( string.Join( '\n', _affectedItems.Where( i => !ReferenceEquals( i, targetSelector.CurrentSelection.Item2 ) )