diff --git a/Assets/Scripts/Game/PlayerActivate.cs b/Assets/Scripts/Game/PlayerActivate.cs index 1e18177275..af5cfe02d4 100644 --- a/Assets/Scripts/Game/PlayerActivate.cs +++ b/Assets/Scripts/Game/PlayerActivate.cs @@ -957,7 +957,7 @@ void ActivateLootContainer(RaycastHit hit, DaggerfallLoot loot) } // Open inventory window with activated loot container as remote target (if we fall through to here) DaggerfallUI.Instance.InventoryWindow.LootTarget = loot; - DaggerfallUI.PostMessage(DaggerfallUIMessages.dfuiOpenInventoryWindow); + uiManager.PushWindow(DaggerfallUI.Instance.InventoryWindow); } void DisableEmptyCorpseContainer(GameObject go) @@ -1087,7 +1087,8 @@ public void PrivateProperty_OnButtonClick(DaggerfallMessageBox sender, Daggerfal if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { // Open inventory window with activated private container as remote target (pre-set) - DaggerfallUI.PostMessage(DaggerfallUIMessages.dfuiOpenInventoryWindow); + UserInterfaceManager uiManager = DaggerfallUI.Instance.UserInterfaceManager; + uiManager.PushWindow(DaggerfallUI.Instance.InventoryWindow); } else DaggerfallUI.Instance.InventoryWindow.LootTarget = null; diff --git a/Assets/Scripts/Game/Questing/Actions/GivePc.cs b/Assets/Scripts/Game/Questing/Actions/GivePc.cs index a517c17de0..771adbc272 100644 --- a/Assets/Scripts/Game/Questing/Actions/GivePc.cs +++ b/Assets/Scripts/Game/Questing/Actions/GivePc.cs @@ -13,6 +13,7 @@ using UnityEngine; using System.Text.RegularExpressions; using DaggerfallWorkshop.Utility; +using DaggerfallWorkshop.Game.UserInterface; using DaggerfallWorkshop.Game.UserInterfaceWindows; using FullSerializer; @@ -190,8 +191,9 @@ private void QuestCompleteMessage_OnClose() // Open loot reward container once QuestComplete dismissed if (rewardLoot != null) { + UserInterfaceManager uiManager = DaggerfallUI.Instance.UserInterfaceManager; DaggerfallUI.Instance.InventoryWindow.LootTarget = rewardLoot; - DaggerfallUI.PostMessage(DaggerfallUIMessages.dfuiOpenInventoryWindow); + uiManager.PushWindow(DaggerfallUI.Instance.InventoryWindow); } } @@ -244,4 +246,4 @@ protected virtual void RaiseOnOfferPendingEvent(GivePc sender) #endregion } -} \ No newline at end of file +}