fix:1、修复bug

This commit is contained in:
barry
2026-06-29 08:59:34 +08:00
parent 86518aae41
commit 1354dfbc34
92 changed files with 53105 additions and 51712 deletions
@@ -55,6 +55,7 @@ namespace ChillConnect
AdRedeemManager.Instance.Destroy();
HallManager.Instance.UpdateSecondEvent -= updateSpeedCD;
HallManager.Instance.UpdateSecondEvent -= Update;
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
closeCallback?.Invoke();
// WebviewManager.ShezhiACT(true);
WebviewManager.Instance.SetDarkThough(true);
@@ -113,6 +114,9 @@ namespace ChillConnect
HallManager.Instance.UpdateSecondEvent += Update;
updateSpeedCD();
InitBroadCast();
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
upLvWatchAdsBtn();
}
@@ -171,30 +175,34 @@ namespace ChillConnect
Debug.Log("iiiiiiiiiiiiiiiiiiiii");
if (SaveData.GetSaveObject().saveingpot_ch < makeupTaskData.amount)
{
ui.btn_ch.title = "Go";
((btn_watchAd)ui.btn_ch).watch.text = "Go";
ui.btn_ch.SetClick(() =>
{
// if (UIManager.Instance.IsExistUI(UIConst.HallUI))
// {
// GameDispatcher.Instance.Dispatch(GameMsg.MainTab, 1);
// }
// else
// {
// buygoldParam param = new buygoldParam()
// {
// isShow1 = false,
// is_in_game = true
// };
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, param);
// }
CtrlCloseUI();
GameHelper.ShowVideoAd("SaveingPotAd", isSuccess =>
{
if (isSuccess)
{
var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
SaveData.GetSaveObject()._watch_ad_cd = ad_times + GameHelper.GetCommonModel().exchangeCD;
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
btnWatchad.enabled = false;
btnWatchad.can_buy.selectedIndex = 1;
btnWatchad.btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
InitView();
}
});
});
}
else
{
ui.btn_ch.SetClick(() =>
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
btnWatchad.enabled = true;
btnWatchad.buy_state.selectedIndex = 1;
btnWatchad.title = "GET GIFT CARD";
btnWatchad.SetClick(() =>
{
makeupTaskData.needShowAni = false;
SaveData.saveDataFunc();
@@ -305,9 +313,37 @@ namespace ChillConnect
ui.btn_watch.enabled = true;
ui.btn_watch.show_cd.selectedIndex = 0;
}
}
private void upLvWatchAdsBtn()
{
var lastAdTimes = SaveData.GetSaveObject()._watch_ad_cd;
btn_watchAd btn_watchad = ui.btn_ch as btn_watchAd;
btn_watchad.img_saveingpot.visible = false;
if (SaveData.GetSaveObject().saveingpot_ch >= makeupTaskData.amount)
{
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
InitView();
return;
}
if (GameHelper.GetNowTime() < lastAdTimes)
{
btn_watchad.enabled = false;
btn_watchad.can_buy.selectedIndex = 1;
btn_watchad.btn_text.text = CommonHelper.TimeFormat(lastAdTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
btn_watchad.enabled = true;
btn_watchad.can_buy.selectedIndex = 0;
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) btn_watchad.img_saveingpot.visible = true;
}
}
private void OnInline()
{
CheckBtnWatchStatus();
@@ -513,7 +549,7 @@ namespace ChillConnect
private void refreshItem(int index, GObject obj)
{
com_ticket_item item = (com_ticket_item)obj;
item.lab_num.text = GameHelper.getPrice(makeupTaskData.rdData[index].coupon_mount);
item.lab_num.text = GameHelper.GetPriceInt(makeupTaskData.rdData[index].coupon_mount);
if (makeupTaskData.rdData[index].isClaimed)
{
@@ -733,6 +769,8 @@ namespace ChillConnect
// DataMgr.MakeupTaskHistory.Save();
//OnInline();
SaveData.GetSaveObject().saveingpot_ch -= vo.item_need;
GameDispatcher.Instance.Dispatch(GameMsg.refreshGift);
SaveingPotHelper.CreatSaveingPotItem();
// Debug.Log(JsonConvert.SerializeObject(vo));
if (vo.id == 1)
@@ -815,7 +853,7 @@ namespace ChillConnect
return;
}
DataMgr.ExchangeAccount.Value= account;
DataMgr.ExchangeName .Value= $"{fname} {lname}";
DataMgr.ExchangeName.Value= $"{fname} {lname}";
DataMgr.short_name = fname;
DataMgr.long_name = lname;
showPaypal();
@@ -834,7 +872,7 @@ namespace ChillConnect
}
ui.com_pay.text_name.text = DataMgr.ExchangeName .Value;
ui.com_pay.text_name.text = DataMgr.ExchangeName.Value;
ui.com_pay.text_email.text = DataMgr.ExchangeAccount.Value;
ui.com_pay.btn_change.SetClick(() =>
@@ -875,7 +913,7 @@ namespace ChillConnect
for (int i = 0; i < btn_list.Count; i++)
{
btn_list[i].text_ch.text = "$" + (int)makeup_list[i].item_need;
btn_list[i].text_ch.text = makeup_list[i].item_need + "";
Debug.Log(makeup_list[i].item_need);
btn_list[i].index.selectedIndex = i;
if (i >= saveingpot_history.Count)