using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AzuExtendedPlayerInventory; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ExtraSlots; using GUIFramework; using HarmonyLib; using JetBrains.Annotations; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using ServerSync; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Traders Extended")] [assembly: AssemblyDescription("")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyProduct("Traders Extended")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("6d6f243e-c80e-4a33-b2d0-a2657d3b9f7f")] [assembly: AssemblyFileVersion("1.3.13")] [assembly: AssemblyCompany("")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.13.0")] [module: UnverifiableCode] namespace TradersExtended { internal static class AmountDialog { [HarmonyPatch(typeof(StoreGui), "OnSelectedItem")] public static class StoreGui_OnSelectedItem_SelectItem { private static void Postfix() { OnSelectedTradeableItemClick(sellDialog: false); } } private static float clickTime; private static GameObject amountDialog; private static Slider sliderDialog; private static TMP_Text sliderTitle; private static TMP_Text sliderAmountText; private static TMP_Text sliderAmountCoinsText; private static TMP_Text sliderButtonOk; private static Image sliderImage; private static string sliderTitleText; private static string sliderButtonText; private static StoreGui storeGui; private const float m_splitNumInputTimeoutSec = 0.5f; private static string m_splitInput = ""; private static DateTime m_lastSplitInput; private static bool isSellDialog; public static GameObject Init(StoreGui store) { //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Expected O, but got Unknown //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Expected O, but got Unknown storeGui = store; amountDialog = Object.Instantiate(((Component)InventoryGui.instance.m_splitPanel).gameObject, storeGui.m_rootPanel.transform.parent); ((Object)amountDialog).name = "AmountDialog"; Transform val = amountDialog.transform.Find("win_bkg"); sliderTitle = ((Component)val.Find("Text")).GetComponent(); sliderDialog = ((Component)val.Find("Slider")).GetComponent(); sliderAmountText = ((Component)val.Find("amount")).GetComponent(); sliderImage = ((Component)val.Find("Icon_bkg/Icon")).GetComponent(); sliderButtonOk = ((Component)val.Find("Button_ok/Text")).GetComponent(); Transform val2 = val.Find("Icon_bkg"); GameObject val3 = Object.Instantiate(((Component)val2).gameObject, val); ((Object)val3).name = "Coins_bkg"; val3.transform.SetSiblingIndex(val2.GetSiblingIndex() + 1); Image component = ((Component)val3.transform.Find("Icon")).GetComponent(); component.sprite = storeGui.m_coinPrefab.m_itemData.GetIcon(); RectTransform component2 = val3.GetComponent(); component2.anchorMax += new Vector2(0.15f, 0f); component2.anchorMin += new Vector2(0.15f, 0f); RectTransform component3 = ((Component)val2).GetComponent(); component3.anchorMax -= new Vector2(0.15f, 0f); component3.anchorMin -= new Vector2(0.15f, 0f); GameObject val4 = Object.Instantiate(((Component)sliderAmountText).gameObject, val); ((Object)val4).name = "amount_coins"; val4.transform.SetSiblingIndex(sliderAmountText.transform.GetSiblingIndex() + 1); sliderAmountCoinsText = val4.GetComponent(); RectTransform component4 = ((Component)sliderAmountText).GetComponent(); component4.anchorMax -= new Vector2(0.15f, 0f); component4.anchorMin -= new Vector2(0.15f, 0f); RectTransform component5 = val4.GetComponent(); component5.anchorMax += new Vector2(0.15f, 0f); component5.anchorMin += new Vector2(0.15f, 0f); GameObject val5 = Object.Instantiate(((Component)sliderTitle).gameObject, val); ((Object)val5).name = "equal"; val5.transform.SetSiblingIndex(sliderTitle.transform.GetSiblingIndex() + 1); RectTransform component6 = val5.GetComponent(); component6.anchorMin -= new Vector2(0f, 0.5f); val5.GetComponent().SetText("="); ((UnityEvent)(object)sliderDialog.onValueChanged).AddListener((UnityAction)OnSplitSliderChanged); ((UnityEvent)((Component)val.Find("Button_ok")).GetComponent