diff --git a/Assets/ChillConnect/FGUI/package/P14_PassView/com_passunlock.cs b/Assets/ChillConnect/FGUI/package/P14_PassView/com_passunlock.cs index 4c7b63e..081bd6a 100644 --- a/Assets/ChillConnect/FGUI/package/P14_PassView/com_passunlock.cs +++ b/Assets/ChillConnect/FGUI/package/P14_PassView/com_passunlock.cs @@ -8,6 +8,7 @@ namespace FGUI.P14_PassView public partial class com_passunlock : GComponent { public Controller pay_type; + public Controller gift; public GButton btn_close; public GTextField text_allgold; public GButton btn_buypass; @@ -26,6 +27,7 @@ namespace FGUI.P14_PassView base.ConstructFromXML(xml); pay_type = GetControllerAt(0); + gift = GetControllerAt(1); btn_close = (GButton)GetChildAt(1); text_allgold = (GTextField)GetChildAt(5); btn_buypass = (GButton)GetChildAt(6); diff --git a/Assets/Resources/ChillConnectAssets/FGUI/P14_PassView_fui.bytes b/Assets/Resources/ChillConnectAssets/FGUI/P14_PassView_fui.bytes index 5200531..5563b38 100644 Binary files a/Assets/Resources/ChillConnectAssets/FGUI/P14_PassView_fui.bytes and b/Assets/Resources/ChillConnectAssets/FGUI/P14_PassView_fui.bytes differ diff --git a/Assets/Scripts/AdRedeemManager.cs b/Assets/Scripts/AdRedeemManager.cs index 4f74357..e121fa3 100644 --- a/Assets/Scripts/AdRedeemManager.cs +++ b/Assets/Scripts/AdRedeemManager.cs @@ -100,18 +100,22 @@ public class AdRedeemManager bool is_get1 = item.Key == PurchasingManager.GetPaySku(PayType.remove_ad) && SaveData.GetSaveObject().is_get_removead; if (item.Key == PurchasingManager.GetPaySku(PayType.pack_reward) || item.Key == PurchasingManager.GetPaySku(PayType.remove_ad)) return; - if (GameHelper.GetNowTime() < lastTimes && !checkIsCanReceive(item.Key)) + if (is_get || is_get1) + { + item.Value.enabled = false; + } + else if (GameHelper.GetNowTime() < lastTimes && !checkIsCanReceive(item.Key)) { item.Value.enabled = false; - item.Value.btn_text.text = CommonHelper.TimeFormat(lastTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour); item.Value.can_buy.selectedIndex = btn_watchAd.Can_buy_cd; + item.Value.btn_text.text = CommonHelper.TimeFormat(lastTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour); } else { // stopAction(); item.Value.enabled = true; - checkBtnState(item.Value, item.Key); item.Value.can_buy.selectedIndex = btn_watchAd.Can_buy_can; + checkBtnState(item.Value, item.Key); } } @@ -367,11 +371,11 @@ public class AdRedeemManager if (type == "success" && successTrackKey != null) { - // TrackKit.SendEvent(Property.adEvent, successTrackKey, Int32.Parse(suffix)); + // TrackKit.SendEvent(Property.adEvent, successTrackKey, Int32.Parse(suffix)); } else if (type == "click" && clickTrackKey != null) { - // TrackKit.SendEvent(Property.adEvent, clickTrackKey, Int32.Parse(suffix)); + // TrackKit.SendEvent(Property.adEvent, clickTrackKey, Int32.Parse(suffix)); } } diff --git a/Assets/Scripts/ModuleUI/PassView/PassViewUI.cs b/Assets/Scripts/ModuleUI/PassView/PassViewUI.cs index 71aae9d..ec00b13 100644 --- a/Assets/Scripts/ModuleUI/PassView/PassViewUI.cs +++ b/Assets/Scripts/ModuleUI/PassView/PassViewUI.cs @@ -122,7 +122,7 @@ namespace ChillConnect DOVirtual.DelayedCall(0.5f, () => { int gold = 0; - if(!GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); + if(GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); List Passportrewards_list = ConfigSystem.GetConfig().DataList; for (int i = 0; i < Passportrewards_list.Count; i++) diff --git a/Assets/Scripts/ModuleUI/Passunlock/PassunlockUI.cs b/Assets/Scripts/ModuleUI/Passunlock/PassunlockUI.cs index 90fa93c..71ac9e6 100644 --- a/Assets/Scripts/ModuleUI/Passunlock/PassunlockUI.cs +++ b/Assets/Scripts/ModuleUI/Passunlock/PassunlockUI.cs @@ -57,7 +57,10 @@ namespace ChillConnect (ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true; ui.btn_buypass.GetChild("img_saveingpot").visible = true; } - + if (!GameHelper.IsGiftSwitch()) + { + GameHelper.GetCommonModel().Passportgift = 1; + } if (GameHelper.IsAdModelOfPay()) { ui.pay_type.selectedIndex = 0; @@ -87,7 +90,7 @@ namespace ChillConnect } InitView(); - TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.PassShow); + TrackKit.SendEvent(GameHelper.getTrackEvenName(), Property.PassShow); } @@ -136,7 +139,7 @@ namespace ChillConnect } ui.text_allgold.text = GameHelper.Get101Str(gold); - + } diff --git a/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs b/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs index 6f7ad0c..b5122b6 100644 --- a/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs +++ b/Assets/Scripts/ModuleUI/Play/RainPlayUICtrl.cs @@ -113,7 +113,7 @@ namespace ChillConnect SaveData.GetSaveObject().have_slot = true; SaveData.saveDataFunc(); GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh); - if (!GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); + if (GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); GameHelper.IsTemporaryEnd = false; purch_number = ConfigSystem.GetConfig().addspace2.ToString(); } @@ -128,7 +128,7 @@ namespace ChillConnect GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh); } GameHelper.IsTemporaryEnd = false; - if (!GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); + if (GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); } else if (type == PurchasingManager.GetPaySku(PayType.remove_ad)) { @@ -139,7 +139,7 @@ namespace ChillConnect // GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); GameDispatcher.Instance.Dispatch(GameMsg.noads_refresh); GameDispatcher.Instance.Dispatch(GameMsg.UpdateNoads); - if (!GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); + if (GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); purch_number = ConfigSystem.GetConfig().DataList[1].Paid_price2.ToString(); } else if (type == PurchasingManager.GetPaySku(PayType.pack_reward)) @@ -160,7 +160,7 @@ namespace ChillConnect GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh); GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh); GameDispatcher.Instance.Dispatch(GameMsg.UpdateNoads); - if (!GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); + if (GameHelper.IsGiftSwitch()) GameHelper.ShowTips("Purchase successful"); purch_number = ConfigSystem.GetConfig().DataList[0].Paid_price2.ToString(); } else if (type == PurchasingManager.GetPaySku(PayType.battle_pass))