From f85d3a9e42c389244227bbb7c2697174aa277ab8 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 04 九月 2025 17:20:51 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/HappyXB/HappyXBModel.cs | 5 ++
Main/System/HappyXB/HeroCallResultWin.cs | 85 ++++++++++++++++++++++++++++++++----------
2 files changed, 70 insertions(+), 20 deletions(-)
diff --git a/Main/System/HappyXB/HappyXBModel.cs b/Main/System/HappyXB/HappyXBModel.cs
index c091f55..662792f 100644
--- a/Main/System/HappyXB/HappyXBModel.cs
+++ b/Main/System/HappyXB/HappyXBModel.cs
@@ -39,6 +39,8 @@
}
private Dictionary<int, XBTypeInfo> xbTypeInfoDict = new Dictionary<int, XBTypeInfo>(); //鎶藉鐘舵�佺浉鍏崇殑 鏈嶅姟鍣ㄨ褰�
+ public int lhQuality;
+
public override void Init()
{
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
@@ -67,6 +69,9 @@
xbTypeItemDict[list[i].TreasureType].Add(list[i]);
}
+
+ var config = FuncConfigConfig.Get("HeroCall");
+ lhQuality = int.Parse(config.Numerical1);
}
public override void Release()
diff --git a/Main/System/HappyXB/HeroCallResultWin.cs b/Main/System/HappyXB/HeroCallResultWin.cs
index 64b43dc..195fb0d 100644
--- a/Main/System/HappyXB/HeroCallResultWin.cs
+++ b/Main/System/HappyXB/HeroCallResultWin.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
@@ -42,8 +43,17 @@
[SerializeField] Text call10Text;
[SerializeField] Button okBtn;
+ [SerializeField] Text callTip;
- int resultState = 0; //0鍗曟娊灞曠ず 1鍗佽繛灞曠ず 2 鍗佽繛寮�濮嬪睍绀� 3 鍗佽繛绔嬬粯灞曠ず
+ public enum ResultState
+ {
+ single = 0, //鍗曟娊灞曠ず
+ singleStart = 1, //鍗曟娊灞曠ず寮�濮�
+ ten = 2, //鍗佽繛灞曠ず
+ tenStart = 3, //鍗佽繛寮�濮嬪睍绀�
+ Lihui = 4, //绔嬬粯灞曠ず
+ }
+ ResultState resultState = ResultState.single;
bool isSkip = false;
List<int> showLHHeroIDList = new List<int>();
@@ -78,37 +88,36 @@
HappyXBModel.Instance.RefreshXBTypeInfoAct -= RefreshBtn;
}
+
void UpdateState()
{
- if (HeroUIManager.Instance.selectCallIndex == 0)
+ if (isSkip)
{
- resultState = 0;
- }
- else if (isSkip)
- {
- resultState = 1;
+ resultState = HeroUIManager.Instance.selectCallIndex == 0 ? ResultState.single : ResultState.ten;
+
+ RefreshState();
}
else
{
- resultState = 2;
+ resultState = HeroUIManager.Instance.selectCallIndex == 0 ? ResultState.singleStart : ResultState.tenStart;
+ RefreshState();
MoveToNextState().Forget();
}
- RefreshState();
}
async UniTask MoveToNextState()
{
- await UniTask.Delay(1500);
-
showLHHeroIDList.Clear();
for (int i = 0; i < HappyXBModel.Instance.xbResultDict.Count; i++)
{
var heroID = HappyXBModel.Instance.xbResultDict[i].itemId;
- if (HeroConfig.Get(heroID).Quality >= 4)
+ if (HeroConfig.Get(heroID).Quality >= HappyXBModel.Instance.lhQuality)
showLHHeroIDList.Add(HappyXBModel.Instance.xbResultDict[i].itemId);
}
- resultState = 3;
+ await UniTask.Delay(resultState == ResultState.singleStart ? 800 : 1500);
+
+ resultState = ResultState.Lihui;
try
{
RefreshState();
@@ -121,11 +130,12 @@
void RefreshState()
{
- if (resultState == 0)
+ if (resultState == ResultState.single)
{
btnsObj.SetActive(true);
call1Btn.SetActive(HeroUIManager.Instance.selectCallType != HappXBTitle.HeroCallScore ? true : false);
call10Btn.SetActive(false);
+ callTip.SetActive(true);
result1Obj.SetActive(true);
result10Obj.SetActive(false);
@@ -133,14 +143,32 @@
ShowMoney(true);
heroInfoObj.SetActive(true);
- result1Cell.Display(HappyXBModel.Instance.xbResultDict[0].itemId, 0);
+ if (isSkip)
+ result1Cell.Display(HappyXBModel.Instance.xbResultDict[0].itemId, 0, true);
RefreshHeroInfo(HappyXBModel.Instance.xbResultDict[0].itemId);
+ RefreshLuck();
+
}
- else if (resultState == 1)
+ else if (resultState == ResultState.singleStart)
+ {
+ btnsObj.SetActive(false);
+ callTip.SetActive(false);
+
+ result1Obj.SetActive(true);
+ result10Obj.SetActive(false);
+ result10LihuiObj.SetActive(false);
+ ShowMoney(false);
+ heroInfoObj.SetActive(false);
+
+ result1Cell.Display(HappyXBModel.Instance.xbResultDict[0].itemId, 0);
+ RefreshLuck();
+ }
+ else if (resultState == ResultState.ten)
{
btnsObj.SetActive(true);
call1Btn.SetActive(false);
call10Btn.SetActive(true);
+ callTip.SetActive(true);
result1Obj.SetActive(false);
result10Obj.SetActive(true);
@@ -149,10 +177,12 @@
heroInfoObj.SetActive(false);
if (isSkip)
Refresh10Result();
+
}
- else if (resultState == 2)
+ else if (resultState == ResultState.tenStart)
{
btnsObj.SetActive(false);
+ callTip.SetActive(false);
result1Obj.SetActive(false);
result10Obj.SetActive(true);
@@ -161,10 +191,11 @@
heroInfoObj.SetActive(false);
Refresh10Result();
}
- else if (resultState == 3)
+ else if (resultState == ResultState.Lihui)
{
btnsObj.SetActive(false);
+ callTip.SetActive(false);
result1Obj.SetActive(false);
result10Obj.SetActive(false);
result10LihuiObj.SetActive(true);
@@ -208,7 +239,7 @@
call10ItemIcon.SetOrgSprite(IconKey);
call10Text.text = Language.Get("L1100", item.ItemName, UIHelper.AppendColor(funcSet.CostItemCountList[1] > itemCount ? TextColType.Red : TextColType.LightWhite, funcSet.CostItemCountList[1].ToString()));
-
+ RefreshLuck();
}
void ShowMoney(bool show)
@@ -260,7 +291,7 @@
}
else
{
- resultState = 1;
+ resultState = HeroUIManager.Instance.selectCallIndex == 0 ? ResultState.single : ResultState.ten;
RefreshState();
return;
}
@@ -282,4 +313,18 @@
heroJobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(heroConfig.Class));
jobPosNameText.text = HeroUIManager.Instance.GetJobName(heroConfig.Class) + " " + heroConfig.Desc;
}
+
+
+ void RefreshLuck()
+ {
+ //鍐嶆嫑鍕焮0}娆″悗蹇呭緱{1}姝﹀皢
+ List<int> qualityList = new List<int>();
+ var needCount = HappyXBModel.Instance.GetNextXBCountForBigAward((int)HappXBTitle.HeroCallAdvanced, out qualityList);
+ List<string> qualityStrList = new List<string>();
+ for (int i = 0; i < qualityList.Count; i++)
+ {
+ qualityStrList.Add(UIHelper.AppendColor(qualityList[i], Language.Get("equipQualityFormat", Language.Get("CommonQuality" + qualityList[i]))));
+ }
+ callTip.text = Language.Get("HeroCall6", needCount, string.Join(Language.Get("L1130"), qualityStrList.ToArray()));
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0