From 426f3ad2af25d014a249e842c1cce22326b3ac1b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 08 一月 2026 19:16:28 +0800
Subject: [PATCH] 266 【内政】古宝系统
---
Main/Utility/ComponentExtersion.cs | 5
Main/System/Gubao/GubaoCallCell.cs.meta | 11 +
Main/System/Gubao/GubaoBaseWin.cs | 14 +
Main/System/Gubao/GubaoManager.cs | 26 ++
Main/System/Main/HomeWin.cs | 4
Main/System/BoneField/AdsManager.cs | 4
Main/System/Gubao/GubaoTipWin.cs | 2
Main/System/HappyXB/HappyXBModel.cs | 29 ++-
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA350_tagMCTreasureResult.cs | 6
Main/System/Gubao/GubaoCallCell.cs | 140 +++++++++++++++
Main/System/Gubao/GubaoCallWin.cs | 274 ++++++++++++++++++++++++++++++
Main/System/Gubao/GubaoCallWin.cs.meta | 11 +
12 files changed, 506 insertions(+), 20 deletions(-)
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA350_tagMCTreasureResult.cs b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA350_tagMCTreasureResult.cs
index 2788cbe..1c2d19b 100644
--- a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA350_tagMCTreasureResult.cs
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA350_tagMCTreasureResult.cs
@@ -4,6 +4,9 @@
// A3 50 閫氱煡瀵诲疂缁撴灉 #tagMCTreasureResult
public class HA350_tagMCTreasureResult : GameNetPackBasic {
+ public byte TreasureType; //瀵诲疂绫诲瀷
+ public byte TreasureIndex; //瀵诲疂绱㈠紩
+ public byte CostType; //娑堣�楃被鍨嬶細0-榛樿浠欑帀锛�1-鍏嶈垂娆℃暟锛�2-瀵诲疂閬撳叿
public byte AddMoneyType; // 鏈瀵诲疂澧炲姞鐨勭Н鍒嗚揣甯佺被鍨嬶紝鍙兘涓�0
public ushort AddMoneyValue; // 鏈瀵诲疂澧炲姞鐨勭Н鍒嗚揣甯佸�硷紝鍙兘涓�0
public ushort AddTreasureLuck; // 鏈瀵诲疂澧炲姞鐨勫垢杩愬��
@@ -15,6 +18,9 @@
}
public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out TreasureType, vBytes, NetDataType.BYTE);
+ TransBytes (out TreasureIndex, vBytes, NetDataType.BYTE);
+ TransBytes (out CostType, vBytes, NetDataType.BYTE);
TransBytes (out AddMoneyType, vBytes, NetDataType.BYTE);
TransBytes (out AddMoneyValue, vBytes, NetDataType.WORD);
TransBytes (out AddTreasureLuck, vBytes, NetDataType.WORD);
diff --git a/Main/System/BoneField/AdsManager.cs b/Main/System/BoneField/AdsManager.cs
index eee2937..90036af 100644
--- a/Main/System/BoneField/AdsManager.cs
+++ b/Main/System/BoneField/AdsManager.cs
@@ -58,6 +58,10 @@
case 6:
SendGetReward(ADID);
break;
+ case 5:
+ GubaoManager.Instance.selectCallIndex = 0;
+ SendGetReward(ADID);
+ break;
}
}
diff --git a/Main/System/Gubao/GubaoBaseWin.cs b/Main/System/Gubao/GubaoBaseWin.cs
index 029dafb..33d3670 100644
--- a/Main/System/Gubao/GubaoBaseWin.cs
+++ b/Main/System/Gubao/GubaoBaseWin.cs
@@ -5,16 +5,26 @@
/// </summary>
public class GubaoBaseWin : OneLevelWin
{
+ [SerializeField] Transform bg;
+ [SerializeField] Transform jbbg;
protected override void OpenSubUIByTabIndex()
{
switch (functionOrder)
{
case 0:
currentSubUI = UIManager.Instance.OpenWindow<GubaoListWin>();
+ jbbg.SetActive(false);
+ bg.SetActive(true);
break;
case 1:
- // 鍏呭�肩晫闈�
- // currentSubUI = UIManager.Instance.OpenWindow<RechargeWin>();
+ currentSubUI = UIManager.Instance.OpenWindow<GubaoCallWin>();
+ jbbg.SetActive(true);
+ bg.SetActive(false);
+ break;
+ case 2:
+ currentSubUI = UIManager.Instance.OpenWindow<GubaoListWin>();
+ jbbg.SetActive(false);
+ bg.SetActive(true);
break;
default:
Debug.LogWarning("鏈煡鐨勬爣绛剧储寮�: " + functionOrder);
diff --git a/Main/System/Gubao/GubaoCallCell.cs b/Main/System/Gubao/GubaoCallCell.cs
new file mode 100644
index 0000000..41c4ccd
--- /dev/null
+++ b/Main/System/Gubao/GubaoCallCell.cs
@@ -0,0 +1,140 @@
+using System;
+using System.Collections.Generic;
+using Cysharp.Threading.Tasks;
+using UnityEngine;
+using UnityEngine.UI;
+
+// 閴村疂缁撴灉
+public class GubaoCallCell : MonoBehaviour
+{
+ [SerializeField] Image canImage;
+ [SerializeField] RotationTween rotationTween; //鎽囦竴鎽�0.5绉掑悗锛屽仠姝㈠姩-瑁傚紑鐗规晥 - 閰嶅悎娑堝け
+ [SerializeField] UIEffectPlayer openEffect; //瑁傚紑鐗规晥
+ [SerializeField] UIEffectPlayer showEffect; //灞曠ず鐗规晥
+ [SerializeField] Image itemIcon;
+ [SerializeField] Text itemName;
+ [SerializeField] Text cntText;
+ [SerializeField] Image pieceImg;
+ [SerializeField] Transform outRect; //婧㈠嚭
+ [SerializeField] Image newImg;
+
+ // 鍕鹃�夎烦杩囩殑鐩存帴鏄剧ず缁撴灉
+ public async UniTask Display(int index)
+ {
+ bool isSkip = LocalSave.GetBool(GubaoManager.skipKey + PlayerDatas.Instance.baseData.PlayerID, false);
+
+ if (HappyXBModel.Instance.xbResultDict.IsNullOrEmpty())
+ {
+ return;
+ }
+ if (!HappyXBModel.Instance.xbResultDict.ContainsKey(index))
+ {
+ return;
+ }
+ var result = HappyXBModel.Instance.xbResultDict[index];
+ var itemCfg = ItemConfig.Get(result.itemId);
+ var gbCfg = GubaoConfig.Get(result.itemId);
+
+ if (isSkip)
+ {
+ canImage.SetActive(false);
+ rotationTween.Stop();
+ openEffect.Stop();
+ showEffect.PlayByArrIndex(Math.Max(itemCfg.ItemColor - 1, 0));
+ itemIcon.SetActive(true);
+ itemName.SetActive(true);
+ cntText.SetActive(true);
+
+ itemIcon.SetItemSprite(result.itemId);
+ itemIcon.SetNativeSize();
+ itemName.text = itemCfg.ItemName;
+ itemName.color = UIHelper.GetFuncQualityColor(itemCfg.ItemColor);
+ cntText.text = "x" + result.count.ToString();
+
+ if (gbCfg == null)
+ {
+ pieceImg.SetActive(false);
+ newImg.SetActive(false);
+ }
+ else
+ {
+ pieceImg.SetActive(true);
+ if (GubaoManager.Instance.IsActive(result.itemId))
+ {
+ newImg.SetActive(false);
+ }
+ else if (VirtualPackManager.Instance.GetNoPackItemCount(result.itemId) < gbCfg.UnlockItemCnt)
+ {
+ newImg.SetActive(true);
+ }
+ else
+ {
+ newImg.SetActive(false);
+ }
+ }
+ outRect.SetActive(result.isOut);
+
+ return;
+ }
+
+ //鍔ㄧ敾椤哄簭 锛� 缃愬瓙鎽囦竴鎽�0.5绉�-鍋滄鍔�-瑁傚紑鐗规晥-缃愬瓙鎻愬墠娑堝け-灞曠ず鐗规晥
+ canImage.SetActive(true);
+ //闅忔満1-6
+ int random = UnityEngine.Random.Range(1, 7);
+ canImage.SetSprite($"GubaoCan{random}");
+ canImage.SetNativeSize();
+ canImage.transform.localRotation = Quaternion.identity;
+ itemIcon.SetActive(false);
+ itemName.SetActive(false);
+ cntText.SetActive(false);
+ outRect.SetActive(false);
+ newImg.SetActive(false);
+
+
+ showEffect.Stop();
+
+ int delay = isSkip ? 0 : index * 100; // delay 姣
+ await UniTask.Delay(delay);
+
+ rotationTween.Play();
+ await UniTask.Delay(300);
+ rotationTween.Stop();
+ openEffect.Play();
+ await UniTask.Delay(200);
+ canImage.SetActive(false);
+ await UniTask.Delay(400);
+ showEffect.PlayByArrIndex(Math.Max(itemCfg.ItemColor - 1, 0));
+ itemIcon.SetActive(true);
+ itemName.SetActive(true);
+ cntText.SetActive(true);
+ itemIcon.SetItemSprite(result.itemId);
+ itemIcon.SetNativeSize();
+ itemName.text = itemCfg.ItemName;
+ itemName.color = UIHelper.GetFuncQualityColor(itemCfg.ItemColor);
+ cntText.text = "x" + result.count.ToString();
+ if (gbCfg == null)
+ {
+ pieceImg.SetActive(false);
+ newImg.SetActive(false);
+ }
+ else
+ {
+ pieceImg.SetActive(true);
+ if (GubaoManager.Instance.IsActive(result.itemId))
+ {
+ newImg.SetActive(false);
+ }
+ else if (VirtualPackManager.Instance.GetNoPackItemCount(result.itemId) < gbCfg.UnlockItemCnt)
+ {
+ newImg.SetActive(true);
+ }
+ else
+ {
+ newImg.SetActive(false);
+ }
+ }
+ outRect.SetActive(result.isOut);
+ }
+
+
+}
diff --git a/Main/System/Gubao/GubaoCallCell.cs.meta b/Main/System/Gubao/GubaoCallCell.cs.meta
new file mode 100644
index 0000000..af71a08
--- /dev/null
+++ b/Main/System/Gubao/GubaoCallCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ebac9a00058b123499b54518466683ed
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Gubao/GubaoCallWin.cs b/Main/System/Gubao/GubaoCallWin.cs
new file mode 100644
index 0000000..0f79cea
--- /dev/null
+++ b/Main/System/Gubao/GubaoCallWin.cs
@@ -0,0 +1,274 @@
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using Cysharp.Threading.Tasks;
+using UnityEngine;
+using UnityEngine.UI;
+
+/// <summary>
+/// 閴村疂
+/// </summary>
+public class GubaoCallWin : UIBase
+{
+ [SerializeField] OwnItemCell ownItemCell;
+ [SerializeField] Toggle skipToggle;
+ [SerializeField] Button call1Btn;
+ [SerializeField] Image call1ItemIcon;
+ [SerializeField] Text call1Text;
+ [SerializeField] Text freeCDTime;
+ [SerializeField] Button call10Btn;
+ [SerializeField] Image call10ItemIcon;
+ [SerializeField] Text call10Text;
+ [SerializeField] Text callTip;
+ [SerializeField] Button rateBtn;
+ [SerializeField] Transform rateRect;
+ [SerializeField] Text[] rateTexts;
+
+ [SerializeField] Transform resultObj; //灞曠ずX绉掔粨鏉熷彲鐐瑰嚮鍏抽棴
+ [SerializeField] Transform opObj; //鎿嶄綔鍖哄湪缁撴灉灞曠ず杩囩▼浼氶殣钘�
+
+
+ [SerializeField] UIEffectPlayer roleModel; //寰呮満锛岀粨鏋�3绉�
+ // [SerializeField] Transform talkRect; //1.鏈壌瀹濇椂闅忔満 2.閴村疂杩囩▼娑堝け 3.閴村疂缁撴潫瀵瑰簲涓嶅悓瀵硅瘽
+ [SerializeField] Text talkText;
+
+ [SerializeField] Button closeResultBtn;
+ [SerializeField] GubaoCallCell oneResultCell;
+ [SerializeField] GubaoCallCell[] tenResultCells;
+
+ float showResultTime = 0; //鍔ㄧ敾寮�濮�
+ float showCD = 0; //鍔ㄧ敾缁撴潫闇� 鍗曟娊1绉掞紝鍗佽繛2绉掞紱璺宠繃涔熼渶瑕�0.x绉掑睍绀烘椂闂�(鍙梪pdate褰卞搷)
+
+ protected override void InitComponent()
+ {
+ skipToggle.AddListener((value) =>
+ {
+ LocalSave.SetBool(GubaoManager.skipKey + PlayerDatas.Instance.baseData.PlayerID, value);
+ });
+ ownItemCell.itemID = TreasureSetConfig.Get((int)HappXBTitle.Gubao).CostItemID;
+ call1Btn.AddListener(SendGubaoCall);
+ call10Btn.AddListener(() =>
+ {
+ GubaoManager.Instance.selectCallIndex = 1;
+ HappyXBModel.Instance.SendXBManyQuest((int)HappXBTitle.Gubao);
+ });
+ rateBtn.AddListener(() =>
+ {
+ rateRect.SetActive(true);
+ });
+ ShowRate();
+ closeResultBtn.AddListener(() =>
+ {
+ if (Time.time - showResultTime < showCD)
+ {
+ return;
+ }
+ opObj.SetActive(true);
+ resultObj.SetActive(false);
+ ShowVenderTalk(0);
+ });
+ }
+
+
+ protected override void OnPreOpen()
+ {
+ HappyXBModel.Instance.RefreshXBTypeInfoAct += Display;
+ HappyXBModel.Instance.RefreshXBResultAct += ShowResult;
+ GubaoManager.Instance.clickCallEvent += clickCallEvent;
+ skipToggle.isOn = LocalSave.GetBool(GubaoManager.skipKey + PlayerDatas.Instance.baseData.PlayerID, false);
+ opObj.SetActive(true);
+ resultObj.SetActive(false);
+
+ ShowVenderTalk(0);
+ Display();
+ }
+
+ protected override void OnPreClose()
+ {
+ HappyXBModel.Instance.RefreshXBTypeInfoAct -= Display;
+ HappyXBModel.Instance.RefreshXBResultAct -= ShowResult;
+ GubaoManager.Instance.clickCallEvent -= clickCallEvent;
+ }
+
+ void ShowVenderTalk(int quality)
+ {
+ if (quality == 0)
+ {
+ var random = Random.Range(1, GubaoManager.Instance.maxIdleTalk + 1);
+ talkText.text = Language.Get("GubaoIdleTalk" + random);
+ roleModel.Play(0);
+ }
+ else
+ {
+ talkText.text = Language.Get("GubaoResultTalk" + quality);
+ roleModel.Play(GubaoManager.Instance.emojiDict[quality]);
+ }
+
+ }
+
+ public void Display()
+ {
+ var funcSet = TreasureSetConfig.Get((int)HappXBTitle.Gubao);
+ var item = ItemConfig.Get(funcSet.CostItemID);
+ var IconKey = item.IconKey;
+ call1ItemIcon.SetOrgSprite(IconKey);
+ call10ItemIcon.SetOrgSprite(IconKey);
+ var itemCount = PackManager.Instance.GetItemCountByID(PackType.Item, funcSet.CostItemID);
+
+ int todayFreeCount = HappyXBModel.Instance.GetFreeCountToday((int)HappXBTitle.Gubao);
+ int dayMaxCount = HappyXBModel.Instance.GetDailyFreeCount((int)HappXBTitle.Gubao);
+ if (todayFreeCount < dayMaxCount)
+ {
+ call1Text.text = Language.Get("L1100", Language.Get("L1127"), (dayMaxCount - todayFreeCount) + "/" + dayMaxCount);
+ }
+ else
+ {
+ call1Text.text = Language.Get("L1100", item.ItemName, UIHelper.AppendColor(funcSet.CostItemCountList[0] > itemCount ? TextColType.Red : TextColType.LightWhite, funcSet.CostItemCountList[0].ToString()));
+ }
+ call10Text.text = Language.Get("L1100", item.ItemName, UIHelper.AppendColor(funcSet.CostItemCountList[1] > itemCount ? TextColType.Red : TextColType.LightWhite, funcSet.CostItemCountList[1].ToString()));
+
+
+ RefreshFreeTime();
+
+ //鍐嶆嫑鍕焮0}娆″悗蹇呭緱{1}姝﹀皢
+ List<int> qualityList = new List<int>();
+ var needCount = HappyXBModel.Instance.GetNextXBCountForBigAward((int)HappXBTitle.Gubao, out qualityList);
+ List<string> qualityStrList = new List<string>();
+ for (int i = 0; i < qualityList.Count; i++)
+ {
+ qualityStrList.Add(UIHelper.AppendColor(qualityList[i], Language.Get("L1039", Language.Get("CommonQuality" + qualityList[i]))));
+ }
+ callTip.text = Language.Get("Gubao12", needCount, string.Join(Language.Get("L1130"), qualityStrList.ToArray()));
+ }
+
+ //姣忕鍒锋柊鍏嶈垂CD鐨勫�掕鏃�
+ float cdTime = 0;
+
+ void LateUpdate()
+ {
+ //姣忕瑙﹀彂涓�娆�
+ cdTime += Time.deltaTime;
+ if (cdTime < 0.5) return;
+ cdTime = 0;
+ RefreshFreeTime();
+ if (resultObj.gameObject.activeSelf && !opObj.gameObject.activeSelf)
+ {
+ if (Time.time - showResultTime > showCD)
+ {
+ opObj.SetActive(true);
+ ShowVenderTalk(GetResultQuality());
+ }
+ }
+ }
+
+ int GetResultQuality()
+ {
+ if (HappyXBModel.Instance.xbResultDict.IsNullOrEmpty())
+ {
+ return 0;
+ }
+ int quality = 0;
+ foreach (var item in HappyXBModel.Instance.xbResultDict.Values)
+ {
+ int tmp = ItemConfig.Get(item.itemId).ItemColor;
+ if (tmp > quality)
+ {
+ quality = tmp;
+ }
+ }
+ return quality;
+ }
+
+ void RefreshFreeTime()
+ {
+ if (HappyXBModel.Instance.IsHaveFreeXB((int)HappXBTitle.Gubao))
+ {
+ freeCDTime.SetActive(false);
+ }
+ else
+ {
+ freeCDTime.SetActive(true);
+ freeCDTime.text = Language.Get("L1128", TimeUtility.SecondsToHMS(TimeUtility.GetTodayRemainSeconds()));
+ }
+ }
+
+ void SendGubaoCall()
+ {
+ if (PackManager.Instance.GetEmptyGridCount(PackType.Item) <= 0)
+ {
+ SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_676165", 2);
+ return;
+ }
+
+ GubaoManager.Instance.selectCallIndex = 0;
+
+ if (HappyXBModel.Instance.IsHaveFreeXB((int)HappXBTitle.Gubao))
+ {
+ HappyXBModel.Instance.SendXBQuest((int)HappXBTitle.Gubao, 0, 1);
+ }
+ else
+ {
+ HappyXBModel.Instance.SendOneXBQuest((int)HappXBTitle.Gubao);
+ }
+ }
+
+ void ShowResult()
+ {
+ showResultTime = Time.time;
+ resultObj.SetActive(true);
+ var isSkip = skipToggle.isOn;
+ showCD = isSkip ? 0.1f : GubaoManager.Instance.selectCallIndex == 0 ? 1f : 2f;
+
+
+ if (GubaoManager.Instance.selectCallIndex == 0)
+ {
+ oneResultCell.SetActive(true);
+ oneResultCell.Display(0).Forget();
+ for (int i = 0; i < tenResultCells.Length; i++)
+ {
+ tenResultCells[i].SetActive(false);
+ }
+ }
+ else
+ {
+ oneResultCell.SetActive(false);
+ for (int i = 0; i < tenResultCells.Length; i++)
+ {
+ tenResultCells[i].SetActive(true);
+ tenResultCells[i].Display(i).Forget();
+ }
+ }
+
+ if (isSkip)
+ {
+ ShowVenderTalk(GetResultQuality());
+ }
+ }
+
+ void clickCallEvent()
+ {
+ if (!skipToggle.isOn)
+ {
+ showResultTime = Time.time + 2; //棰勮寤惰繜2绉掔瓑鏈嶅姟绔�
+ opObj.SetActive(false);
+ }
+ }
+
+ void ShowRate()
+ {
+ var config = HappyXBModel.Instance.GetXBItemConfigByType((int)HappXBTitle.Gubao);
+ for (int i = 0; i < config.GridItemRateList1.Length; i++)
+ {
+ //鍑忓幓涓婁竴涓粠宸�兼墠鏄鐜�
+ if (i == 0)
+ {
+ //灏忔暟鐐�2浣�
+ rateTexts[i].text = (config.GridItemRateList1[i][0]/100.0).ToString("0.00") + "%";
+ }
+ else
+ {
+ rateTexts[i].text = ((config.GridItemRateList1[i][0] - config.GridItemRateList1[i - 1][0])/100.0).ToString("0.00") + "%";
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Main/System/Gubao/GubaoCallWin.cs.meta b/Main/System/Gubao/GubaoCallWin.cs.meta
new file mode 100644
index 0000000..2f2f905
--- /dev/null
+++ b/Main/System/Gubao/GubaoCallWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: adfce0ce10dd1f641866ff3f91cafbfa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Gubao/GubaoManager.cs b/Main/System/Gubao/GubaoManager.cs
index d82667e..4c82568 100644
--- a/Main/System/Gubao/GubaoManager.cs
+++ b/Main/System/Gubao/GubaoManager.cs
@@ -32,6 +32,10 @@
//鎸� 鍏ㄩ儴 鍗囩骇 鍗囨槦 鍖哄垎
public Dictionary<int, List<int>> gubaoCollectDict = new Dictionary<int, List<int>>(); //鍙ゅ疂鍥鹃壌鎸夊搧璐ㄥ垪琛�
+ public const string skipKey = "SkipGBCall";
+
+ public Dictionary<int, int> emojiDict = new Dictionary<int, int>(); //鍝佽川锛歟mojiID椤哄簭
+ public int maxIdleTalk = 0;
public override void Init()
{
@@ -54,6 +58,9 @@
void ParseConfig()
{
+ var config = FuncConfigConfig.Get("Gubao1");
+ emojiDict = ConfigParse.ParseIntDict(config.Numerical1);
+ maxIdleTalk = int.Parse(config.Numerical2);
}
@@ -505,6 +512,22 @@
#endregion
+ #region 閴村疂
+ public event Action clickCallEvent;
+ int m_selectCallIndex = 0;//0锛�1鎶� 1锛�10鎶� 瀵瑰簲閰嶇疆椤哄簭
+ public int selectCallIndex
+ {
+ get { return m_selectCallIndex; }
+ set
+ {
+ m_selectCallIndex = value;
+ clickCallEvent?.Invoke();
+ }
+ }
+ #endregion
+
+
+
#region 绾㈢偣
Redpoint tmpRP = new Redpoint(MainRedDot.MainAffairsRedpoint, MainRedDot.RedPoint_GuaBao);
Redpoint gubaoRP = new Redpoint(MainRedDot.RedPoint_GuaBao, MainRedDot.RedPoint_GuaBao * 10 + 1); //鍙ゅ疂 鍜� 鍏ㄩ儴
@@ -514,7 +537,8 @@
Redpoint gubaoLVRP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 1, MainRedDot.RedPoint_GuaBao * 100 + 1); //鍗囩骇
Redpoint gubaoStarRP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 1, MainRedDot.RedPoint_GuaBao * 100 + 2); //鍗囨槦
-
+ Redpoint gbCall1RP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 2, (MainRedDot.RedPoint_GuaBao * 10 + 2) * 10 + 1); //1鎶�
+ Redpoint gbCall10RP = new Redpoint(MainRedDot.RedPoint_GuaBao * 10 + 2, (MainRedDot.RedPoint_GuaBao * 10 + 2) * 10 + 2); //10鎶�
public void UpdateRedpoint()
{
activeRP.state = RedPointState.None;
diff --git a/Main/System/Gubao/GubaoTipWin.cs b/Main/System/Gubao/GubaoTipWin.cs
index 55975bc..421ca92 100644
--- a/Main/System/Gubao/GubaoTipWin.cs
+++ b/Main/System/Gubao/GubaoTipWin.cs
@@ -8,7 +8,7 @@
/// </summary>
public class GubaoTipWin : UIBase
{
-[SerializeField] ImageEx gbImg;
+ [SerializeField] ImageEx gbImg;
[SerializeField] UIEffectPlayer gbBGEffect;
[SerializeField] UIEffectPlayer gbEffect;
[SerializeField] Text nameText;
diff --git a/Main/System/HappyXB/HappyXBModel.cs b/Main/System/HappyXB/HappyXBModel.cs
index c46c66b..eeeb461 100644
--- a/Main/System/HappyXB/HappyXBModel.cs
+++ b/Main/System/HappyXB/HappyXBModel.cs
@@ -135,6 +135,7 @@
public Dictionary<int, XBGetItem> xbResultDict { get; private set; } = new Dictionary<int, XBGetItem>(); //濂栧搧椤哄簭锛氬鍝�
public void GetServerXBResult(HA350_tagMCTreasureResult result)
{
+ int type = result.TreasureType;
xbResultDict.Clear();
addXBScore = result.AddMoneyValue;
addXBScoreType = result.AddMoneyType;
@@ -149,8 +150,9 @@
int index = int.Parse(resultData[i][0].ToString());
int itemId = int.Parse(resultData[i][1].ToString());
int count = int.Parse(resultData[i][2].ToString());
+ bool isOut = int.Parse(resultData[i][3].ToString()) == 1;
XBGetItem getItem = new XBGetItem();
- getItem.SetModel(index, itemId, count);
+ getItem.SetModel(index, itemId, count, isOut);
if (!xbResultDict.ContainsKey(i))
{
xbResultDict.Add(i, getItem);
@@ -167,9 +169,14 @@
{
RefreshXBResultAct();
}
- if (!UIManager.Instance.IsOpened<HeroCallResultWin>())
- {
- UIManager.Instance.OpenWindow<HeroCallResultWin>();
+
+ //姝﹀皢鎷涘嫙缁撴灉鏄嫭绔嬬晫闈紱鍙ゅ疂鏄悓涓�涓晫闈㈢敤RefreshXBResultAct澶勭悊
+ if (type == (int)HappXBTitle.HeroCallAdvanced)
+ {
+ if (!UIManager.Instance.IsOpened<HeroCallResultWin>())
+ {
+ UIManager.Instance.OpenWindow<HeroCallResultWin>();
+ }
}
}
@@ -710,13 +717,15 @@
public int gridIndex;
public int itemId;
public int count;
+ public bool isOut; //鏄惁婧㈠嚭
public DateTime createTime;
- public void SetModel(int index, int id, int count)
+ public void SetModel(int index, int id, int count, bool isOut)
{
this.gridIndex = index;
this.itemId = id;
this.count = count;
+ this.isOut = isOut;
createTime = TimeUtility.ServerNow;
}
}
@@ -728,13 +737,11 @@
//Store = 3,
//Warehouse = 4,
GatherSoul = 4, //鑱氶瓊瀵诲疂
- Gubao1 = 5,
- Gubao2 = 6,
- Gubao3 = 7,
- Gubao4 = 8,
- HeroCallNormal = 11, //11-鏅�氭嫑鍕�
+ Gubao = 5,
+
+ HeroCallNormal = 11, //11-鏅�氭嫑鍕� -鏆傛棤
HeroCallAdvanced = 12, //12-楂樼骇鎷涘嫙
- HeroCallScore = 13, //13-绉垎鎷涘嫙
+ HeroCallScore = 13, //13-绉垎鎷涘嫙 -鏆傛棤
YunShi1 = 105,
YunShi2 = 106,
YunShi3 = 107,
diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index 707ba55..ef49fec 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/Main/System/Main/HomeWin.cs
@@ -586,9 +586,7 @@
{
taskEffect.Stop();
}
- var config = ItemConfig.Get(taskConfig.AwardItemList[0][0]);
- awardIcon.SetOrgSprite(ItemConfig.Get(taskConfig.AwardItemList[0][0]).IconKey, GeneralDefine.itemIconDict.ContainsKey(config.Type) ? GeneralDefine.itemIconDict[config.Type] : "icon");
-
+ awardIcon.SetItemSprite(taskConfig.AwardItemList[0][0]);
awardCnt.text = taskConfig.AwardItemList[0][1].ToString();
}
}
diff --git a/Main/Utility/ComponentExtersion.cs b/Main/Utility/ComponentExtersion.cs
index c7aadbc..c3b8882 100644
--- a/Main/Utility/ComponentExtersion.cs
+++ b/Main/Utility/ComponentExtersion.cs
@@ -389,8 +389,9 @@
return;
}
- var sprite = UILoader.LoadSprite("icon", itemConfig.IconKey);
- _image.overrideSprite = sprite;
+ _image.SetOrgSprite(itemConfig.IconKey,
+ GeneralDefine.itemIconDict.ContainsKey(itemConfig.Type) ? GeneralDefine.itemIconDict[itemConfig.Type] : "icon");
+
}
public static void SetSkillSprite(this Image _image, int skillID)
--
Gitblit v1.8.0