private void BuyGoldSuccessCallBack(BuyGameGoodsRes res) { LoadingOverlay.Instance.Hide(); ShopModel.UpdateUserBuyGameMallVo(res.UserBuyGameMall); GlobalData.PlayerModel.UpdateUserMoney(res.UserMoney); // Debug.LogError(res.Award); RewardUtil.AddReward(res.Award); if (_awardWindow == null) { _awardWindow = PopupManager.ShowWindow <AwardWindow>("GameMain/Prefabs/AwardWindow/AwardWindow"); } _awardWindow.SetData(res.Award); //统计 GameMallVo mallVo = ShopModel.GameMallDic[res.UserBuyGameMall.MallId]; View.SetData(ShopModel); GlobalData.PlayerModel.PlayerVo.HasGetFreeGemGift = ShopModel.HasFreeGemMall(); if (mallVo.MoneyTypePb == MoneyTypePB.MoGem) { SdkHelper.StatisticsAgent.OnPurchase(mallVo.MallName, res.Award.Count, mallVo.RealPrice); } else { SdkHelper.StatisticsAgent.OnEvent(mallVo.MallName, res.Award.Count); } }
private void BuyGoldSuccessCallBack(GotDailyPackageRes res) { LoadingOverlay.Instance.Hide(); GlobalData.PlayerModel.PlayerVo.ExtInfo = res.UserExtraInfo; _shopModel.UpdateUserBuyGameMallVo(new UserBuyGameMallPB() { BuyNum = 1, MallId = _freeGift, MallType = MallTypePB.MallGem }); //GlobalData.PlayerModel.UpdateUserMoney(res.UserMoney); // Debug.LogError(res.Award); RewardUtil.AddReward(res.Award); if (_awardWindow == null) { _awardWindow = PopupManager.ShowWindow <AwardWindow>("GameMain/Prefabs/AwardWindow/AwardWindow"); } _awardWindow.SetData(res.Award); View.SetData(_shopModel); //统计 GameMallVo mallVo = _shopModel.GameMallDic[_freeGift]; if (mallVo.MoneyTypePb == MoneyTypePB.MoGem) { SdkHelper.StatisticsAgent.OnPurchase(mallVo.MallName, res.Award.Count, mallVo.RealPrice); } else { SdkHelper.StatisticsAgent.OnEvent(mallVo.MallName, res.Award.Count); } SendMessage(new Message(MessageConst.CMD_ACTIVITY_REFRESH_ACTIVITYTOGGLE_REDDOT)); }