From a7e2511d363bee3213b1e24d361a1dd7282e9532 Mon Sep 17 00:00:00 2001 From: Xele02 Date: Sat, 9 Sep 2023 14:22:19 +0200 Subject: [PATCH] Fix multiple bugs in reward screen, fix #110. Fix some jp strings. --- Unity/Assets/UMAssets/Scripts/FOCPLKMMCAL.cs | 4 ++-- Unity/Assets/UMAssets/Scripts/JHHBAFKMBDL.cs | 2 +- Unity/Assets/UMAssets/Scripts/JpStringLiterals.cs | 2 ++ .../XeApp/Game/Menu/LayoutResultDropItem.cs | 2 ++ .../XeApp/Game/Menu/LayoutResultDropMain.cs | 14 +++++++++----- .../XeApp/Game/Menu/LayoutResultHeaderTitle.cs | 2 +- .../Scripts/XeApp/Game/Menu/SetDeckPlayButtons.cs | 2 +- .../Scripts/XeApp/Game/Menu/SetDeckStatusWindow.cs | 2 +- Unity/Assets/UMAssets/Scripts/XeSys/Math.cs | 2 +- 9 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Unity/Assets/UMAssets/Scripts/FOCPLKMMCAL.cs b/Unity/Assets/UMAssets/Scripts/FOCPLKMMCAL.cs index afec647d0..a867a9239 100644 --- a/Unity/Assets/UMAssets/Scripts/FOCPLKMMCAL.cs +++ b/Unity/Assets/UMAssets/Scripts/FOCPLKMMCAL.cs @@ -724,11 +724,11 @@ private bool BEEAKFJAPOB(JGEOBNENMAH.HAJIFNABIFF OMNOFMEBLAD, EONOEHOKBEB_Music } if(JCCBGECHIEI) { - BDMIIPKOIKL(item, itemId, rateInfo2.HMFFHLPNMPH_Cnt[itemIdx] * LFGNFNDDLJH_TicketCount, false); + BDMIIPKOIKL(item, itemId, rateInfo.HMFFHLPNMPH_Cnt[itemIdx] * LFGNFNDDLJH_TicketCount, false); } else { - DFKOELMCDDL(item, itemId, rateInfo2.HMFFHLPNMPH_Cnt[itemIdx] * LFGNFNDDLJH_TicketCount, false); + DFKOELMCDDL(item, itemId, rateInfo.HMFFHLPNMPH_Cnt[itemIdx] * LFGNFNDDLJH_TicketCount, false); } } } diff --git a/Unity/Assets/UMAssets/Scripts/JHHBAFKMBDL.cs b/Unity/Assets/UMAssets/Scripts/JHHBAFKMBDL.cs index f89bce1e6..0c3502bf9 100644 --- a/Unity/Assets/UMAssets/Scripts/JHHBAFKMBDL.cs +++ b/Unity/Assets/UMAssets/Scripts/JHHBAFKMBDL.cs @@ -130,7 +130,7 @@ public void DOHNKJKOGFJ(string LJPMEHDDBGP, IMCBBOAFION EDIIEFHAOGP, JFDNPFFOACP } else { - s.TitleText = JpStringLiterals.StringLiteral_11929; + s.TitleText = JpStringLiterals.StringLiteral_11929; s.Buttons = new ButtonInfo[1] { new ButtonInfo() { Label = PopupButton.ButtonLabel.Retry, Type = PopupButton.ButtonType.Positive } diff --git a/Unity/Assets/UMAssets/Scripts/JpStringLiterals.cs b/Unity/Assets/UMAssets/Scripts/JpStringLiterals.cs index c7449ed1c..ec8b438ec 100644 --- a/Unity/Assets/UMAssets/Scripts/JpStringLiterals.cs +++ b/Unity/Assets/UMAssets/Scripts/JpStringLiterals.cs @@ -330,6 +330,7 @@ class JpStringLiterals public const string StringLiteral_17777 = "獲得したアイテムはありません。"; // 0x03bba07c public const string StringLiteral_17787 = "%"; // 0x03bba0a4 public const string StringLiteral_17788 = "(UCアイテムは {0}UC に変換されました)"; // 0x03bba0a8 + public const string StringLiteral_17960 = "{0}回"; //0x03bba358 public const string StringLiteral_18022 = "使用スキル"; // 0x03bba450 public const string StringLiteral_18023 = "{0}秒"; //0x03bba454 public const string StringLiteral_18024 = ":{0}"; //0x03bba458 @@ -346,6 +347,7 @@ class JpStringLiterals public const string StringLiteral_20367 = "ー"; // 0x03bbc8f4 public const string StringLiteral_20369 = "±{0}"; // 0x03bbc8fc public const string StringLiteral_20382 = "(2回使用可)"; // 0x03bbc930 + public const string StringLiteral_20383 = "(2回使用可)"; //0x03bbc934 public const string StringLiteral_20448 = "モーションが指定されていない、またはモーション数を超えています。[ "; //0x03bbca38 public const string StringLiteral_20457 = "シンプルモデルに歌姫IDが設定されておりません。"; //0x03bbca5c public const string StringLiteral_20458 = "シンプルモデルに衣装モデルIDが設定されておりません。"; //0x03bbca60 diff --git a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropItem.cs b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropItem.cs index e4182a298..03db0781d 100644 --- a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropItem.cs +++ b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropItem.cs @@ -168,6 +168,7 @@ public void Setup(MOLKENLNCPE_DropData.CEFIOPJKEIC itemInfo, bool is_bonus) { textBonus[i].enabled = false; } + m_is_bonus = is_bonus; } //// RVA: 0x1D90E2C Offset: 0x1D90E2C VA: 0x1D90E2C @@ -326,6 +327,7 @@ public void SkipBeginAnim() { layoutStateTable.StartChildrenAnimGoStop(0, 0); layoutNumStateTable.StartChildrenAnimGoStop(m_is_bonus ? 0 : 1, m_is_bonus ? 0 : 1); + normalItem.layoutRoot.StartChildrenAnimGoStop("st_in"); normalItem.layoutNumAnim.StartChildrenAnimGoStop("st_out"); shadowAnime.StartChildrenAnimGoStop("st_in"); } diff --git a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropMain.cs b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropMain.cs index 5c2317db9..ce7410df7 100644 --- a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropMain.cs +++ b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultDropMain.cs @@ -382,15 +382,18 @@ private IEnumerator Co_PlayingNomralItemDropNumAnim() // // RVA: 0x1D96184 Offset: 0x1D96184 VA: 0x1D96184 private void StartNextNormalItemAnim() { - AddItem(); - itemList[currentItemIndex].onFinished = StartNormalItemBonusAnim; + int idx = currentItemIndex; + if(!AddItem()) + itemList[idx].onFinished = StartNextNormalItemAnim; + else + itemList[idx].onFinished = StartNormalItemBonusAnim; if(currentItemIndex < 7) { - itemList[currentItemIndex].StartBeginAnim(); + itemList[idx].StartBeginAnim(); } else { - this.StartCoroutineWatched(Co_AutoScrolling(1, nextItemMoveSec, itemList[currentItemIndex].StartBeginAnim)); + this.StartCoroutineWatched(Co_AutoScrolling(1, nextItemMoveSec, itemList[idx].StartBeginAnim)); } } @@ -588,6 +591,7 @@ private IEnumerator Co_AutoScrolling(float endNormalizePos, float time, Action a float ct; // 0x24 //0x1D971E8 + yield return null; beginNormalizePos = scrollSupporter.scrollRect.horizontalNormalizedPosition; ct = 0; while(true) @@ -616,7 +620,7 @@ private bool AddItem() Vector2 pos = new Vector2(SCROLL_MARGIN_WIDTH + itemList[currentItemIndex].Width * currentItemIndex + SCROLL_MARGIN_WIDTH + itemList[currentItemIndex].Width, 0); scrollSupporter.BeginAddView(); scrollSupporter.AddView(itemList[currentItemIndex].gameObject, SCROLL_MARGIN_WIDTH + itemList[currentItemIndex].Width * currentItemIndex, 0); - scrollSupporter.EndAddView(); + scrollSupporter.EndAddView(new Vector2(SCROLL_MARGIN_WIDTH + itemList[currentItemIndex].Width * currentItemIndex + SCROLL_MARGIN_WIDTH + itemList[currentItemIndex].Width, 0)); currentItemIndex++; return itemList.Count == currentItemIndex; } diff --git a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultHeaderTitle.cs b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultHeaderTitle.cs index b244239bf..d28a345bb 100644 --- a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultHeaderTitle.cs +++ b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/LayoutResultHeaderTitle.cs @@ -106,7 +106,7 @@ public void SetSkipCount(int count) layoutSkipCount.StartChildrenAnimGoStop("02"); return; } - m_textSkipCount.text = string.Format("{0}StringLiteral_17960", m_textSkipCount); + m_textSkipCount.text = string.Format(JpStringLiterals.StringLiteral_17960, count); layoutSkipCount.StartChildrenAnimGoStop("01"); } diff --git a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckPlayButtons.cs b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckPlayButtons.cs index 999eeba6f..4221c6b60 100644 --- a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckPlayButtons.cs +++ b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckPlayButtons.cs @@ -115,7 +115,7 @@ public void Set(SetDeckPlayButtons.SkipButtoType skipType, int skipRestCount, Se } } m_skipButtonLockImage.enabled = skipType == SkipButtoType.Lock; - m_skipRestCountText.text = string.Format("{0}", skipRestCount); // StringLiteral_17960 + m_skipRestCountText.text = string.Format(JpStringLiterals.StringLiteral_17960, skipRestCount); if(playType == PlayButtonType.Support_AP) { m_playObject.SetActive(false); diff --git a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckStatusWindow.cs b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckStatusWindow.cs index daea0df7c..d038cceec 100644 --- a/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckStatusWindow.cs +++ b/Unity/Assets/UMAssets/Scripts/XeApp/Game/Menu/SetDeckStatusWindow.cs @@ -659,7 +659,7 @@ public void UpdateContent(DFKGGBMFFGB_PlayerInfo viewPlayerData, JLKEOGLJNOD_Tea else { GameManager.Instance.UnionTextureManager.SetImageSkillRank(m_activeSkillRankImage, (SkillRank.Type) m_mainScene.BEKGEAMJGEN_ActiveSkillRank); - m_activeSkillEffectText.text = m_mainScene.PCMEMHPDABG_GetActiveSkillDesc().Replace(JpStringLiterals.StringLiteral_20382, string.Format(" StringLiteral_20383", SystemTextColor.ImportantColor)); + m_activeSkillEffectText.text = m_mainScene.PCMEMHPDABG_GetActiveSkillDesc().Replace(JpStringLiterals.StringLiteral_20382, string.Format(JpStringLiterals.StringLiteral_20383, SystemTextColor.ImportantColor)); m_activeSkillNameText.text = m_mainScene.ILCLGGPHHJO_ActiveSkillName; m_activeSkillLevelText.text = string.Format("Lv{0}", m_mainScene.PNHJPCPFNFI_ActiveSkillLevel); m_activeSkill.SetActive(true); diff --git a/Unity/Assets/UMAssets/Scripts/XeSys/Math.cs b/Unity/Assets/UMAssets/Scripts/XeSys/Math.cs index 43712d69a..4d4afe279 100644 --- a/Unity/Assets/UMAssets/Scripts/XeSys/Math.cs +++ b/Unity/Assets/UMAssets/Scripts/XeSys/Math.cs @@ -152,7 +152,7 @@ public static float EasingInOutCubic(float start, float end, float t) { f2 = f2 * f2 * f * f2; } - return f2 * start; + return f2 + start; } //// RVA: 0x2395980 Offset: 0x2395980 VA: 0x2395980