From 89343a7a0909e5244a3b69c4db1294de4536243b Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期一, 15 十二月 2025 18:15:22 +0800
Subject: [PATCH] 262 幻境阁系统-客户端 新增仅适用武将解锁的头像和形象的红点移除规则
---
Main/System/Store/StoreModel.cs | 40 ++++++++++++++++++++++++++++++++--------
1 files changed, 32 insertions(+), 8 deletions(-)
diff --git a/Main/System/Store/StoreModel.cs b/Main/System/Store/StoreModel.cs
index cc788fa..56e6eb9 100644
--- a/Main/System/Store/StoreModel.cs
+++ b/Main/System/Store/StoreModel.cs
@@ -22,7 +22,7 @@
public class StoreModel : GameSystemManager<StoreModel>
{
- public Dictionary<int, List<StoreData>> storeTypeDict { get; private set; } //鎵�鏈夋樉绀哄晢鍝�
+ public Dictionary<int, List<StoreData>> storeTypeDict { get; private set; } //鎵�鏈夋樉绀哄晢鍝� 鍟嗗簵绫诲瀷锛氬晢鍝佸垪琛�
public Dictionary<int, int> shopRefreshCntDict = new Dictionary<int, int>(); //鍒锋柊娆℃暟
private Dictionary<int, int> shopItemlimitDict = new Dictionary<int, int>(); //宸茶喘涔版鏁�
public event Action RefreshBuyShopLimitEvent;
@@ -38,12 +38,11 @@
public int heroSoulRefreshMoney;
public int heroSoulRefreshFreeCount;
- Dictionary<int, List<int>> freeShopDict = new Dictionary<int, List<int>>();
+ public Dictionary<int, List<int>> freeShopDict = new Dictionary<int, List<int>>(); //鍏嶈垂鍟嗗搧 鍟嗗簵绫诲瀷锛氬晢鍝佸垪琛�
public Dictionary<int, int> shopMoneyTypeDict = new Dictionary<int, int>();
public override void Init()
{
- RedpointCenter.Instance.AddParent(MainRedDot.MainGuildRedpoint, MainRedDot.Store_REDPOINT);
FuncOpen.Instance.OnFuncStateChangeEvent += FuncStateChange;
TimeMgr.Instance.OnDayEvent += RefreshDay;
GuildManager.Instance.EnterOrQuitGuildEvent += EnterOrQuitGuildEvent;
@@ -281,6 +280,11 @@
for (int i = 0; i < netPack.ShopIDList.Length; i++)
{
var config = StoreConfig.Get((int)netPack.ShopIDList[i]);
+ if (config == null)
+ {
+ Debug.LogError("鍓嶅悗绔晢搴楁暟鎹笉涓�鑷�");
+ continue;
+ }
//UnlockType 2 鐢辨湇鍔$閫氱煡
StoreData storeData = new StoreData();
storeData.shopId = config.ID;
@@ -316,7 +320,7 @@
if (storeConfig.ItemID != 0)
{
- ShopItemInfo shopItem = new ShopItemInfo(storeConfig.ID, storeConfig.ItemCnt);
+ ShopItemInfo shopItem = new ShopItemInfo(storeConfig.ItemID, storeConfig.ItemCnt);
shopItemlist.Add(shopItem);
}
var extraItem = storeConfig.ItemListEx;
@@ -339,7 +343,7 @@
List<int[]> shopItemlist = new List<int[]>();
if (storeConfig.ItemID != 0)
{
- shopItemlist.Add(new int[] { storeConfig.ID, storeConfig.ItemCnt});
+ shopItemlist.Add(new int[] { storeConfig.ItemID, storeConfig.ItemCnt});
}
var extraItem = storeConfig.ItemListEx;
for (int i = 0; i < extraItem.Length; i++)
@@ -368,8 +372,10 @@
}
- //浠欑帀璐拱鐗╁搧鐨勪簩娆$‘璁ゆ锛屼竴绾ц揣甯佸彧鏈変粰鐜� 榛樿涓轰粰鐜夊嵆鍙�
+ //璐у竵璐拱鐨勪簩娆$‘璁ゆ鐨勭‘璁よ褰�
Dictionary<int, bool> buyItemCheckDict = new Dictionary<int, bool>(); //璁板綍鍕鹃�変俊鎭�
+
+ //璐拱鍟嗗簵鐗╁搧鐨勪簩娆$‘璁ゆ
//eventType 浜屾纭妗嗙被鍨嬶紝瀵瑰簲鏋氫妇 BuyStoreItemCheckType
public void SendBuyShopItemWithPopCheck(StoreConfig model, int count, int eventType = 0)
{
@@ -386,7 +392,7 @@
return;
}
- ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("CostMoney", model.MoneyNum, model.MoneyType),
+ ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("BuyStoreItem", model.MoneyNum, model.MoneyType, model.Name),
Language.Get("ConfirmCancel102"), (bool isOk, bool isToggle) =>
{
if (isOk)
@@ -450,6 +456,10 @@
{
if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return;
+ if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Guild) && PlayerDatas.Instance.fairyData.HasFairy)
+ {
+ RedpointCenter.Instance.AddParent(MainRedDot.MainGuildRedpoint, MainRedDot.Store_REDPOINT);
+ }
normalRedpoint.state = RedPointState.None;
guildRedpoint.state = RedPointState.None;
@@ -541,6 +551,17 @@
return 0;
}
+
+ public bool CheckPopBuyWin(int shopID)
+ {
+ int state = GetShopIDState(shopID);
+ if (state == 1 || state == 3)
+ {
+ SysNotifyMgr.Instance.ShowTip(StringUtility.Concat("StoreTip", state.ToString()));
+ return false;
+ }
+ return true;
+ }
}
public enum StoreFunc
@@ -548,7 +569,10 @@
Normal = 1, //1锛氬潑甯�
Guild = 2, //2锛氬叕浼�
Hero = 3, //3锛氬皢榄�
-
+ OSHeroCall = 4, //4锛氬紑鏈嶆嫑鍕熺ぜ鍖�
+ OSGalaChange = 5, //5锛氬紑鏈嶅簡鍏稿厬鎹�
+ OSGalaGift = 6, //6锛氬紑鏈嶅簡鍏哥ぜ鍖�
+
}
--
Gitblit v1.8.0