Bläddra i källkod

摘星优化,充值奖励显示修改

huangxiaoyue 1 år sedan
förälder
incheckning
8339b80a99

+ 4 - 13
GameClient/Assets/Game/HotUpdate/Data/LuckyBoxDataManager.cs

@@ -301,12 +301,8 @@ namespace GFGGame
             {
                 int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[i];
                 long freeTime = LuckyBoxDataManager.Instance.GetFreeTime(boxId);
-
-                if (freeTime > 0)
-                {
-                    if (freeTime - TimeHelper.ServerNow() < 0)
-                        return true;
-                }
+                if (freeTime > 0 && freeTime - TimeHelper.ServerNow() < 0)
+                    return true;
 
                 if (index == 1 && RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy))
                     return true;
@@ -321,18 +317,13 @@ namespace GFGGame
             for (int i = index; i < BOX_ID_3; i++) {
                 int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[i];
                 long freeTime = LuckyBoxDataManager.Instance.GetFreeTime(boxId);
-                if (freeTime > 0)
-                {
-                    if (freeTime - TimeHelper.ServerNow() < 0)
-                        return true;
-                }
+                if (freeTime > 0 && freeTime - TimeHelper.ServerNow() < 0)
+                    return true;
 
                 if (index == 1 && RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy))
                     return true;
             }
 
-           
-
             return false;
         }
     }

+ 8 - 5
GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs

@@ -84,17 +84,20 @@ namespace GFGGame
             ShopDataManager.Instance.UpdateGoodsData(buyId, totalTimes);
             ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(buyId);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
+            ItemCfg doubleItemIdCfg = ItemCfgArray.Instance.GetCfg(shopCfg.doubleItemId);
 
             EventAgent.DispatchEvent(ConstMessage.CONTINUOUS_REBATE_GIFT_SHOP_BUY, shopCfg);
             if (showItems)
             {
                 //判断倍数
                 var multiple = 1;
-                if (totalTimes <= shopCfg.doubleTimes)
-                {
-                    multiple = 2;
-                }
-                List<ItemData> itemDatas = ItemUtil.CreateItemDataList(itemCfg.id, times * shopCfg.itemNum * multiple);
+                //if (totalTimes <= shopCfg.doubleTimes)
+                //{
+                //    multiple = 2;
+                //}
+                List<ItemData> itemDatas = new List<ItemData>();
+                itemDatas.Add(ItemUtil.createItemData(itemCfg.id, times * shopCfg.itemNum * multiple));
+                itemDatas.Add(ItemUtil.createItemData(doubleItemIdCfg.id, times * shopCfg.itemNum * multiple));
                 BonusController.TryShowBonusList(itemDatas);
             }
             EventAgent.DispatchEvent(ConstMessage.SHOP_BUY);

+ 3 - 11
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -243,12 +243,9 @@ namespace GFGGame
                     comBox.m_btnRule.onClick.Add(RuleController.ShowRuleView);
                     comBox.m_btnRule.data = 300024;
                 }
-                comBox.m_btnRule.visible = true;
             }
-            else {
+            else 
                 comBox.m_showActivityType.selectedIndex = 0;
-                comBox.m_btnRule.visible = false;
-            }
 
             if (!_lcukyBoxCtrl.ContainsKey(boxId))
             {
@@ -492,7 +489,6 @@ namespace GFGGame
             int boxId = (int)obj.data;
             LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
             long freeTime = LuckyBoxDataManager.Instance.GetFreeTime(boxId);
-
             int boughtCount = GameGlobal.myNumericComponent.GetAsInt(luckyBoxCfg.numericType);
 
             if (boughtCount + LuckyBoxDataManager.ONCE_TIME > luckyBoxCfg.maxCount)
@@ -506,12 +502,8 @@ namespace GFGGame
                  if (boxId == LuckyBoxDataManager.BOX_ID_2) {
                      activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitTsy);
                  }
-                 bool result = false;
-                 if (freeTime > 0 && freeTime < TimeHelper.ServerNow())
-                    result = await LuckyBoxSProxy.ReqGetBonus(boxId, LuckyBoxDataManager.ONCE_TIME, true, activityId);
-                 else
-                    result = await LuckyBoxSProxy.ReqGetBonus(boxId, LuckyBoxDataManager.ONCE_TIME,false, activityId);
-
+                 bool freeType = (freeTime > 0 && freeTime < TimeHelper.ServerNow());
+                 bool result = await LuckyBoxSProxy.ReqGetBonus(boxId, LuckyBoxDataManager.ONCE_TIME, freeType, activityId);
                  if (result)
                  {
                      ViewManager.Show<LuckyBoxStarView>(null, new object[] { typeof(LuckyBoxView).FullName, boxId });

+ 4 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeView.cs

@@ -81,8 +81,10 @@ namespace GFGGame
                 item.target.onClick.Add(OnClickBtnBuy);
             }
             item.target.data = index;
-            item.m_txtName.text = string.Format("{0}{1}", shopCfg.itemNum, shopCfg.itemName);
-            item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", shopCfg.itemNum, shopCfg.itemName);
+            ItemCfg doubleItem = ItemCfgArray.Instance.GetCfg(shopCfg.doubleItemId);
+
+            item.m_txtName.text = string.Format("{0}{1}", shopCfg.itemNum, doubleItem.name);
+            item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", shopCfg.itemNum, doubleItem.name);
             bool isDouble = ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) < shopCfg.doubleTimes;
             item.m_grpDouble.visible = isDouble;
             item.m_txtDesc.visible = isDouble;

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes