Commit 6dd15057 authored by ElderLich's avatar ElderLich

Bug Fix: Randomized Lobby Icon/Frame Not Refreshing on Room Re-Entry

When Duel Appearance Randomize is set for icon/icon frame, the selection only updates after a duel ends. Entering or exiting a lobby/room should also reroll and display new randomized assets each time.
parent 971c4158
...@@ -99,6 +99,9 @@ namespace MDPro3.Duel ...@@ -99,6 +99,9 @@ namespace MDPro3.Duel
UIManager.UIBlackIn(Core.TransitionTime); UIManager.UIBlackIn(Core.TransitionTime);
await UniTask.WaitForSeconds(Core.TransitionTime); await UniTask.WaitForSeconds(Core.TransitionTime);
await UniTask.WaitUntil(() => Appearance.loaded); await UniTask.WaitUntil(() => Appearance.loaded);
// Rebuild appearance assets on each match load so random selections
// (icon / frame / protector) are re-rolled per duel.
await Program.instance.appearance.LoadSettingAssets();
await ABLoader.CacheMasterDuelBundles(); await ABLoader.CacheMasterDuelBundles();
Program.instance.ocgcore.LoadDuelButton(); Program.instance.ocgcore.LoadDuelButton();
......
...@@ -51,6 +51,8 @@ namespace MDPro3.Servant ...@@ -51,6 +51,8 @@ namespace MDPro3.Servant
if (servantUI != null) if (servantUI != null)
RefreshDeckSelector(); RefreshDeckSelector();
// Re-roll random duel icon/frame/protector whenever returning to lobby.
_ = Program.instance.appearance.LoadSettingAssets();
StartCoroutine(RefreshMyCardAssets()); StartCoroutine(RefreshMyCardAssets());
} }
......
...@@ -67,6 +67,8 @@ namespace MDPro3.Servant ...@@ -67,6 +67,8 @@ namespace MDPro3.Servant
CoreShowing = 0; CoreShowing = 0;
Program.instance.ui_.chatPanel.Show(false); Program.instance.ui_.chatPanel.Show(false);
OcgCore.handler = Handler; OcgCore.handler = Handler;
// Re-roll random duel/watch icon & frame whenever entering a room.
_ = Program.instance.appearance.LoadSettingAssets();
GetUI<RoomServantUI>().RefreshDeckSelector(); GetUI<RoomServantUI>().RefreshDeckSelector();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment