From e33b8deea8413bcbc74998122ad91e6c17504729 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 04 二月 2026 15:57:42 +0800
Subject: [PATCH] 483 【游历】增加体力补充
---
Main/System/ItemTip/BoxGetItemModel.cs | 231 +--------------------------------------------------------
1 files changed, 4 insertions(+), 227 deletions(-)
diff --git a/Main/System/ItemTip/BoxGetItemModel.cs b/Main/System/ItemTip/BoxGetItemModel.cs
index a508a9f..f044c67 100644
--- a/Main/System/ItemTip/BoxGetItemModel.cs
+++ b/Main/System/ItemTip/BoxGetItemModel.cs
@@ -10,75 +10,22 @@
public class BoxGetItemModel : GameSystemManager<BoxGetItemModel>
{
- List<string> commonShowAwardEvents = new List<string>(); //鑾峰彇濂栧姳鐨勫睍绀轰簨浠�
public override void Init()
{
- var config = FuncConfigConfig.Get("CommonShowAwards");
- commonShowAwardEvents = JsonMapper.ToObject<List<string>>(config.Numerical1);
}
- // void OnBeforePlayerDataInitialize()
- // {
- // getItems = null;
- // getCoinsType = 0;
- // getCoinsCnt = 0;
- // }
#region 澶勭悊鏈嶅姟鍣ㄦ暟鎹�
- // public BoxGetItemInfo[] getItems { get; private set; }
- // public int getCoinsType { get; private set; }
- // public long getCoinsCnt { get; private set; }
- // public event Action<int, int, BoxGetItemInfo[]> RefreshGetItemAct;
- // public void SetGetBoxItemInfo(HA810_tagMCNotifyUseItemGetItem boxItemInfo)
- // {
- // getItems = JsonMapper.ToObject<BoxGetItemInfo[]>(boxItemInfo.GetItemData);
- // getCoinsType = boxItemInfo.MoneyType;
- // getCoinsCnt = boxItemInfo.MoneyCount;
- // if (!NewBieCenter.Instance.inGuiding)
- // {
- // List<Item> items = new List<Item>();
- // for (int i = 0; i < getItems.Length; i++)
- // {
- // BoxGetItemInfo info = getItems[i];
- // Dictionary<int, List<int>> useDataDic = ConfigParse.Analysis(info.UserData);
- // if (useDataDic != null && useDataDic.TryGetValue((int)ItemUseDataKey.itemCount, out List<int> list) && list != null && list.Count > 0)
- // {
- // int count = list[0];
- // items.Add(new Item(info.ItemID, count));
- // }
- // else
- // {
- // items.Add(new Item(info.ItemID, info.Count));
- // }
-
- // }
- // ItemLogicUtility.Instance.ShowGetItem(items, seconds: 0);
- // }
-
- // if (RefreshGetItemAct != null)
- // {
- // RefreshGetItemAct((int)boxItemInfo.UseItemID, (int)boxItemInfo.UseCount, getItems);
- // }
-
-
- // }
+
//鑾峰緱濂栧姳灞曠ず
public void ReceiveAwardNotify(HA801_tagMCGiveAwardInfo netPack)
{
var eventName = UIHelper.ServerStringTrim(netPack.EventName);
- // 浠欑洘鏀诲煄鎴�
- // if (eventName == "FamilyGCZSQGrid" || eventName == "FamilyGCZSQPass" || eventName == "FamilyGCZSQPassAll" ||
- // eventName == "FamilyGCZContiribution" || eventName == "FamilyGCZAtk")
- // {
- // ModelCenter.Instance.GetModel<FairySiegeActModel>()?.OnUpdateAwardInfoAction(netPack);
- // return;
- // }
- // if (!commonShowAwardEvents.Contains(eventName))
- // return;
+
if (string.IsNullOrEmpty(eventName))
{
Debug.Log("鑾峰緱鐗╁搧灞曠ず 鏃犱簨浠跺悕");
@@ -132,173 +79,11 @@
ItemLogicUtility.Instance.ShowGetItem(showItems, eventName, isMergeItem:isMergeItem);
}
- // public int GetUseCntByID(int itemId)
- // {
- // return PackManager.Instance.GetItemUsedTimesToday(itemId);
- // }
+
#endregion
- // #region 娑堣�楁潗鏂欒揣甯佸紑鍚殑瀹濈
- // public void SetModel(string guid, int itemId)
- // {
- // ChestsConfig chestsConfig = ChestsConfig.Get(itemId);
- // this.guid = guid;
- // this.itemId = itemId;
- // if (guid == "" || chestsConfig == null) return;
-
- // ItemConfig boxConfig = ItemConfig.Get(itemId);
- // if (PlayerDatas.Instance.baseData.LV < boxConfig.UseLV)
- // {
- // ServerTipDetails.DisplayNormalTip(Language.Get("MakeUseItem101", boxConfig.UseLV));
- // return;
- // }
-
- // CheckOpenBoxCondi(guid, itemId);
- // }
-
- // public void CheckOpenBoxCondi(string guid, int itemId, int useCnt = 1)
- // {
- // ChestsConfig chestsConfig = ChestsConfig.Get(itemId);
- // if (chestsConfig == null) return;
-
- // ItemConfig boxConfig = ItemConfig.Get(itemId);
-
- // if (chestsConfig.ExpendItemID != 0)
- // {
- // ItemConfig itemConfig = ItemConfig.Get(chestsConfig.ExpendItemID);
- // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("OpenBoxTool", itemConfig.ItemName), (bool isOk) =>
- // {
- // if (isOk)
- // {
- // if (!IsEnoughTools(chestsConfig.ExpendItemID, chestsConfig.ExpendCount * useCnt))
- // {
- // SysNotifyMgr.Instance.ShowTip("OpenBoxToolNoEnough", itemConfig.ItemName);
- // return;
- // }
- // else
- // {
- // CheckOpenMoney(chestsConfig, boxConfig, useCnt);
- // }
- // }
- // });
- // }
- // else
- // {
- // CheckOpenMoney(chestsConfig, boxConfig, useCnt);
- // }
- // }
-
- // public void CheckOpenMoney(ChestsConfig chestsConfig, ItemConfig boxConfig, int useCnt)
- // {
- // if (!IsEnoughMoney(chestsConfig.OpenMoney * useCnt))
- // {
- // SysNotifyMgr.Instance.ShowTip("BoxOpenCostMoney", 1);
- // return;
- // }
- // else
- // {
- // if (chestsConfig.OpenMoney > 0)
- // {
- // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("OpenBoxGold", chestsConfig.OpenMoney * useCnt), (bool isOk) =>
- // {
- // if (isOk)
- // {
- // CheckOtherCondi(chestsConfig, boxConfig, useCnt);
- // }
- // });
- // }
- // else
- // {
- // CheckOtherCondi(chestsConfig, boxConfig, useCnt);
- // }
- // }
- // }
-
- // public void CheckOtherCondi(ChestsConfig chestsConfig, ItemConfig boxConfig, int useCnt)
- // {
-
- // if (boxConfig.MaxSkillCnt > 0 && GetUseCntByID(itemId) >= boxConfig.MaxSkillCnt)
- // {
- // SysNotifyMgr.Instance.ShowTip("UseCntLimit");
- // return;
- // }
-
- // if (IsSelectItemByID(itemId))
- // {
- // UIManager.Instance.OpenWindow<ChooseItemsWin>();
- // return;
- // }
-
- // ItemLogicUtility.Instance.UseItem(guid, useCnt);
- // }
-
- // public bool CheckOpenBoxCondition(int itemId, out bool isBox)
- // {
- // isBox = false;
- // ChestsConfig chestsConfig = ChestsConfig.Get(itemId);
- // if (chestsConfig == null) return false;
-
- // isBox = true;
- // bool isCanOpen = true;
- // ItemConfig boxConfig = ItemConfig.Get(itemId);
- // if (PlayerDatas.Instance.baseData.LV < boxConfig.UseLV)
- // {
- // isCanOpen = false;
- // return isCanOpen;
- // }
-
- // if (chestsConfig.ExpendItemID != 0)
- // {
- // ItemConfig itemConfig = ItemConfig.Get(chestsConfig.ExpendItemID);
- // if (!IsEnoughTools(chestsConfig.ExpendItemID, chestsConfig.ExpendCount))
- // {
- // isCanOpen = false;
- // return isCanOpen;
- // }
- // }
-
- // if (!IsEnoughMoney(chestsConfig.OpenMoney))
- // {
- // isCanOpen = false;
- // return isCanOpen;
- // }
-
- // if (boxConfig.MaxSkillCnt > 0 && GetUseCntByID(itemId) >= boxConfig.MaxSkillCnt)
- // {
- // isCanOpen = false;
- // return isCanOpen;
- // }
-
- // return isCanOpen;
- // }
-
- // private bool IsEnoughMoney(int moneyCnt)
- // {
- // ulong haveMoney = UIHelper.GetMoneyCnt(1);
- // if (haveMoney >= (ulong)moneyCnt)
- // {
- // return true;
- // }
- // else
- // {
- // return false;
- // }
- // }
-
- // private bool IsEnoughTools(int itemId, int toolCnt)
- // {
- // int count = PackManager.Instance.GetItemCountByID(PackType.Item, itemId);
- // if (count >= toolCnt)
- // {
- // return true;
- // }
- // else
- // {
- // return false;
- // }
- // }
- // #endregion
+
//瀹濈棰勮鐗╁搧 (闅忔満鑾峰緱)
public List<Item> GetBoxItems(int boxID)
@@ -535,14 +320,6 @@
}
-public class BoxGetItemInfo
-{
- public int ItemID;
- public int Count;
- public int IsBind;
- public int IsSuite;
- public string UserData;
-}
public class ChooseItems
{
--
Gitblit v1.8.0