fix some multi-select context actions not working in raid
This commit is contained in:
@@ -239,11 +239,8 @@ namespace UIFixes
|
||||
{
|
||||
if (!allOrNothing || InteractionCount(EItemInfoButton.Equip, itemUiContext) == Count)
|
||||
{
|
||||
foreach (ItemContextClass selectedItemContext in SortedItemContexts())
|
||||
{
|
||||
itemUiContext.QuickEquip(selectedItemContext.Item).HandleExceptions();
|
||||
}
|
||||
|
||||
var taskSerializer = itemUiContext.GetOrAddComponent<ItemContextTaskSerializer>();
|
||||
taskSerializer.Initialize(SortedItemContexts(), itemContext => itemUiContext.QuickEquip(itemContext.Item));
|
||||
itemUiContext.Tooltip?.Close();
|
||||
}
|
||||
}
|
||||
@@ -252,11 +249,8 @@ namespace UIFixes
|
||||
{
|
||||
if (!allOrNothing || InteractionCount(EItemInfoButton.Unequip, itemUiContext) == Count)
|
||||
{
|
||||
foreach (ItemContextClass selectedItemContext in SortedItemContexts())
|
||||
{
|
||||
itemUiContext.Uninstall(selectedItemContext.GClass2813_0).HandleExceptions();
|
||||
}
|
||||
|
||||
var taskSerializer = itemUiContext.GetOrAddComponent<ItemContextTaskSerializer>();
|
||||
taskSerializer.Initialize(SortedItemContexts(), itemContext => itemUiContext.Uninstall(itemContext.GClass2813_0));
|
||||
itemUiContext.Tooltip?.Close();
|
||||
}
|
||||
}
|
||||
@@ -265,11 +259,8 @@ namespace UIFixes
|
||||
{
|
||||
if (!allOrNothing || InteractionCount(EItemInfoButton.UnloadAmmo, itemUiContext) == Count)
|
||||
{
|
||||
foreach (ItemContextClass selectedItemContext in SortedItemContexts())
|
||||
{
|
||||
itemUiContext.UnloadAmmo(selectedItemContext.Item).HandleExceptions();
|
||||
}
|
||||
|
||||
var taskSerializer = itemUiContext.GetOrAddComponent<ItemContextTaskSerializer>();
|
||||
taskSerializer.Initialize(SortedItemContexts(), itemContext => itemUiContext.UnloadAmmo(itemContext.Item));
|
||||
itemUiContext.Tooltip?.Close();
|
||||
}
|
||||
}
|
||||
@@ -328,6 +319,9 @@ namespace UIFixes
|
||||
}
|
||||
}
|
||||
|
||||
// Specific type of TaskSerializer because Unity can't understand generics
|
||||
public class ItemContextTaskSerializer : TaskSerializer<ItemContextClass> { }
|
||||
|
||||
public static class MultiSelectExtensions
|
||||
{
|
||||
public static bool IsSelectable(this ItemView itemView)
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace UIFixes
|
||||
____text.text += " (x" + count + ")";
|
||||
}
|
||||
}
|
||||
else if (caption == EItemInfoButton.UnloadAmmo.ToString())
|
||||
else if (caption == EItemInfoButton.UnloadAmmo.ToString()))
|
||||
{
|
||||
int count = MultiSelect.InteractionCount(EItemInfoButton.UnloadAmmo, ItemUiContext.Instance);
|
||||
if (count > 0)
|
||||
|
||||
@@ -34,9 +34,6 @@ namespace UIFixes
|
||||
private static bool DisableMerge = false;
|
||||
private static bool IgnoreItemParent = false;
|
||||
|
||||
// Specific type of TaskSerializer because Unity can't understand generics
|
||||
public class ItemContextTaskSerializer : TaskSerializer<ItemContextClass> { }
|
||||
|
||||
public static void Enable()
|
||||
{
|
||||
// Initialization
|
||||
|
||||
Reference in New Issue
Block a user