From bd6f9a734277e57efe5abc8c32a85d5de27cdc03 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 14 三月 2026 00:18:49 +0800
Subject: [PATCH] 555 子 【付费功能】皮肤商店 / 【付费功能】时装商店-客户端
---
Main/System/Store/SkinStoreLineCell.cs | 28 ++
Main/System/KnapSack/Logic/CommonGetItemWin.cs | 3
Main/System/Store/SkinStoreWin.cs | 142 +---------
Main/System/HeroDebut/HeroDebutSkinWin.cs | 2
Main/System/Store/StoreModel.cs | 2
Main/System/Store/HeroSkinGiftWin.cs | 114 ++++++++
Main/System/TimeRush/TimeRushGiftCell.cs | 2
Main/System/TimingGift/TimingGiftWin.cs | 2
Main/Utility/EnumHelper.cs | 1
Main/System/Store/SkinStoreCell.cs | 65 +++++
Main/System/Store/HeroSkinGiftWin.cs.meta | 11
Main/System/KnapSack/BackpackData.cs | 2
Main/System/ItemTip/BoxGetItemModel.cs | 28 +
Main/System/Recharge/RechargeGoldCell.cs | 2
Main/Config/PartialConfigs/HeroSkinAttrConfig.cs | 19 -
Main/System/Recharge/RechargeManager.cs | 26 ++
Main/System/HeroUI/HeroSkinWin.cs | 29 +
Main/Core/NetworkPackage/ServerPack/HA8_Item/HA801_tagMCGiveAwardInfo.cs | 2
Main/System/DailySpecials/DailySpecialsItem.cs | 2
Main/System/OSActivity/OSRankHeroCallGiftCell.cs | 2
Main/System/HeroUI/HeroCardCell.cs | 2
Main/System/Store/SkinStoreBuyTipWin.cs | 85 ++++++
Main/System/KnapSack/Logic/ItemLogicUtility.cs | 21 +
Main/System/HeroUI/HeroUIManager.Collect.cs | 2
Main/System/BoneField/BoneFieldManager.cs | 4
Main/System/FirstCharge/FirstChargeWin.cs | 4
Main/System/Message/RichTableEvent.cs | 2
Main/System/Recharge/PrivilegeCardCell.cs | 4
Main/System/GeneralConfig/GeneralDefine.cs | 4
Main/System/HeroDebut/HeroDebutStarUpCell.cs | 2
Main/System/Store/SkinStoreBuyTipWin.cs.meta | 11
Main/System/Store/SkinStoreLineCell.cs.meta | 11
Main/System/TimingGift/TimingGiftCtgIdCell.cs | 2
Main/System/HeroUI/HeroTrainWin.cs | 19
Main/System/BattlePass/BattlePassCommonWin.cs | 2
Main/System/InternalAffairs/GoldRushAutoWin.cs | 2
Main/System/DailySpecials/DailySpecialsDayGiftCell.cs | 2
Main/System/DailySpecials/DailySpecialsWin.cs | 3
Main/System/HeroUI/HeroBestWin.cs | 4
Main/System/DayMission/WeekBattlePassWin.cs | 2
Main/System/DailySpecials/DailySpecialsWeekGiftCell.cs | 2
Main/Config/PartialConfigs/OrderInfoConfig.cs | 2
Main/System/Store/SkinStoreCell.cs.meta | 11
Main/Utility/UIHelper.cs | 6
Main/System/InternalAffairs/GoldRushAutoBuyWin.cs | 2
Main/System/Recharge/RechargeDJQCell.cs | 2
Main/System/OSActivity/OSGalaGiftCell.cs | 2
Main/System/Recharge/ExpSecretCollectionWin.cs | 2
Main/System/HeroDebut/HeroDebutGiftCell.cs | 2
Main/System/HeroUI/HeroUIManager.cs | 19
50 files changed, 518 insertions(+), 204 deletions(-)
diff --git a/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs b/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs
index 402fa21..2424c9b 100644
--- a/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs
+++ b/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs
@@ -4,29 +4,16 @@
public partial class HeroSkinAttrConfig : ConfigBase<int, HeroSkinAttrConfig>
{
- public static List<int> itemIdList = new List<int>();
+ public static Dictionary<int, int> itemIdToSkinIDDict = new Dictionary<int, int>();
protected override void OnConfigParseCompleted()
{
- itemIdList.Add(NeedItemID);
+ itemIdToSkinIDDict[NeedItemID] = SkinID;
}
- /// <summary>
- /// 閫氳繃鐗╁搧ID鑾峰彇鐨偆ID
- /// </summary>
- static Dictionary<int, int> itemDict = new();
public static bool TryGetSkinIDByItemID(int itemID, out int skinID)
{
- if (itemDict.IsNullOrEmpty())
- {
- foreach (var config in GetValues())
- {
- if (itemDict == null)
- itemDict = new Dictionary<int, int>();
- itemDict[config.NeedItemID] = config.SkinID;
- }
- }
- return itemDict.TryGetValue(itemID, out skinID);
+ return itemIdToSkinIDDict.TryGetValue(itemID, out skinID);
}
}
diff --git a/Main/Config/PartialConfigs/OrderInfoConfig.cs b/Main/Config/PartialConfigs/OrderInfoConfig.cs
index c42d540..3b76420 100644
--- a/Main/Config/PartialConfigs/OrderInfoConfig.cs
+++ b/Main/Config/PartialConfigs/OrderInfoConfig.cs
@@ -2,7 +2,7 @@
public partial class OrderInfoConfig : ConfigBase<int, OrderInfoConfig>
{
- //0.1鎶�
+ //0.1鎶� 娉ㄦ剰鐢║IHelper.GetMoneyFormat(PayRMBNumOnSale)
public float PayRMBNumOnSale
{
get
diff --git a/Main/Core/NetworkPackage/ServerPack/HA8_Item/HA801_tagMCGiveAwardInfo.cs b/Main/Core/NetworkPackage/ServerPack/HA8_Item/HA801_tagMCGiveAwardInfo.cs
index 13c33c1..71ad932 100644
--- a/Main/Core/NetworkPackage/ServerPack/HA8_Item/HA801_tagMCGiveAwardInfo.cs
+++ b/Main/Core/NetworkPackage/ServerPack/HA8_Item/HA801_tagMCGiveAwardInfo.cs
@@ -30,6 +30,7 @@
MoneyList[i] = new tagMCGiveAwardMoney();
TransBytes (out MoneyList[i].MoneyType, vBytes, NetDataType.BYTE);
TransBytes (out MoneyList[i].MoneyValue, vBytes, NetDataType.DWORD);
+ TransBytes (out MoneyList[i].IsBind, vBytes, NetDataType.BYTE);
}
TransBytes (out ItemLen, vBytes, NetDataType.BYTE);
ItemList = new tagMCGiveAwardItem[ItemLen];
@@ -47,6 +48,7 @@
public class tagMCGiveAwardMoney {
public byte MoneyType;
public uint MoneyValue;
+ public byte IsBind; // 鍚岀墿鍝両sBind鏍囪閫昏緫
}
public class tagMCGiveAwardItem {
diff --git a/Main/System/BattlePass/BattlePassCommonWin.cs b/Main/System/BattlePass/BattlePassCommonWin.cs
index 8805e4e..603cc8f 100644
--- a/Main/System/BattlePass/BattlePassCommonWin.cs
+++ b/Main/System/BattlePass/BattlePassCommonWin.cs
@@ -105,7 +105,7 @@
rechargeRect.SetActive(true);
var ctgID = BattlePassManager.Instance.GetCTGIDByType(battlePasstype);
RechargeManager.Instance.TryGetOrderInfo(ctgID, out var orderInfoConfig);
- buyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ buyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
var config = CTGConfig.Get(ctgID);
int itemID = config.GainItemList[0][0];
diff --git a/Main/System/BoneField/BoneFieldManager.cs b/Main/System/BoneField/BoneFieldManager.cs
index bfc1f3a..da5293e 100644
--- a/Main/System/BoneField/BoneFieldManager.cs
+++ b/Main/System/BoneField/BoneFieldManager.cs
@@ -177,7 +177,7 @@
List<Item> showItems = new List<Item>();
foreach (var item in result.itemInfo)
{
- Item tempItem = new Item(item.ItemID, item.Count, _useType: item.BeautyEx != 0 ? 2 : 0);
+ Item tempItem = new Item(item.ItemID, item.Count, _useType: item.IsBind);
showItems.Add(tempItem);
}
ItemLogicUtility.Instance.ShowGetItem(showItems, isMergeItem: false);
@@ -187,7 +187,7 @@
{
public int ItemID { get; set; }
public int Count { get; set; }
- public int BeautyEx { get; set; }
+ public int IsBind { get; set; }
}
public class ChallengeResultData
diff --git a/Main/System/DailySpecials/DailySpecialsDayGiftCell.cs b/Main/System/DailySpecials/DailySpecialsDayGiftCell.cs
index c2382f8..ebad308 100644
--- a/Main/System/DailySpecials/DailySpecialsDayGiftCell.cs
+++ b/Main/System/DailySpecials/DailySpecialsDayGiftCell.cs
@@ -61,7 +61,7 @@
imgMask.SetActive(isBuy);
imgBuy.SetSprite(!isBuy ? "DailySpecialsBuy1" : "DailySpecialsBuy2");
- txtBuy.text = !isBuy ? Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale) : Language.Get("storename11");
+ txtBuy.text = !isBuy ? Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale)) : Language.Get("storename11");
imgGiftIcon.SetSprite(ctgConfig.Icon);
txtGiftTitle.text = ctgConfig.Title;
diff --git a/Main/System/DailySpecials/DailySpecialsItem.cs b/Main/System/DailySpecials/DailySpecialsItem.cs
index 805d3d6..7749821 100644
--- a/Main/System/DailySpecials/DailySpecialsItem.cs
+++ b/Main/System/DailySpecials/DailySpecialsItem.cs
@@ -61,7 +61,7 @@
btnBuy.SetActive(!isBuy);
imgBuy.SetActive(isBuy);
- txtBuy.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ txtBuy.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
btnBuy.SetListener(() =>
{
diff --git a/Main/System/DailySpecials/DailySpecialsWeekGiftCell.cs b/Main/System/DailySpecials/DailySpecialsWeekGiftCell.cs
index 750e0e9..b82ed0e 100644
--- a/Main/System/DailySpecials/DailySpecialsWeekGiftCell.cs
+++ b/Main/System/DailySpecials/DailySpecialsWeekGiftCell.cs
@@ -61,7 +61,7 @@
imgMask.SetActive(isBuy);
imgBuy.SetSprite(!isBuy ? "DailySpecialsBuy1" : "DailySpecialsBuy2");
- txtBuy.text = !isBuy ? Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale) : Language.Get("storename11");
+ txtBuy.text = !isBuy ? Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale)) : Language.Get("storename11");
imgGiftIcon.SetSprite(ctgConfig.Icon);
txtGiftTitle.text = ctgConfig.Title;
diff --git a/Main/System/DailySpecials/DailySpecialsWin.cs b/Main/System/DailySpecials/DailySpecialsWin.cs
index 66786fb..c58b056 100644
--- a/Main/System/DailySpecials/DailySpecialsWin.cs
+++ b/Main/System/DailySpecials/DailySpecialsWin.cs
@@ -77,7 +77,8 @@
bool finalIsBuyAll = isBuyAll || hasAnySingleItemBought;
imgAllBuyHave.SetActive(isBuyAll);
- txtBuyAll.text = !finalIsBuyAll ? Language.Get("DailySpecials03", Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale)) : Language.Get("storename11");
+ txtBuyAll.text = !finalIsBuyAll ? Language.Get("DailySpecials03", Language.Get("PayMoneyNum",
+ UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale))) : Language.Get("storename11");
btnBuyAll.interactable = !finalIsBuyAll;
imgBuyAll.gray = finalIsBuyAll;
for (int i = 0; i < items.Length; i++)
diff --git a/Main/System/DayMission/WeekBattlePassWin.cs b/Main/System/DayMission/WeekBattlePassWin.cs
index d654365..b4a4b74 100644
--- a/Main/System/DayMission/WeekBattlePassWin.cs
+++ b/Main/System/DayMission/WeekBattlePassWin.cs
@@ -77,7 +77,7 @@
{
var ctgID = BattlePassManager.Instance.GetCTGIDByType((int)BattlePassType.Week);
RechargeManager.Instance.TryGetOrderInfo(ctgID, out var orderInfoConfig);
- buyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ buyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
buyBtn.SetInteractable(true);
}
else
diff --git a/Main/System/FirstCharge/FirstChargeWin.cs b/Main/System/FirstCharge/FirstChargeWin.cs
index 012f3ff..43ea67c 100644
--- a/Main/System/FirstCharge/FirstChargeWin.cs
+++ b/Main/System/FirstCharge/FirstChargeWin.cs
@@ -257,7 +257,7 @@
OrderInfoConfig orderInfoConfig;
if (model.TryGetOrderInfoConfigByFirstID(firstID, out orderInfoConfig))
{
- txtTabTitles[i].text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ txtTabTitles[i].text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
}
}
}
@@ -280,7 +280,7 @@
bool isBuy = firstChargeData.IsBuy();
btnBuy.SetActive(!isBuy);
btnHave.SetActive(isBuy);
- txtBuy.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale);
+ txtBuy.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
//棰嗗彇
int day = firstChargeData.GetNowBuyDay();
//0: 宸查鍙� 1: 涓嶅彲棰嗗彇 2: 鍙鍙�
diff --git a/Main/System/GeneralConfig/GeneralDefine.cs b/Main/System/GeneralConfig/GeneralDefine.cs
index 25ff056..61fdd5f 100644
--- a/Main/System/GeneralConfig/GeneralDefine.cs
+++ b/Main/System/GeneralConfig/GeneralDefine.cs
@@ -49,6 +49,7 @@
public static int review_MainLevel;
public static int review_CD;
public static string[] noAdsChannels;
+ public static int[] heroSkinGiftList;
public static void Init()
{
try
@@ -113,6 +114,9 @@
review_MainLevel = int.Parse(config.Numerical3);
review_CD = int.Parse(config.Numerical4);
noAdsChannels = JsonMapper.ToObject<string[]>(config.Numerical5);
+
+ config = FuncConfigConfig.Get("HeroSkinGift");
+ heroSkinGiftList = JsonMapper.ToObject<int[]>(config.Numerical1);
}
catch (Exception ex)
{
diff --git a/Main/System/HeroDebut/HeroDebutGiftCell.cs b/Main/System/HeroDebut/HeroDebutGiftCell.cs
index 9978a1c..2a8124d 100644
--- a/Main/System/HeroDebut/HeroDebutGiftCell.cs
+++ b/Main/System/HeroDebut/HeroDebutGiftCell.cs
@@ -46,7 +46,7 @@
bool isCanBuy = manager.IsNoSellOutCTGID(ctgId);
titleText.text = config.Title;
buyImage.SetSprite(isCanBuy ? "DailySpecialsBuy1" : "DailySpecialsBuy2");
- buyText.text = !isCanBuy ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNum));
+ buyText.text = !isCanBuy ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNumOnSale));
limitCountText.SetActive(true);
limitCountText.text = Language.Get("TimeRush07", UIHelper.AppendColor(rechargeCount.totalCount >= config.TotalBuyCount ? TextColType.Red : TextColType.LightGreen, Mathf.Max(0, config.TotalBuyCount - rechargeCount.totalCount).ToString()));
buyButton.interactable = isCanBuy;
diff --git a/Main/System/HeroDebut/HeroDebutSkinWin.cs b/Main/System/HeroDebut/HeroDebutSkinWin.cs
index b240f83..ac759b1 100644
--- a/Main/System/HeroDebut/HeroDebutSkinWin.cs
+++ b/Main/System/HeroDebut/HeroDebutSkinWin.cs
@@ -174,7 +174,7 @@
bool isCanBuy = manager.IsNoSellOutCTGID(ctgId);
//buyImage.gray = !isCanBuy;
- buyText.text = !isCanBuy ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNum));
+ buyText.text = !isCanBuy ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNumOnSale));
buyButton.interactable = isCanBuy;
buyButton.SetListener(() =>
diff --git a/Main/System/HeroDebut/HeroDebutStarUpCell.cs b/Main/System/HeroDebut/HeroDebutStarUpCell.cs
index 6c4f773..a6f8a21 100644
--- a/Main/System/HeroDebut/HeroDebutStarUpCell.cs
+++ b/Main/System/HeroDebut/HeroDebutStarUpCell.cs
@@ -58,7 +58,7 @@
}
});
//buyImage.gray = state == 0 || !isNoSellOut;
- buyText.text = !isNoSellOut ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNum));
+ buyText.text = !isNoSellOut ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNumOnSale));
limitText.text = Language.Get("TimeRush08", UIHelper.AppendColor(rechargeCount.totalCount >= ctgConfig.TotalBuyCount ? TextColType.Red : TextColType.DarkGreen, $"{rechargeCount.totalCount}/{ctgConfig.TotalBuyCount}"));
bool isHeroStarOk = manager.IsHeroStarCntOk(heroConfig.HeroID, config.NeedStar);
upProcssBGTransform.SetActive(!isFrist);
diff --git a/Main/System/HeroUI/HeroBestWin.cs b/Main/System/HeroUI/HeroBestWin.cs
index 034aa24..634fa5a 100644
--- a/Main/System/HeroUI/HeroBestWin.cs
+++ b/Main/System/HeroUI/HeroBestWin.cs
@@ -71,10 +71,12 @@
showFuncBtn.AddListener(() =>
{
funcForm.SetActive(true);
+ UIManager.Instance.GetUI<HeroBestBaseWin>().GetCanvasGroup().alpha = 1;
});
seeLhBtn.AddListener(() =>
{
funcForm.SetActive(false);
+ UIManager.Instance.GetUI<HeroBestBaseWin>().GetCanvasGroup().alpha = 0;
});
rightBtn.AddListener(() =>
{
@@ -124,6 +126,8 @@
unfoldState = false;
allAttrScroll.verticalNormalizedPosition = 1;
Display();
+ HeroUIManager.Instance.skinRedpoint.state = HeroUIManager.Instance.HeroAllSkinStateForRedpoint(HeroUIManager.Instance.selectForPreviewHeroID, true) > 0 ? RedPointState.Simple : RedPointState.None;
+
}
diff --git a/Main/System/HeroUI/HeroCardCell.cs b/Main/System/HeroUI/HeroCardCell.cs
index 3e5f1ca..ad82c97 100644
--- a/Main/System/HeroUI/HeroCardCell.cs
+++ b/Main/System/HeroUI/HeroCardCell.cs
@@ -64,7 +64,7 @@
trainStateImg.SetActive(false);
}
- starRedImg.SetActive(funcState == 2);
+ starRedImg.SetActive(funcState == 2 || HeroUIManager.Instance.HeroAllSkinStateForRedpoint(hero.heroId) > 0);
nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, hero.breakLevel);
awakeImg.SetActive(hero.awakeLevel > 0);
diff --git a/Main/System/HeroUI/HeroSkinWin.cs b/Main/System/HeroUI/HeroSkinWin.cs
index 4699711..ed48506 100644
--- a/Main/System/HeroUI/HeroSkinWin.cs
+++ b/Main/System/HeroUI/HeroSkinWin.cs
@@ -45,18 +45,12 @@
showFuncBtn.AddListener(() =>
{
funcForm.SetActive(true);
- if (hero != null)
- {
- UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 1;
- }
+ ChangeParentWinAlpha(1);
});
seeLhBtn.AddListener(() =>
{
funcForm.SetActive(false);
- if (hero != null)
- {
- UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 0;
- }
+ ChangeParentWinAlpha(0);
});
previewFightBtn.AddListener(() =>
{
@@ -85,6 +79,7 @@
{
showGetObj.SetActive(false);
showNormalObj.SetActive(true);
+ ChangeParentWinAlpha(1);
});
changeClothBtn.AddListener(() =>
@@ -153,6 +148,7 @@
skinNameText.text = HeroSkinConfig.Get(skinID).SkinName;
RefreshAttr();
ShowBtns();
+ HeroUIManager.Instance.skinRedpoint.state = HeroUIManager.Instance.HeroAllSkinStateForRedpoint(heroID, hero == null) > 0 ? RedPointState.Simple : RedPointState.None;
}
@@ -224,6 +220,7 @@
if (activeSkinID == skinID && HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID))
{
showGetObj.SetActive(true);
+ ChangeParentWinAlpha(0);
showNormalObj.SetActive(false);
Display();
skinScroller.m_Scorller.RefreshActiveCellViews();
@@ -283,7 +280,7 @@
unlockBtn.SetActive(true);
int itemID = cfg.NeedItemID;
itemIcon.SetItemSprite(itemID);
- itemCountText.text = UIHelper.ShowUseItem(PackType.Item, itemID, 1, bright:false);
+ itemCountText.text = UIHelper.ShowUseItem(PackType.Item, itemID, 1, bright: false);
}
putonBtn.SetActive(false);
putonYetObj.SetActive(false);
@@ -295,7 +292,19 @@
putonBtn.SetActive(hero.SkinAttrID != skinID);
putonYetObj.SetActive(hero.SkinAttrID == skinID);
-
+
+ }
+
+ void ChangeParentWinAlpha(float alpha)
+ {
+ if (hero != null)
+ {
+ UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = alpha;
+ }
+ else
+ {
+ UIManager.Instance.GetUI<HeroBestBaseWin>().GetCanvasGroup().alpha = alpha;
+ }
}
}
\ No newline at end of file
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 0efe6d3..f6202e6 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -105,9 +105,8 @@
[SerializeField] HeroLVBreakCell heroLVBreakCell; //瀵瑰簲鍩瑰吇鐨� allAttrScroll 鍜� attrBtn
- //鍏ュ彛浼孩鐐圭敤鍥剧墖浠f浛
- [SerializeField] Image trainMainRedImg;
- [SerializeField] Image breakMainRedImg;
+ bool isTrainMainRed;
+ bool isBreakMainRed;
#endregion
@@ -297,6 +296,8 @@
RefreshAwake();
RefreshFreeze();
RefreshRedImg();
+ HeroUIManager.Instance.UpdateTheHeroCardRedpoint(isTrainMainRed, isBreakMainRed,
+ HeroUIManager.Instance.HeroAllSkinStateForRedpoint(hero.heroId) > 0);
DisplayTrainOrBreak(hero);
ShowDeleteTip();
@@ -886,8 +887,8 @@
redpointAwake.SetActive(false);
redpointGift.SetActive(false);
redpointLVUP.SetActive(false);
- trainMainRedImg.SetActive(false);
- breakMainRedImg.SetActive(false);
+ isTrainMainRed = false;
+ isBreakMainRed = false;
redpointBreakLVUP.SetActive(false);
@@ -898,7 +899,7 @@
if (heroCnt > 1 && hero.heroStar < hero.GetCurMaxStar())
{
redpointGift.SetActive(true);
- trainMainRedImg.SetActive(true);
+ isTrainMainRed = true;
}
@@ -909,7 +910,7 @@
if (itemPack.GetCountById(lvupConfig.UPCostItem[0]) >= lvupConfig.UPCostItem[1])
{
redpointLVUP.SetActive(true);
- trainMainRedImg.SetActive(true);
+ isTrainMainRed = true;
}
}
@@ -931,7 +932,7 @@
if (itemPack.GetCountById(config.UPCostItem[0]) >= config.UPCostItem[1])
{
redpointAwake.SetActive(true);
- trainMainRedImg.SetActive(true);
+ isTrainMainRed = true;
}
}
}
@@ -939,7 +940,7 @@
if (HeroUIManager.Instance.IsCanBreak(hero))
{
redpointBreakLVUP.SetActive(true);
- breakMainRedImg.SetActive(true);
+ isBreakMainRed = true;
}
}
diff --git a/Main/System/HeroUI/HeroUIManager.Collect.cs b/Main/System/HeroUI/HeroUIManager.Collect.cs
index b1b3193..97ce61f 100644
--- a/Main/System/HeroUI/HeroUIManager.Collect.cs
+++ b/Main/System/HeroUI/HeroUIManager.Collect.cs
@@ -32,6 +32,8 @@
// allHeroBookPer = GetHeroCollectBookPer();
UpdateHeroBookRedpoint();
RefreshAllSkinAttr();
+ UpdateHeroCardSkinRedpoint();
+ UpdateHeroBookRedpoint();
OnHeroCollectEvent?.Invoke();
}
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index 7487e73..4404282 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -780,9 +780,10 @@
refreshRedPoint = true;
}
- if (HeroSkinAttrConfig.itemIdList.Contains(itemID))
+ if (HeroSkinAttrConfig.itemIdToSkinIDDict.ContainsKey(itemID))
{
UpdateHeroCardSkinRedpoint();
+ UpdateHeroBookRedpoint();
}
}
@@ -801,13 +802,13 @@
public Redpoint breakRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 2);
public Redpoint skinRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 3);
-
- // public void UpdateHeroCardRedpoint()
- // {
- // trainRedpoint.state = RedPointState.None;
- // breakRedpoint.state = RedPointState.None;
- // skinRedpoint.state = RedPointState.None;
- // }
+ //寮�鍩瑰吇/鍥鹃壌鐣岄潰鍚庣殑绾㈢偣
+ public void UpdateTheHeroCardRedpoint(bool isTrainRed, bool isBreakRed, bool isSkinRed)
+ {
+ trainRedpoint.state = isTrainRed ? RedPointState.Simple :RedPointState.None;
+ breakRedpoint.state = isBreakRed ? RedPointState.Simple : RedPointState.None;
+ skinRedpoint.state = isSkinRed ? RedPointState.Simple : RedPointState.None;
+ }
//鎸囧畾鐨偆绾㈢偣鐘舵�� 0-鏃� 1-鏈夋灏嗙孩鐐瑰奖鍝嶆灏嗗垪琛ㄧ孩鐐癸紙鍋囩孩鐐癸級 2-鏃犳灏嗙孩鐐瑰奖鍝嶅浘閴寸晫闈㈢孩鐐�
public int HeroSkinStateForRedpoint(int skinID, bool isBook = false)
@@ -849,7 +850,7 @@
}
//鎸囧畾姝﹀皢鐨勬墍鏈夌毊鑲ょ孩鐐圭姸鎬� 0-鏃� 1-鏈夋灏嗙孩鐐瑰奖鍝嶆灏嗗垪琛ㄧ孩鐐癸紙鍋囩孩鐐癸級 2-鏃犳灏嗙孩鐐瑰奖鍝嶅浘閴寸晫闈㈢孩鐐�
- int HeroAllSkinStateForRedpoint(int heroID, bool isBook = false)
+ public int HeroAllSkinStateForRedpoint(int heroID, bool isBook = false)
{
var config = HeroConfig.Get(heroID);
for (int i = 0; i < config.SkinIDList.Length; i++)
diff --git a/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs b/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs
index 383b1be..a36dc81 100644
--- a/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs
+++ b/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs
@@ -38,7 +38,7 @@
//缁垂
buyTipsText.text = Language.Get("GoldRush45", GoldRushManager.Instance.buyAutoDaysList[0]);
RechargeManager.Instance.TryGetOrderInfo(GoldRushManager.Instance.buyAutoCTGIDList[0], out var orderInfo);
- buyText.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale);
+ buyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
timeText.text = Language.Get("GoldRush48") + TimeUtility.SecondsToShortDHMS(endTime - TimeUtility.AllSeconds);
}
}
diff --git a/Main/System/InternalAffairs/GoldRushAutoWin.cs b/Main/System/InternalAffairs/GoldRushAutoWin.cs
index 112a92e..6863f1e 100644
--- a/Main/System/InternalAffairs/GoldRushAutoWin.cs
+++ b/Main/System/InternalAffairs/GoldRushAutoWin.cs
@@ -94,7 +94,7 @@
buyBtn.SetActive(true);
buyTipsText.text = Language.Get("GoldRush45", GoldRushManager.Instance.buyAutoDaysList[0]);
RechargeManager.Instance.TryGetOrderInfo(GoldRushManager.Instance.buyAutoCTGIDList[0], out var orderInfo);
- buyText.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale);
+ buyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
autoBtn.SetActive(false);
}
else
diff --git a/Main/System/ItemTip/BoxGetItemModel.cs b/Main/System/ItemTip/BoxGetItemModel.cs
index f044c67..b4fc9ec 100644
--- a/Main/System/ItemTip/BoxGetItemModel.cs
+++ b/Main/System/ItemTip/BoxGetItemModel.cs
@@ -39,21 +39,39 @@
long expValue = netPack.Exp + netPack.ExpPoint * Constants.ExpPointValue;
showItems.Add(new Item(GeneralDefine.expDisplayId, expValue));
}
+
+ bool isMergeItem = true; //鍚屾牱鐨勭墿鍝佹槸鍚﹀悎骞舵樉绀猴紝姣斿棰濆鑾峰緱鍋氳〃鐜板垎寮�鏄剧ず
+
+ //鐗规畩澶勭悊锛屾椂瑁呮湁琚垎瑙f垚璐у竵鐨勬儏鍐碉紝闇�瑕佸悎骞跺悗鍘婚櫎鍘熸椂瑁呯殑鏄剧ず
+ List<int> deleteItemIDs = new List<int>();
if (netPack.MoneyList.Length != 0)
{
for (int i = 0; i < netPack.MoneyLen; i++)
{
var moneyType = netPack.MoneyList[i].MoneyType;
+ if (moneyType == 58 && !string.IsNullOrEmpty(netPack.DataEx))
+ {
+ //鏃惰璐у竵
+ int deleteID;
+ int.TryParse(netPack.DataEx, out deleteID);
+ if (deleteID != 0)
+ {
+ deleteItemIDs.Add(int.Parse(netPack.DataEx));
+ }
+ }
if (GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType) && netPack.MoneyList[i].MoneyValue != 0)
{
- showItems.Add(new Item(GeneralDefine.MoneyDisplayModel[moneyType], netPack.MoneyList[i].MoneyValue));
+ showItems.Add(new Item(GeneralDefine.MoneyDisplayModel[moneyType], netPack.MoneyList[i].MoneyValue, netPack.MoneyList[i].IsBind));
+ if (netPack.MoneyList[i].IsBind >= 10)
+ {
+ isMergeItem = false;
+ }
}
-
}
}
- bool isMergeItem = true;
- //绾﹀畾IsBind=10 涓哄彜瀹濋澶栧鍔�
+
+ //绾﹀畾IsBind 涓鸿鏍囩殑鐗规畩鏄剧ず 鍙傝�僆tem鐨剈seType瀹氫箟
if (netPack.ItemList.Length != 0)
{
for (int i = 0; i < netPack.ItemLen; i++)
@@ -76,7 +94,7 @@
if (showItems.Count == 0)
return;
- ItemLogicUtility.Instance.ShowGetItem(showItems, eventName, isMergeItem:isMergeItem);
+ ItemLogicUtility.Instance.ShowGetItem(showItems, eventName, isMergeItem:isMergeItem, deleteItemIDs:deleteItemIDs);
}
diff --git a/Main/System/KnapSack/BackpackData.cs b/Main/System/KnapSack/BackpackData.cs
index fd66a36..9b61513 100644
--- a/Main/System/KnapSack/BackpackData.cs
+++ b/Main/System/KnapSack/BackpackData.cs
@@ -11,7 +11,7 @@
public int id;
public long countEx;
public int quality;
- public int useType; //鐢ㄩ�斿畾涔夛細0 鏃� 1 棰勭暀 2 绾㈤澧炲姞 10 鍙ゅ疂澧炲姞
+ public int useType; //鐢ㄩ�斿畾涔夛細0 榛樿鏃� 10 - 鍙ゅ疂 20 - 绾㈤ 30 - 绉板彿 40 -鍒嗚В
public Item(int _id, long _count)
{
diff --git a/Main/System/KnapSack/Logic/CommonGetItemWin.cs b/Main/System/KnapSack/Logic/CommonGetItemWin.cs
index 87f7aba..e3d0482 100644
--- a/Main/System/KnapSack/Logic/CommonGetItemWin.cs
+++ b/Main/System/KnapSack/Logic/CommonGetItemWin.cs
@@ -35,7 +35,8 @@
ItemLogicUtility.Instance.OnGetItemShowEvent -= OnGetItemShowEvent;
scroller.OnRefreshCell -= OnRefreshCell;
ItemLogicUtility.Instance.ClearGetItem();
-
+ ItemLogicUtility.Instance.totalShowItems.Clear();
+ ItemLogicUtility.Instance.totalDeleteItemIDs.Clear();
}
List<Item> showItems = new List<Item>();
diff --git a/Main/System/KnapSack/Logic/ItemLogicUtility.cs b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
index 696d42a..f09aa14 100644
--- a/Main/System/KnapSack/Logic/ItemLogicUtility.cs
+++ b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
@@ -126,29 +126,46 @@
// 濡傛灉鍚屾椂鏈夊绉嶅鍔卞皝鍖咃紝鍚屼竴涓簨浠跺綊闆嗭紝涓嶅悓浜嬩欢鐩存帴椤舵帀鏄剧ず鏈�鏂�
public Dictionary<Int2, Item> totalShowItems = new Dictionary<Int2, Item>(); //Int2 鐗╁搧ID+useType
+ public List<int> totalDeleteItemIDs = new List<int>(); //鍒犻櫎鐨勭墿鍝両D
public event Action OnGetItemShowEvent;
public string getItemEventName;
public string sourceTip; //棰嗗鍘熷洜
// isMergeItem 鏄惁鍚堝苟鐩稿悓ID鐨勭墿鍝� 榛樿鍚堝苟
// 閫氱敤鏄剧ず鑾峰緱鐨勭墿鍝�
- public void ShowGetItem(List<Item> items, string eventName = "default", bool isNameShow = true, bool isMergeItem = true)
+ public void ShowGetItem(List<Item> items, string eventName = "default", bool isNameShow = true,
+ bool isMergeItem = true, List<int> deleteItemIDs = null)
{
if (getItemEventName != eventName)
{
if (UIManager.Instance.IsOpenedInList<CommonGetItemWin>())
{
- //----------------------璁板緱鏀圭珛鍗冲叧闂�
+ //绔嬪嵆鍏抽棴
UIManager.Instance.CloseWindow<CommonGetItemWin>();
}
totalShowItems.Clear();
+ totalDeleteItemIDs.Clear();
getItemEventName = eventName;
+ }
+ if (!deleteItemIDs.IsNullOrEmpty())
+ {
+ for (int i = 0; i < deleteItemIDs.Count; i++)
+ {
+ if (!totalDeleteItemIDs.Contains(deleteItemIDs[i]))
+ {
+ totalDeleteItemIDs.Add(deleteItemIDs[i]);
+ }
+ }
}
//鐩稿悓ID 鍚堝苟鏁伴噺鏄剧ず
for (int i = 0; i < items.Count; i++)
{
var id = items[i].id;
+ if (totalDeleteItemIDs.Contains(id))
+ {
+ continue;
+ }
var useType = isMergeItem ? 0 : items[i].useType;
Int2 idInfo = new Int2(id, useType);
diff --git a/Main/System/Message/RichTableEvent.cs b/Main/System/Message/RichTableEvent.cs
index f5a3271..6816622 100644
--- a/Main/System/Message/RichTableEvent.cs
+++ b/Main/System/Message/RichTableEvent.cs
@@ -378,7 +378,7 @@
break;
}
}
- goodsName = Language.Get("DayGoods_1", UIHelper.GetMoneyFormat(orderInfo.PayRMBNum));
+ goodsName = Language.Get("DayGoods_1", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
}
return goodsName;
diff --git a/Main/System/OSActivity/OSGalaGiftCell.cs b/Main/System/OSActivity/OSGalaGiftCell.cs
index 7f4efa1..f9fac21 100644
--- a/Main/System/OSActivity/OSGalaGiftCell.cs
+++ b/Main/System/OSActivity/OSGalaGiftCell.cs
@@ -58,7 +58,7 @@
RechargeManager.Instance.TryGetOrderInfo(id, out var orderInfo);
- moneyText.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale);
+ moneyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
moneyIcon.SetActive(false);
}
else
diff --git a/Main/System/OSActivity/OSRankHeroCallGiftCell.cs b/Main/System/OSActivity/OSRankHeroCallGiftCell.cs
index 307727a..a23deea 100644
--- a/Main/System/OSActivity/OSRankHeroCallGiftCell.cs
+++ b/Main/System/OSActivity/OSRankHeroCallGiftCell.cs
@@ -59,7 +59,7 @@
RechargeManager.Instance.TryGetOrderInfo(id, out var orderInfo);
- moneyText.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale);
+ moneyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
moneyIcon.SetActive(false);
}
else
diff --git a/Main/System/Recharge/ExpSecretCollectionWin.cs b/Main/System/Recharge/ExpSecretCollectionWin.cs
index 963dfae..a231036 100644
--- a/Main/System/Recharge/ExpSecretCollectionWin.cs
+++ b/Main/System/Recharge/ExpSecretCollectionWin.cs
@@ -84,7 +84,7 @@
buyBtn.SetActive(ExpSecretCollectionManager.Instance.m_MJLV == 0);
RechargeManager.Instance.TryGetOrderInfo(ExpSecretCollectionManager.Instance.ctgID, out var orderInfoConfig);
- buyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ buyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
buyYetRect.SetActive(ExpSecretCollectionManager.Instance.m_MJLV != 0);
scroller.m_Scorller.RefreshActiveCellViews();
diff --git a/Main/System/Recharge/PrivilegeCardCell.cs b/Main/System/Recharge/PrivilegeCardCell.cs
index 3daacc2..5afc1dd 100644
--- a/Main/System/Recharge/PrivilegeCardCell.cs
+++ b/Main/System/Recharge/PrivilegeCardCell.cs
@@ -87,7 +87,7 @@
if (state == 0)
{
var orderInfo = InvestModel.Instance.GetOrderInfo(type);
- opBtnText.text = Language.Get("PayMoneyNum", orderInfo.PayRMBNumOnSale);
+ opBtnText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
opBtn.SetInteractable(true);
opBtn.AddListener(() =>
{
@@ -108,7 +108,7 @@
if (type == 1)
{
var orderInfo = InvestModel.Instance.GetOrderInfo(type);
- opBtnText.text = Language.Get("PayMore", orderInfo.PayRMBNumOnSale);
+ opBtnText.text = Language.Get("PayMore", UIHelper.GetMoneyFormat(orderInfo.PayRMBNumOnSale));
opBtn.SetInteractable(true);
opBtn.AddListener(() =>
{
diff --git a/Main/System/Recharge/RechargeDJQCell.cs b/Main/System/Recharge/RechargeDJQCell.cs
index 6fe331f..7719920 100644
--- a/Main/System/Recharge/RechargeDJQCell.cs
+++ b/Main/System/Recharge/RechargeDJQCell.cs
@@ -28,7 +28,7 @@
}
normalNums.text = (config.GainGold/100).ToString();
RechargeManager.Instance.TryGetOrderInfo(ctgID, out var orderInfoConfig);
- priceText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ priceText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
icon.SetSprite(config.Icon);
icon.SetNativeSize();
buyBtn.AddListener(() =>
diff --git a/Main/System/Recharge/RechargeGoldCell.cs b/Main/System/Recharge/RechargeGoldCell.cs
index f3c3d0c..a1ba1e3 100644
--- a/Main/System/Recharge/RechargeGoldCell.cs
+++ b/Main/System/Recharge/RechargeGoldCell.cs
@@ -32,7 +32,7 @@
normalNums.text = config.GainGold.ToString();
}
RechargeManager.Instance.TryGetOrderInfo(ctgID, out var orderInfoConfig);
- priceText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ priceText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
icon.SetSprite(config.Icon);
icon.SetNativeSize();
buyBtn.AddListener(() =>
diff --git a/Main/System/Recharge/RechargeManager.cs b/Main/System/Recharge/RechargeManager.cs
index 477765d..0272d1c 100644
--- a/Main/System/Recharge/RechargeManager.cs
+++ b/Main/System/Recharge/RechargeManager.cs
@@ -754,6 +754,32 @@
{
return b.Time.CompareTo(a.Time);
}
+
+ //鎸変笉鍚岄檺璐鍒欒繘琛屽垽鏂�
+ public bool IsSellOut(int ctgID)
+ {
+ var cfg = CTGConfig.Get(ctgID);
+ Instance.TryGetRechargeCount(ctgID, out RechargeCount _rechargeCount);
+ if (cfg.DailyBuyCount != 0)
+ {
+ return _rechargeCount.todayCount >= cfg.DailyBuyCount;
+ }
+ else if (cfg.WeekBuyCount != 0)
+ {
+ return _rechargeCount.weekPayCount >= cfg.WeekBuyCount;
+ }
+
+ else if (cfg.MonthBuyCount != 0)
+ {
+ return _rechargeCount.monthPayCount >= cfg.MonthBuyCount;
+ }
+ else if (cfg.TotalBuyCount != 0)
+ {
+ return _rechargeCount.totalCount >= cfg.TotalBuyCount;
+ }
+
+ return false;
+ }
}
diff --git a/Main/System/Store/HeroSkinGiftWin.cs b/Main/System/Store/HeroSkinGiftWin.cs
new file mode 100644
index 0000000..57c378b
--- /dev/null
+++ b/Main/System/Store/HeroSkinGiftWin.cs
@@ -0,0 +1,114 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+//鏃惰绀煎寘
+public class HeroSkinGiftWin : UIBase
+{
+ [SerializeField] GroupButtonEx[] giftBtns;
+
+ [SerializeField] ItemCell[] itemCells;
+ [SerializeField] Text priceText;
+ [SerializeField] Button buyBtn;
+ [SerializeField] Transform saleOutObj;
+ [SerializeField] Image bg1;
+ [SerializeField] Image bg2;
+
+ int index;
+
+ protected override void InitComponent()
+ {
+ buyBtn.AddListener(() =>
+ {
+ RechargeManager.Instance.CTG(GeneralDefine.heroSkinGiftList[index]);
+ });
+ for (int i = 0; i < giftBtns.Length; i++)
+ {
+ int _index = i;
+ giftBtns[i].AddListener(() => {
+ index = _index;
+ Display();
+ });
+ }
+ }
+
+
+ protected override void OnPreOpen()
+ {
+ index = 0;
+ RechargeManager.Instance.rechargeCountEvent += OnRechargeCountEvent;
+
+ for (int i = 0; i < giftBtns.Length; i++)
+ {
+ if (i < GeneralDefine.heroSkinGiftList.Length)
+ {
+ giftBtns[i].SetActive(true);
+ var cfg = CTGConfig.Get(GeneralDefine.heroSkinGiftList[i]);
+ RechargeManager.Instance.TryGetRechargeCount(GeneralDefine.heroSkinGiftList[i], out RechargeCount _rechargeCount);
+ if (_rechargeCount.todayCount < cfg.DailyBuyCount)
+ {
+ index = i;
+ break;
+ }
+ }
+ else
+ {
+ giftBtns[i].SetActive(false);
+ }
+ }
+ giftBtns[index].SelectBtn();
+
+ Display();
+ }
+
+ protected override void OnPreClose()
+ {
+ RechargeManager.Instance.rechargeCountEvent -= OnRechargeCountEvent;
+ }
+
+ void Display()
+ {
+ RechargeManager.Instance.TryGetRechargeItem(GeneralDefine.heroSkinGiftList[index], out var itemList);
+ for (int i = 0; i < itemCells.Length; i++)
+ {
+ if (i < itemList.Count)
+ {
+ itemCells[i].SetActive(true);
+ int itemID = itemList[i].id;
+ itemCells[i].Init(new ItemCellModel(itemID, true, itemList[i].countEx));
+ itemCells[i].button.SetListener(() => ItemTipUtility.Show(itemID));
+ }
+ else
+ {
+ itemCells[i].SetActive(false);
+ }
+ }
+ if (!RechargeManager.Instance.IsSellOut(GeneralDefine.heroSkinGiftList[index]))
+ {
+ buyBtn.SetActive(true);
+ saleOutObj.SetActive(false);
+ }
+ else
+ {
+ buyBtn.SetActive(false);
+ saleOutObj.SetActive(true);
+ }
+
+
+ RechargeManager.Instance.TryGetOrderInfo(GeneralDefine.heroSkinGiftList[index], out var orderInfoConfig);
+ priceText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
+
+ bg1.SetSprite($"HeroSkinGiftBg{index}_1");
+ bg2.SetSprite($"HeroSkinGiftBg{index}_2");
+ bg1.SetNativeSize();
+ bg2.SetNativeSize();
+ }
+ private void OnRechargeCountEvent(int obj)
+ {
+ Display();
+ }
+
+
+
+
+}
diff --git a/Main/System/Store/HeroSkinGiftWin.cs.meta b/Main/System/Store/HeroSkinGiftWin.cs.meta
new file mode 100644
index 0000000..f80c584
--- /dev/null
+++ b/Main/System/Store/HeroSkinGiftWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 99000a2eedd88ac40bbdf6f46e4a2aa0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Store/SkinStoreBuyTipWin.cs b/Main/System/Store/SkinStoreBuyTipWin.cs
new file mode 100644
index 0000000..78326c2
--- /dev/null
+++ b/Main/System/Store/SkinStoreBuyTipWin.cs
@@ -0,0 +1,85 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+//鏃惰纰庣墖鍟嗗簵璐拱鐣岄潰
+public class SkinStoreBuyTipWin : UIBase
+{
+ [SerializeField] Image skinImage;
+ [SerializeField] Image skinFrame;
+ [SerializeField] Text skinName;
+ [SerializeField] Text heroName;
+ [SerializeField] Text[] onAttrTexts;
+ [SerializeField] Text[] allAttrTexts;
+ [SerializeField] Image moneyIcon;
+ [SerializeField] Text moneyText;
+ [SerializeField] Button buyButton;
+
+
+
+ protected override void InitComponent()
+ {
+ buyButton.AddListener(BuyGoods);
+ }
+
+
+ protected override void OnPreOpen()
+ {
+
+ var storeConfig = StoreConfig.Get(StoreModel.Instance.buyShopID);
+ HeroSkinAttrConfig.itemIdToSkinIDDict.TryGetValue(storeConfig.ItemID, out var skinID);
+
+ var skinConfig = HeroSkinConfig.Get(skinID);
+ var attrCfg = HeroSkinAttrConfig.Get(skinID);
+ skinImage.SetOrgSprite(skinConfig.CardPic, "HeroSkinCard");
+ skinFrame.SetSprite("HeroSkinFrame" + (attrCfg== null ? 0 : attrCfg.Quality));
+ skinName.text = skinConfig.SkinName == "" ? Language.Get("HeroSkin2") : skinConfig.SkinName;
+
+ var heroID = HeroConfig.GetHeroIDBySkinID(skinID);
+ heroName.text = Language.Get("HeroSkin12", HeroConfig.Get(heroID).Name);
+
+ var shopConfig = StoreConfig.Get(StoreModel.Instance.buyShopID);
+ moneyIcon.SetIconWithMoneyType(shopConfig.MoneyType);
+ moneyText.text = UIHelper.ShowUseMoney(shopConfig.MoneyType, shopConfig.MoneyNum);
+
+ RefreshAttr(skinID);
+ }
+
+
+ void BuyGoods()
+ {
+ CloseWindow();
+ StoreModel.Instance.SendBuyShopItem(StoreConfig.Get(StoreModel.Instance.buyShopID), 1);
+ }
+
+ void RefreshAttr(int skinID)
+ {
+ var cfg = HeroSkinAttrConfig.Get(skinID);
+
+ string format = "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}", false);
+ for (int i = 0; i < onAttrTexts.Length; i++)
+ {
+ if (i < cfg.WearAttrIDList.Length)
+ {
+ onAttrTexts[i].text = PlayerPropertyConfig.GetFullDescription(cfg.WearAttrIDList[i], cfg.WearAttrValueList[i], format);
+ }
+ else
+ {
+ onAttrTexts[i].text = "";
+ }
+ }
+
+ for (int i = 0; i < allAttrTexts.Length; i++)
+ {
+ if (i < cfg.RoleAttrIDList.Length)
+ {
+ allAttrTexts[i].text = PlayerPropertyConfig.GetFullDescription(cfg.RoleAttrIDList[i], cfg.RoleAttrValueList[i], format);
+ }
+ else
+ {
+ allAttrTexts[i].text = "";
+ }
+ }
+
+ }
+}
diff --git a/Main/System/Store/SkinStoreBuyTipWin.cs.meta b/Main/System/Store/SkinStoreBuyTipWin.cs.meta
new file mode 100644
index 0000000..af93f01
--- /dev/null
+++ b/Main/System/Store/SkinStoreBuyTipWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: aa1386c1cdea3ae42a9057ac78623aa9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Store/SkinStoreCell.cs b/Main/System/Store/SkinStoreCell.cs
new file mode 100644
index 0000000..6bb01dc
--- /dev/null
+++ b/Main/System/Store/SkinStoreCell.cs
@@ -0,0 +1,65 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class SkinStoreCell : MonoBehaviour
+{
+ [SerializeField] Image skinImage;
+ [SerializeField] Image skinFrame;
+ [SerializeField] Text skinName;
+ [SerializeField] Text heroName;
+ [SerializeField] Image priceIcon;
+ [SerializeField] Text priceText;
+ [SerializeField] Button buyButton;
+ [SerializeField] Transform gotYetObj;
+
+
+
+ public void Display(int index)
+ {
+ var list = StoreModel.Instance.storeTypeDict[StoreModel.skinStoreType];
+ var storeData = list[index];
+ int shopID = storeData.shopId;
+ var itemID = storeData.storeConfig.ItemID;
+ HeroSkinAttrConfig.itemIdToSkinIDDict.TryGetValue(itemID, out var skinID);
+ if (skinID == 0)
+ {
+ Debug.LogError("鏃惰鍟嗗簵閰嶇疆閿欒 娌℃湁瀵瑰簲鐨偆 鍟嗗搧锛�" + shopID);
+ return;
+ }
+ var skinConfig = HeroSkinConfig.Get(skinID);
+ var attrCfg = HeroSkinAttrConfig.Get(skinID);
+ skinImage.SetOrgSprite(skinConfig.CardPic, "HeroSkinCard");
+ skinFrame.SetSprite("HeroSkinFrame" + (attrCfg== null ? 0 : attrCfg.Quality));
+ skinName.text = skinConfig.SkinName == "" ? Language.Get("HeroSkin2") : skinConfig.SkinName;
+
+ var heroID = HeroConfig.GetHeroIDBySkinID(skinID);
+ heroName.text = HeroConfig.Get(heroID).Name;
+
+ //0鍙喘涔� 1宸插敭缃� 2鍏嶈垂 3鏈В閿�
+ var state = StoreModel.Instance.GetShopIDState(shopID);
+ if (state == 0)
+ {
+ buyButton.SetActive(true);
+ gotYetObj.SetActive(false);
+
+ buyButton.AddListener(() => { BuyGoods(shopID); });
+ }
+ else
+ {
+ buyButton.SetActive(false);
+ gotYetObj.SetActive(true);
+ }
+
+ priceIcon.SetIconWithMoneyType(storeData.storeConfig.MoneyType);
+ priceText.text = storeData.storeConfig.MoneyNum.ToString();
+
+ }
+
+ void BuyGoods(int shopID)
+ {
+ StoreModel.Instance.buyShopID = shopID;
+ UIManager.Instance.OpenWindow<SkinStoreBuyTipWin>();
+ }
+}
diff --git a/Main/System/Store/SkinStoreCell.cs.meta b/Main/System/Store/SkinStoreCell.cs.meta
new file mode 100644
index 0000000..bb59451
--- /dev/null
+++ b/Main/System/Store/SkinStoreCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 532a5bd8a17a88840927d2c86a99e6dd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Store/SkinStoreLineCell.cs b/Main/System/Store/SkinStoreLineCell.cs
new file mode 100644
index 0000000..c71f498
--- /dev/null
+++ b/Main/System/Store/SkinStoreLineCell.cs
@@ -0,0 +1,28 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class SkinStoreLineCell : CellView
+{
+
+ [SerializeField] SkinStoreCell[] storeCells;
+
+ public void Display(int index)
+ {
+ var list = StoreModel.Instance.storeTypeDict[StoreModel.skinStoreType];
+
+ for (int i = 0; i < storeCells.Length; i++)
+ {
+ if (index + i < list.Count)
+ {
+ storeCells[i].SetActive(true);
+ storeCells[i].Display(index + i);
+ }
+ else
+ {
+ storeCells[i].SetActive(false);
+ }
+ }
+ }
+}
diff --git a/Main/System/Store/SkinStoreLineCell.cs.meta b/Main/System/Store/SkinStoreLineCell.cs.meta
new file mode 100644
index 0000000..9a026b4
--- /dev/null
+++ b/Main/System/Store/SkinStoreLineCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 18ea07617fb14de4194068886378aa5c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Store/SkinStoreWin.cs b/Main/System/Store/SkinStoreWin.cs
index cf09006..57f3195 100644
--- a/Main/System/Store/SkinStoreWin.cs
+++ b/Main/System/Store/SkinStoreWin.cs
@@ -4,35 +4,27 @@
public class SkinStoreWin : UIBase
{
- [SerializeField] OwnMoneyCell ownMoneyCellWithShop;
- //鏈夊埛鏂板姛鑳界殑鍟嗗簵
- [SerializeField] GameObject refreshGo;
- [SerializeField] Image refreshMoneyIcon;
- [SerializeField] Text refreshMoneyText;
- [SerializeField] Button refreshButton;
-
- [SerializeField] GroupButtonEx normalShopBtn;
- [SerializeField] GroupButtonEx guildShopBtn;
- [SerializeField] GroupButtonEx heroShopBtn;
+ [SerializeField] Button giftBtn;
[SerializeField] ScrollerController scroller;
+
protected override void InitComponent()
{
- refreshButton.AddListener(RefreshStore);
- normalShopBtn.AddListener(() => { OnSelectStoreFuncType(1); });
- guildShopBtn.AddListener(() => { OnSelectStoreFuncType(2); });
- heroShopBtn.AddListener(() => { OnSelectStoreFuncType(3); });
+ giftBtn.AddListener(() =>
+ {
+ UIManager.Instance.OpenWindow<HeroSkinGiftWin>();
+ });
+
}
protected override void OnPreOpen()
{
scroller.OnRefreshCell += OnRefreshCell;
- StoreModel.Instance.RefreshShopEvent += Display;
- StoreModel.Instance.RefreshBuyShopLimitEvent += Display;
- GuildManager.Instance.EnterOrQuitGuildEvent += EnterOrQuitGuildEvent;
+ StoreModel.Instance.RefreshShopEvent += Show;
+ StoreModel.Instance.RefreshBuyShopLimitEvent += Show;
Display();
}
@@ -40,62 +32,39 @@
protected override void OnPreClose()
{
scroller.OnRefreshCell -= OnRefreshCell;
- StoreModel.Instance.RefreshShopEvent -= Display;
- StoreModel.Instance.RefreshBuyShopLimitEvent -= Display;
- GuildManager.Instance.EnterOrQuitGuildEvent -= EnterOrQuitGuildEvent;
- StoreModel.Instance.selectStoreFuncType = StoreFunc.Normal;
+ StoreModel.Instance.RefreshShopEvent -= Show;
+ StoreModel.Instance.RefreshBuyShopLimitEvent -= Show;
}
void Display()
{
- if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Normal)
- {
- normalShopBtn.SelectBtn();
- }
- else if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Guild)
- {
- guildShopBtn.SelectBtn();
- }
- else if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Hero)
- {
- heroShopBtn.SelectBtn();
- }
-
- guildShopBtn.SetColorful(null, PlayerDatas.Instance.fairyData.HasFairy);
- guildShopBtn.isLock = !PlayerDatas.Instance.fairyData.HasFairy;
-
- ShowMoney();
CreateScroller();
}
- void EnterOrQuitGuildEvent(bool isEnter)
+ void Show()
{
- if (!isEnter && StoreModel.Instance.selectStoreFuncType == StoreFunc.Guild)
- {
- StoreModel.Instance.selectStoreFuncType = StoreFunc.Normal;
- }
- Display();
+ scroller.m_Scorller.RefreshActiveCellViews();
}
void CreateScroller()
{
- if (!StoreModel.Instance.storeTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
+ if (!StoreModel.Instance.storeTypeDict.ContainsKey(StoreModel.skinStoreType))
{
return;
}
- scroller.Refresh();
int jumpIndex = -1;
- var list = StoreModel.Instance.storeTypeDict[(int)StoreModel.Instance.selectStoreFuncType];
+ scroller.Refresh();
+ var list = StoreModel.Instance.storeTypeDict[StoreModel.skinStoreType];
for (int i = 0; i < list.Count; i++)
{
- if (i % 3 == 0)
+ if (i % 4 == 0)
{
scroller.AddCell(ScrollerDataType.Header, i);
}
if (jumpIndex == -1 && list[i].shopId == StoreModel.Instance.jumpShopID)
{
- jumpIndex = i / 3;
+ jumpIndex = i / 4;
}
}
scroller.Restart();
@@ -110,82 +79,9 @@
void OnRefreshCell(ScrollerDataType type, CellView cell)
{
- var _cell = cell as StoreLineCell;
+ var _cell = cell as SkinStoreLineCell;
_cell.Display(cell.index);
}
- void ShowMoney()
- {
- if (!StoreModel.Instance.shopMoneyTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
- {
- return;
- }
- var moneyType = StoreModel.Instance.shopMoneyTypeDict[(int)StoreModel.Instance.selectStoreFuncType];
- ownMoneyCellWithShop.moneyType = moneyType;
- ownMoneyCellWithShop.Display(true);
-
- if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Hero)
- {
- refreshGo.SetActive(true);
- refreshMoneyIcon.SetIconWithMoneyType(StoreModel.Instance.heroSoulRefreshMoneyType);
-
- if (StoreModel.Instance.shopRefreshCntDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
- {
- if (StoreModel.Instance.shopRefreshCntDict[(int)StoreModel.Instance.selectStoreFuncType] >=
- StoreModel.Instance.heroSoulRefreshFreeCount)
- {
- refreshMoneyText.text = StoreModel.Instance.heroSoulRefreshMoney.ToString();
- }
- else
- {
- refreshMoneyText.text = Language.Get("L1127");
- }
- }
- else
- {
- refreshMoneyText.text = Language.Get("L1127");
- }
- }
- else
- {
- refreshGo.SetActive(false);
- }
- }
-
- void RefreshStore()
- {
- if (StoreModel.Instance.selectStoreFuncType != StoreFunc.Hero)
- {
- return;
- }
- var useCnt = 0;
- if (StoreModel.Instance.shopRefreshCntDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
- {
- if (StoreModel.Instance.shopRefreshCntDict[(int)StoreModel.Instance.selectStoreFuncType] >=
- StoreModel.Instance.heroSoulRefreshFreeCount)
- {
- useCnt = StoreModel.Instance.heroSoulRefreshMoney;
- }
- }
-
- if (UIHelper.CheckMoneyCount(StoreModel.Instance.heroSoulRefreshMoneyType, useCnt, 2))
- {
- StoreModel.Instance.RefreshStore((int)StoreFunc.Hero);
- }
- }
-
- void OnSelectStoreFuncType(int index)
- {
- if (index == 2)
- {
- if (!PlayerDatas.Instance.fairyData.HasFairy)
- {
- SysNotifyMgr.Instance.ShowTip("NoGuild");
- return;
- }
- }
- StoreModel.Instance.selectStoreFuncType = (StoreFunc)index;
- Display();
- }
}
diff --git a/Main/System/Store/StoreModel.cs b/Main/System/Store/StoreModel.cs
index ed612cb..027a8b5 100644
--- a/Main/System/Store/StoreModel.cs
+++ b/Main/System/Store/StoreModel.cs
@@ -41,6 +41,8 @@
public Dictionary<int, List<int>> freeShopDict = new Dictionary<int, List<int>>(); //鍏嶈垂鍟嗗搧 鍟嗗簵绫诲瀷锛氬晢鍝佸垪琛�
public Dictionary<int, int> shopMoneyTypeDict = new Dictionary<int, int>();
+ public const int skinStoreType = 16;
+
public override void Init()
{
FuncOpen.Instance.OnFuncStateChangeEvent += FuncStateChange;
diff --git a/Main/System/TimeRush/TimeRushGiftCell.cs b/Main/System/TimeRush/TimeRushGiftCell.cs
index 68e12f2..8a3cd75 100644
--- a/Main/System/TimeRush/TimeRushGiftCell.cs
+++ b/Main/System/TimeRush/TimeRushGiftCell.cs
@@ -49,7 +49,7 @@
bool isCanBuy = manager.IsCanBuyCTG(ctgId);
titleText.text = config.Title;
buyImage.SetSprite(isCanBuy ? "DailySpecialsBuy1" : "DailySpecialsBuy2");
- buyText.text = !isCanBuy ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNum));
+ buyText.text = !isCanBuy ? Language.Get("storename11") : Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderConfig.PayRMBNumOnSale));
limitCountText.SetActive(true);
limitCountText.text = Language.Get("TimeRush07", UIHelper.AppendColor(rechargeCount.totalCount >= config.TotalBuyCount ? TextColType.Red : TextColType.LightGreen, Mathf.Max(0, config.TotalBuyCount - rechargeCount.totalCount).ToString()));
buyButton.interactable = isCanBuy;
diff --git a/Main/System/TimingGift/TimingGiftCtgIdCell.cs b/Main/System/TimingGift/TimingGiftCtgIdCell.cs
index 6ec54b3..0f3f40f 100644
--- a/Main/System/TimingGift/TimingGiftCtgIdCell.cs
+++ b/Main/System/TimingGift/TimingGiftCtgIdCell.cs
@@ -13,7 +13,7 @@
int ctgId = ctgIds[index];
if (!RechargeManager.Instance.TryGetOrderInfo(ctgId, out var orderInfoConfig))
return;
- moneyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ moneyText.text = Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale));
bool isChoose = manager.selectCtgIdIndex == index;
tabIcon.SetSprite(isChoose ? "TimingGiftTab2_Select" : "TimingGiftTab2_UnSelect");
diff --git a/Main/System/TimingGift/TimingGiftWin.cs b/Main/System/TimingGift/TimingGiftWin.cs
index 8ddc17d..817549a 100644
--- a/Main/System/TimingGift/TimingGiftWin.cs
+++ b/Main/System/TimingGift/TimingGiftWin.cs
@@ -250,7 +250,7 @@
giftText.SetVerticalGradient(manager.GetColor32(config.TopColor), manager.GetColor32(config.BottomColor));
giftTextOutline.OutlineColor = manager.GetColor32(config.OutlineColor);
bool isBuy = manager.IsBuy(manager.selectCtgId);
- buyText.text = !isBuy ? Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale) : Language.Get("L1133");
+ buyText.text = !isBuy ? Language.Get("PayMoneyNum", UIHelper.GetMoneyFormat(orderInfoConfig.PayRMBNumOnSale)) : Language.Get("L1133");
buyImage.SetSprite(isBuy ? "TimingGiftBuy" : "TimingGiftNoBuy");
buyImage.raycastTarget = !isBuy;
RefreshTime();
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index a33b4d2..91e3446 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -713,6 +713,7 @@
ChallengeVoucher = 286,//鎸戞垬鍑瘉
DailySpecials = 287, //鐗规儬鍗扮欢
OSGalaScore = 288, //寮�鏈嶅簡鍏哥Н鍒�
+ heroSkin = 291, // 鐢ㄤ簬鐨偆鍟嗗簵璐拱
};
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index b70810e..ae10276 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -1050,6 +1050,7 @@
{53, PlayerDataType.ChallengeVoucher},
{54, PlayerDataType.DailySpecials},
{55, PlayerDataType.OSGalaScore},
+ {58, PlayerDataType.heroSkin},
{99, PlayerDataType.ExAttr11},
};
@@ -1208,6 +1209,11 @@
//寮�鏈嶅簡鍏哥Н鍒�
return PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.OSGalaScore);
}
+ case 58:
+ {
+ //鏃惰璐у竵
+ return PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.heroSkin);
+ }
case 98:
{
//杩囨湡鍨嬩唬閲戝埜
--
Gitblit v1.8.0