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.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using JetBrains.Annotations; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using ServerSync; using SimpleMarket.Config; using SimpleMarket.Data; using SimpleMarket.Helpers; using SimpleMarket.Network; using SimpleMarket.Patches; using SimpleMarket.UI; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.UI; [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyCompany("SimpleMarket")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyProduct("SimpleMarket")] [assembly: AssemblyTitle("SimpleMarket")] [assembly: AssemblyInformationalVersion("0.9.7")] [assembly: AssemblyDescription("Valheim Mod")] [assembly: AssemblyFileVersion("0.9.7.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.9.7.0")] [module: UnverifiableCode] [module: <76161d1c-d8b2-46c0-a70b-1f9e658d779a>RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [Embedded] [CompilerGenerated] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class <76161d1c-d8b2-46c0-a70b-1f9e658d779a>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <76161d1c-d8b2-46c0-a70b-1f9e658d779a>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SimpleMarket { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("dumba.simplemarket", "SimpleMarket", "0.9.7")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class SimpleMarketPlugin : BaseUnityPlugin { [CompilerGenerated] private sealed class d__35 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public SimpleMarketPlugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__35(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown int num = <>1__state; SimpleMarketPlugin simpleMarketPlugin = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(60f); <>1__state = 1; return true; case 1: <>1__state = -1; break; case 2: <>1__state = -1; break; } if (IsServer() && simpleMarketPlugin.MarketDB != null) { int num2 = SimpleMarketConfig.ListingExpiryDays?.Value ?? 180; if (num2 > 0) { int num3 = simpleMarketPlugin.MarketDB.CleanupExpiredListings(); if (num3 > 0) { LogInfo($"Cleaned up {num3} expired listings (older than {num2} days)"); } else { LogDebug("Expiry cleanup: No expired listings found"); } } } <>2__current = (object)new WaitForSeconds(3600f); <>1__state = 2; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__27 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public SimpleMarketPlugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__27(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown int num = <>1__state; SimpleMarketPlugin simpleMarketPlugin = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; goto IL_004b; case 1: <>1__state = -1; goto IL_004b; case 2: { <>1__state = -1; if (ZNet.instance.IsServer()) { LogInfo("Server detected - initializing databases..."); simpleMarketPlugin.InitializeDatabases(); } else { LogInfo("Client mode - skipping database initialization"); } return false; } IL_004b: if ((Object)(object)ZNet.instance == (Object)null) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string PluginGUID = "dumba.simplemarket"; public const string PluginName = "SimpleMarket"; public const string PluginVersion = "0.9.7"; private Harmony _harmony; private MarketUI _marketUI; private Coroutine _expiryCleanupCoroutine; private const float ExpiryCheckIntervalHours = 1f; public static SimpleMarketPlugin Instance { get; private set; } public static ManualLogSource Log { get { SimpleMarketPlugin instance = Instance; if (instance == null) { return null; } return ((BaseUnityPlugin)instance).Logger; } } public MarketDatabase MarketDB { get; private set; } public BankDatabase BankDB { get; private set; } public TransactionDatabase TransactionDB { get; private set; } private void Awake() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown Instance = this; SimpleMarketConfig.Initialize(((BaseUnityPlugin)this).Config); LogInfo("SimpleMarket is loading..."); _harmony = new Harmony("dumba.simplemarket"); _harmony.PatchAll(Assembly.GetExecutingAssembly()); MarketRPCs.RegisterRPCs(); SubscribeToRPCEvents(); PrefabManager.OnVanillaPrefabsAvailable += OnVanillaPrefabsAvailable; InitializeUI(); LogInfo("SimpleMarket loaded successfully!"); } private void Start() { ((MonoBehaviour)this).StartCoroutine(WaitForServerAndInitialize()); } [IteratorStateMachine(typeof(d__27))] private IEnumerator WaitForServerAndInitialize() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__27(0) { <>4__this = this }; } private void OnDestroy() { Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } PrefabManager.OnVanillaPrefabsAvailable -= OnVanillaPrefabsAvailable; if (_expiryCleanupCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_expiryCleanupCoroutine); _expiryCleanupCoroutine = null; } UnsubscribeFromRPCEvents(); if ((Object)(object)_marketUI != (Object)null) { Object.Destroy((Object)(object)_marketUI); _marketUI = null; } InventoryGuiPatch.Cleanup(); } private void OnVanillaPrefabsAvailable() { if ((Object)(object)ZNet.instance != (Object)null && ZNet.instance.IsServer()) { InitializeDatabases(); } } private void InitializeUI() { if (GUIManager.IsHeadless()) { LogInfo("Headless server detected - skipping UI initialization"); return; } _marketUI = ((Component)this).gameObject.AddComponent(); _marketUI.Initialize(); LogInfo("Market UI system initialized"); } public MarketUI GetMarketUI() { return _marketUI; } public void InitializeDatabases() { if (MarketDB == null) { MarketDB = new MarketDatabase(); LogInfo("Market database initialized"); } if (BankDB == null) { BankDB = new BankDatabase(); LogInfo("Bank database initialized"); } if (TransactionDB == null) { TransactionDB = new TransactionDatabase(); LogInfo("Transaction database initialized"); } StartExpiryCleanupTask(); } public bool EnsureDatabasesInitialized() { if (!IsServer()) { return false; } if (MarketDB == null || BankDB == null || TransactionDB == null) { LogInfo("Lazy-initializing databases on server (triggered by RPC)"); InitializeDatabases(); } if (MarketDB != null && BankDB != null) { return TransactionDB != null; } return false; } private void StartExpiryCleanupTask() { if (_expiryCleanupCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_expiryCleanupCoroutine); } _expiryCleanupCoroutine = ((MonoBehaviour)this).StartCoroutine(ExpiryCleanupCoroutine()); LogInfo($"Started listing expiry cleanup task (interval: {1f} hour(s))"); } [IteratorStateMachine(typeof(d__35))] private IEnumerator ExpiryCleanupCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__35(0) { <>4__this = this }; } public static bool IsServer() { if ((Object)(object)ZNet.instance != (Object)null) { return ZNet.instance.IsServer(); } return false; } public static bool IsInGame() { if ((Object)(object)Player.m_localPlayer != (Object)null) { return (Object)(object)ZNet.instance != (Object)null; } return false; } public static void LogInfo(string message) { if (Log != null) { Log.LogInfo((object)message); } } public static void LogWarning(string message) { if (Log != null) { Log.LogWarning((object)message); } } public static void LogError(string message) { if (Log != null) { Log.LogError((object)message); } } public static void LogDebug(string message) { if (SimpleMarketConfig.DebugLogging != null && SimpleMarketConfig.DebugLogging.Value && Log != null) { Log.LogDebug((object)message); } } private void SubscribeToRPCEvents() { MarketRPCs.OnListingsReceived += HandleListingsReceived; MarketRPCs.OnMyListingsReceived += HandleMyListingsReceived; MarketRPCs.OnBankBalanceReceived += HandleBankBalanceReceived; MarketRPCs.OnListItemResult += HandleListItemResult; MarketRPCs.OnBuyItemResult += HandleBuyItemResult; MarketRPCs.OnCancelListingResult += HandleCancelListingResult; MarketRPCs.OnDepositResult += HandleDepositResult; MarketRPCs.OnWithdrawResult += HandleWithdrawResult; MarketRPCs.OnTransactionHistoryReceived += HandleTransactionHistoryReceived; } private void UnsubscribeFromRPCEvents() { MarketRPCs.OnListingsReceived -= HandleListingsReceived; MarketRPCs.OnMyListingsReceived -= HandleMyListingsReceived; MarketRPCs.OnBankBalanceReceived -= HandleBankBalanceReceived; MarketRPCs.OnListItemResult -= HandleListItemResult; MarketRPCs.OnBuyItemResult -= HandleBuyItemResult; MarketRPCs.OnCancelListingResult -= HandleCancelListingResult; MarketRPCs.OnDepositResult -= HandleDepositResult; MarketRPCs.OnWithdrawResult -= HandleWithdrawResult; MarketRPCs.OnTransactionHistoryReceived -= HandleTransactionHistoryReceived; } private void HandleListingsReceived(List listings, int totalCount, int totalPages) { LogDebug($"Received {listings.Count} listings (total: {totalCount}, pages: {totalPages})"); _marketUI?.OnListingsReceived(listings, totalCount, totalPages); } private void HandleMyListingsReceived(List listings) { LogDebug($"Received {listings.Count} of my listings"); _marketUI?.OnListingsReceived(listings, listings.Count, 1); } private void HandleBankBalanceReceived(int balance) { LogDebug($"Received bank balance: {balance}"); _marketUI?.OnBankBalanceReceived(balance); } private void HandleListItemResult(bool success, string message) { LogDebug($"List item result: {success} - {message}"); _marketUI?.OnListItemComplete(success, message); } private void HandleBuyItemResult(bool success, string message, MarketListing purchasedListing) { LogDebug($"Buy item result: {success} - {message}"); if (success && purchasedListing != null) { DeliverPurchasedItem(purchasedListing); } _marketUI?.OnBuyComplete(success, message); } private void HandleCancelListingResult(bool success, string message, MarketListing cancelledListing) { LogDebug($"Cancel listing result: {success} - {message}"); if (success && cancelledListing != null) { ReturnCancelledItem(cancelledListing); } _marketUI?.OnCancelComplete(success, message); } private void ReturnCancelledItem(MarketListing listing) { if (listing == null) { LogWarning("Cannot return null listing"); return; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null) { LogError("Cannot return item - no local player"); return; } Inventory inventory = ((Humanoid)localPlayer).GetInventory(); if (inventory == null) { LogError("Cannot return item - no inventory"); return; } string localizedName = ItemHelper.GetLocalizedName(listing.ItemPrefabName); if (ItemHelper.AddItemToInventory(inventory, listing.ItemPrefabName, listing.Quality, listing.Quantity, listing.ItemData)) { LogInfo($"Returned {listing.Quantity}x {localizedName} to player from cancelled listing"); FeedbackHelper.ShowSuccess($"Returned {listing.Quantity}x {localizedName}"); return; } LogWarning($"Inventory full - dropping {listing.Quantity}x {localizedName} at player's feet"); if (DropItemAtPlayer(listing)) { FeedbackHelper.ShowError("Inventory full - " + localizedName + " dropped at your feet!"); return; } LogError($"CRITICAL: Failed to drop {listing.Quantity}x {localizedName} - item may be lost!"); FeedbackHelper.ShowError("Failed to return " + localizedName + " - contact server admin!"); } private bool DropItemAtPlayer(MarketListing listing) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) try { Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null) { return false; } ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab(listing.ItemPrefabName) : null); if ((Object)(object)val == (Object)null) { LogError("DropItemAtPlayer: Cannot find prefab for " + listing.ItemPrefabName); return false; } Vector3 val2 = ((Component)localPlayer).transform.position + ((Component)localPlayer).transform.forward * 1.5f + Vector3.up * 0.5f; GameObject val3 = Object.Instantiate(val, val2, Quaternion.identity); if ((Object)(object)val3 == (Object)null) { return false; } ItemDrop component = val3.GetComponent(); if ((Object)(object)component != (Object)null) { component.m_itemData.m_stack = listing.Quantity; component.m_itemData.m_quality = listing.Quality; if (!string.IsNullOrEmpty(listing.ItemData)) { ItemSerializationHelper.Deserialize(component.m_itemData, listing.ItemData); } LogInfo($"Dropped {listing.Quantity}x {listing.ItemPrefabName} at player's feet"); return true; } Object.Destroy((Object)(object)val3); return false; } catch (Exception ex) { LogError("DropItemAtPlayer exception: " + ex.Message); return false; } } private void HandleDepositResult(bool success, string message, int newBalance) { LogDebug($"Deposit result: {success} - {message}, new balance: {newBalance}"); _marketUI?.OnDepositComplete(success, newBalance, message); } private void HandleWithdrawResult(bool success, string message, int newBalance, int withdrawnAmount) { LogDebug($"Withdraw result: {success} - {message}, new balance: {newBalance}, withdrawn: {withdrawnAmount}"); if (success && withdrawnAmount > 0) { DeliverCoins(withdrawnAmount); } _marketUI?.OnWithdrawComplete(success, newBalance, message); } private void HandleTransactionHistoryReceived(List transactions, int totalCount, int totalPages) { LogDebug($"Received {transactions.Count} transactions (total: {totalCount}, pages: {totalPages})"); _marketUI?.OnTransactionHistoryReceived(transactions, totalCount, totalPages); } private void DeliverCoins(int amount) { if (amount <= 0) { return; } if ((Object)(object)Player.m_localPlayer == (Object)null) { LogError("Cannot deliver coins - no local player"); return; } if (PlayerHelper.GiveCoins(amount)) { LogInfo($"Delivered {amount} coins to player"); FeedbackHelper.ShowSuccess($"Received {amount} coins"); return; } LogError("Failed to deliver coins to inventory - attempting rollback to bank"); string platformId = PlayerHelper.GetPlatformId(); if (!string.IsNullOrEmpty(platformId)) { MarketRPCs.RequestDeposit(platformId, amount); FeedbackHelper.ShowError("Inventory full - coins returned to bank!"); LogInfo($"Rolled back {amount} coins to bank for {platformId}"); } else { LogError($"CRITICAL: Could not rollback {amount} coins - no platform ID!"); FeedbackHelper.ShowError("Inventory full - item could not be delivered"); } } private void DeliverPurchasedItem(MarketListing listing) { if (listing == null) { LogWarning("Cannot deliver null listing"); return; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null) { LogError("Cannot deliver item - no local player"); return; } Inventory inventory = ((Humanoid)localPlayer).GetInventory(); if (inventory == null) { LogError("Cannot deliver item - no inventory"); return; } string localizedName = ItemHelper.GetLocalizedName(listing.ItemPrefabName); if (ItemHelper.AddItemToInventory(inventory, listing.ItemPrefabName, listing.Quality, listing.Quantity, listing.ItemData)) { LogInfo($"Delivered {listing.Quantity}x {localizedName} to player"); FeedbackHelper.ShowSuccess($"Received {listing.Quantity}x {localizedName}"); return; } LogError($"Failed to deliver {listing.Quantity}x {localizedName} to inventory - attempting refund"); int totalPrice = listing.GetTotalPrice(); string platformId = PlayerHelper.GetPlatformId(); if (!string.IsNullOrEmpty(platformId) && totalPrice > 0) { MarketRPCs.RequestDeposit(platformId, totalPrice); FeedbackHelper.ShowError($"Inventory full - {totalPrice} coins refunded to bank!"); LogInfo($"Refunded {totalPrice} coins to bank for failed item delivery: {localizedName}"); } else { LogError($"CRITICAL: Could not refund {totalPrice} coins for {localizedName} - no platform ID!"); FeedbackHelper.ShowError("Inventory full - item could not be delivered"); } } } } namespace SimpleMarket.UI { public class BankPanel : MonoBehaviour { private GameObject _container; private Text _balanceText; private InputField _amountInput; private Button _depositButton; private Button _withdrawButton; private Button _depositAllButton; private Button _withdrawAllButton; private Text _inventoryCoinsText; private int _currentBalance; private int _inventoryCoins; private const int MaxCoinStack = 999; public event Action OnDepositRequested; public event Action OnWithdrawRequested; public static BankPanel Create(Transform parent, Vector2 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BankPanel"); val.transform.SetParent(parent, false); RectTransform obj = val.AddComponent(); obj.anchorMin = new Vector2(0f, 1f); obj.anchorMax = new Vector2(1f, 1f); obj.pivot = new Vector2(0.5f, 1f); obj.anchoredPosition = position; obj.sizeDelta = new Vector2(-40f, 55f); ((Graphic)val.AddComponent()).color = new Color(0f, 0f, 0f, 0.2f); BankPanel bankPanel = val.AddComponent(); bankPanel._container = val; bankPanel.CreateUI(); return bankPanel; } private void CreateUI() { CreateBalanceDisplay(); CreateAmountInput(); CreateActionButtons(); CreateInventoryDisplay(); } private void CreateBalanceDisplay() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) ((Object)GUIManager.Instance.CreateText("\ud83d\udcb0", _container.transform, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(25f, 0f), GUIManager.Instance.AveriaSerifBold, 20, new Color(1f, 0.85f, 0f), false, Color.black, 30f, 30f, false)).name = "BankIcon"; GameObject val = GUIManager.Instance.CreateText("Bank: 0", _container.transform, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(110f, 0f), GUIManager.Instance.AveriaSerifBold, 18, new Color(1f, 0.85f, 0f), true, Color.black, 150f, 30f, false); ((Object)val).name = "BankBalanceText"; _balanceText = val.GetComponent(); if ((Object)(object)_balanceText != (Object)null) { _balanceText.alignment = (TextAnchor)3; } } private void CreateAmountInput() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) ((Object)GUIManager.Instance.CreateText("Amount:", _container.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(-120f, 0f), GUIManager.Instance.AveriaSerif, 14, Color.white, false, Color.black, 60f, 25f, false)).name = "AmountLabel"; GameObject val = GUIManager.Instance.CreateInputField(_container.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(-50f, 0f), (ContentType)2, "0", 14, 80f, 30f); ((Object)val).name = "AmountInput"; _amountInput = val.GetComponent(); } private void CreateActionButtons() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown GameObject val = GUIManager.Instance.CreateButton("Deposit", _container.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(40f, 0f), 80f, 30f); ((Object)val).name = "DepositButton"; _depositButton = val.GetComponent