try/catch trader autoswitch
This commit is contained in:
@@ -3,6 +3,7 @@ using EFT.UI;
|
||||
using EFT.UI.DragAndDrop;
|
||||
using HarmonyLib;
|
||||
using SPT.Reflection.Patching;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
@@ -83,6 +84,8 @@ public static class TradingAutoSwitchPatches
|
||||
return true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!___bool_8 && ctrlPressed && assortmentController.QuickFindTradingAppropriatePlace(__instance.Item, null))
|
||||
{
|
||||
__instance.ItemContext?.CloseDependentWindows();
|
||||
@@ -102,6 +105,11 @@ public static class TradingAutoSwitchPatches
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.LogError(e);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user