zhaoyang 3 years ago
parent
commit
2c4cc98a8b

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -1,3 +1,5 @@
+using ET;
+
 namespace GFGGame
 {
     public class ShopDataManager : SingletonBase<ShopDataManager>
@@ -6,7 +8,10 @@ namespace GFGGame
 
         public void BuyItem(int itemId, int itemCount, int shopType, ShopCfg shopCfg)
         {
-            BuyItemConteoller.Show(itemId, itemCount, ConstBuyType.TYPE_SHOP, shopType, null, true, false, GameConst.MAX_COUNT_TO_BUY_ITEMS);
+            BuyItemConteoller.Show(itemId, itemCount, ConstBuyType.TYPE_SHOP, shopType, () =>
+            {
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.FU_ZHUANG_DIAN, 2);
+            }, true, false, GameConst.MAX_COUNT_TO_BUY_ITEMS);
         }
     }
 }

+ 3 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/CardSProxy.cs

@@ -90,7 +90,7 @@ namespace GFGGame
             }
             return false;
         }
-        public static async ETTask UpgradeCardSkill(int cardId, int skillId)
+        public static async ETTask<bool> UpgradeCardSkill(int cardId, int skillId)
         {
             M2C_UpgradeCardSkill response = null;
             response = (M2C_UpgradeCardSkill)await MessageHelper.SendToServer(new C2M_UpgradeCardSkill() { CardId = cardId, SkillId = skillId });
@@ -100,8 +100,10 @@ namespace GFGGame
                 {
                     SkillDataManager.Instance.UpdateSkill(response.CardId, response.SkillId, response.SkillLvl);
                     EventAgent.DispatchEvent(ConstMessage.CARD_UP_SKILL);
+                    return true;
                 }
             }
+            return false;
         }
     }
 }

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -8,6 +8,7 @@ using System.Timers;
 using System.Collections;
 using System.Linq;
 using VEngine;
+using ET;
 
 namespace GFGGame
 {
@@ -454,6 +455,8 @@ namespace GFGGame
                     this.UpdateCommon();
                     this.UpdateUpLvView();
                     this.ClearItemsCountList();
+                    LogServerHelper.SendNodeLog((int)PlayParticipationEnum.CI_PAI, 2);
+
                 }
             }
         }
@@ -607,6 +610,8 @@ namespace GFGGame
 
                 // this._selectTab = _comFosterBottom.m_ctrlTab.selectedIndex;
                 ViewManager.Show(ViewName.CARD_UP_VIEW, new object[] { _cardData.scores, "star", _cardData.star - 1, _cardData.star }, new object[] { ViewName.CARD_FOSTER_VIEW, _cardData });
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.CI_PAI, 2);
+
             }
         }
         /***********************************************************升技能***************************************************/

+ 8 - 8
GameClient/Assets/Game/HotUpdate/Views/Card/CardSkillView.cs

@@ -1,3 +1,4 @@
+using ET;
 using FairyGUI;
 using UI.Card;
 namespace GFGGame
@@ -106,7 +107,7 @@ namespace GFGGame
             int itemId = int.Parse(UI_ComStarConsume.Proxy(_ui.m_listConsume.GetChildAt(index)).target.data.ToString());
             ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { ViewName.CARD_FOSTER_VIEW, this.viewData } });
         }
-        private void OnClickBtnUp()
+        private async void OnClickBtnUp()
         {
             if (ItemDataManager.GetItemNum(skillLvCfg.costID) < skillLvCfg.costNum)
             {
@@ -127,13 +128,12 @@ namespace GFGGame
                 }
             }
             if (!isEnough) return;
-            // ItemDataManager.Remove(skillCfg.costID, skillCfg.costNum);
-            // for (int i = 0; i < skillCfg.materiarsArr.Length; i++)
-            // {
-            //     ItemDataManager.Remove(skillCfg.materiarsArr[i][0], skillCfg.materiarsArr[i][1]);
-            // }
-            // SkillDataManager.Instance.UpSkill(_cardId, _skillId);
-            CardSProxy.UpgradeCardSkill(_cardId, _skillId).Coroutine();
+
+            bool result = await CardSProxy.UpgradeCardSkill(_cardId, _skillId);
+            if (result)
+            {
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.CI_PAI, 2);
+            }
 
         }
         protected override void OnHide()

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/ClothingDecompose/ClothingDecomposeView.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using ET;
 using FairyGUI;
 using UI.ClothingDecompose;
 
@@ -262,6 +263,8 @@ namespace GFGGame
             if (result)
             {
                 OnClickBtnRarity(_curRarity);
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.FU_ZHUANG_FEN_JIE, 2);
+
             }
         }
         private void OnClickBtnRule()

+ 7 - 3
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitFosterView.cs

@@ -94,15 +94,19 @@ namespace GFGGame
 
             item.m_txtAdd.text = "+" + _addPropertyList.GetByIndex(index);
         }
-        private void OnClickBtnFoster()
+        private async void OnClickBtnFoster()
         {
             if (!_canFoster)
             {
                 PromptController.Instance.ShowFloatTextPrompt("材料不足");
                 return;
             }
-            SuitFosterProxy.SendMaintainSuit(_suitId, _index + 1).Coroutine();
-            this.Hide();
+            int result = await SuitFosterProxy.SendMaintainSuit(_suitId, _index + 1);
+            if (result == ErrorCode.ERR_Success)
+            {
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.FU_ZHUANG_YANG_CHENG, 2);
+                this.Hide();
+            }
         }
     }
 }

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitView.cs

@@ -349,7 +349,7 @@ namespace GFGGame
             ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { typeof(SuitView).FullName, this.viewData } });
         }
 
-        private void OnClickBtnRenew()
+        private async void OnClickBtnRenew()
         {
 
             if (!_canRenew)
@@ -364,7 +364,11 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt(string.Format("完成{0}开启换新", SuitFosterDataManager.Instance.stepNames[cfg.renewOpenLv - 1]));
                 return;
             }
-            SuitFosterProxy.SendMakeNewSuit(_suitId).Coroutine();
+            int result = await SuitFosterProxy.SendMakeNewSuit(_suitId);
+            if (result == ErrorCode.ERR_Success)
+            {
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.FU_ZHUANG_YANG_CHENG, 2);
+            }
         }
         private void OnListenerRenew()
         {

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

@@ -5,6 +5,7 @@ using UI.CommonGame;
 using FairyGUI;
 using System.Collections.Generic;
 using System;
+using ET;
 
 namespace GFGGame
 {
@@ -176,6 +177,7 @@ namespace GFGGame
             {
                 _selectedItemId = 0;
                 UpdateClothingList(true);
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.FU_ZHUANG_HE_CHENG, 2);
 
             }
 

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/DailyLogin/DailyLoginView.cs

@@ -1,5 +1,6 @@
 
 using System.Collections.Generic;
+using ET;
 using FairyGUI;
 using UI.DailyLogin;
 using UnityEngine;
@@ -79,6 +80,7 @@ namespace GFGGame
                 bool result = await ActivitySProxy.ReqGetDailyLoginRewards(cfg.id);
                 if (result)
                 {
+                    LogServerHelper.SendNodeLog((int)PlayParticipationEnum.MEI_RI_DNEG_LU, 2);
                     _ui.m_list.numItems = _cfgs.Count;
                 }
             }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/DailyTask/DailyTaskView.cs

@@ -1,5 +1,6 @@
 
 using System.Collections.Generic;
+using ET;
 using FairyGUI;
 using UI.DailyTask;
 using UnityEngine;
@@ -116,6 +117,7 @@ namespace GFGGame
             {
                 UpdateList();
                 UpdateReward();
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.MEI_RI_REN_WU, 2);
 
             }
         }
@@ -168,6 +170,7 @@ namespace GFGGame
             {
                 UpdateList();
                 UpdateReward();
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.MEI_RI_REN_WU, 2);
 
             }
 

+ 31 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -3,6 +3,7 @@ using FairyGUI;
 using UnityEngine;
 using System.Collections.Generic;
 using System;
+using ET;
 
 namespace GFGGame
 {
@@ -176,6 +177,7 @@ namespace GFGGame
             UpdateScore();
             EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
 
+            SendLog();
 
         }
 
@@ -879,6 +881,35 @@ namespace GFGGame
                 return DressUpMenuItemDataManager.getItemDatasByType(type).Count > 0;
             }
         }
+
+        private void SendLog()
+        {
+            var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
+
+            switch (levelCfg.type)
+            {
+                case ConstInstanceZonesType.Story:
+                    LogServerHelper.SendNodeLog((int)PlayParticipationEnum.CHUN_ZHONG_LOU, 2);
+                    break;
+                case ConstInstanceZonesType.Studio:
+                    StudioCfg studioCfg = StudioCfgArray.Instance.GetCfg(levelCfg.chapterId);
+                    if (studioCfg.funId == typeof(StudioMetalView).Name)
+                    {
+                        LogServerHelper.SendNodeLog((int)PlayParticipationEnum.JIN_SHU_XIU_FU, 2);
+                    }
+                    else if (studioCfg.funId == typeof(StudioFabricView).Name)
+                    {
+                        LogServerHelper.SendNodeLog((int)PlayParticipationEnum.ZHI_WU_XIU_FU, 2);
+                    }
+                    else if (studioCfg.funId == typeof(StudioPropertyView).Name)
+                    {
+                        LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHU_HUA_XIU_FU, 2);
+                    }
+                    break;
+
+
+            }
+        }
         protected override void UpdateToCheckGuide(object param)
         {
 

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -1,3 +1,4 @@
+using ET;
 using FairyGUI;
 using System;
 using System.Collections;
@@ -536,6 +537,8 @@ namespace GFGGame
 
             ViewManager.Show<PhotographSaveView>(tex);
             _ui.target.visible = true;
+            LogServerHelper.SendNodeLog((int)PlayParticipationEnum.PAI_ZHAO, 2);
+
         }
 
         private void OnClickBtnBack()

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Field/FieldView.cs

@@ -145,6 +145,7 @@ namespace GFGGame
         }
         private void StartFight()
         {
+            LogServerHelper.SendNodeLog((int)PlayParticipationEnum.TIAN_YE_DIAO_CHA, 2);
             int curLevelId = StoryLevelCfgArray.Instance.GetCfgs(_curCfg.type, 0, _curCfg.id)[0].id;
             ViewManager.Show(ViewName.DRESS_UP_FIGHT_VIEW, curLevelId, new object[] { typeof(FieldView).Name, this.viewData }, true);
             InstanceZonesDataManager.currentLevelCfgId = curLevelId;

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

@@ -196,6 +196,8 @@ namespace GFGGame
                  if (result)
                  {
                      ViewManager.Show(ViewName.LUCKY_BOX_STAR_VIEW, null, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxDataManager.Instance.currentBoxId });
+                     LogServerHelper.SendNodeLog((int)PlayParticipationEnum.ZAI_XING, 2);
+
                  }
              });
         }
@@ -208,6 +210,7 @@ namespace GFGGame
                 if (result)
                 {
                     ViewManager.Show(ViewName.LUCKY_BOX_STAR_VIEW, null, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxDataManager.Instance.currentBoxId });
+                    LogServerHelper.SendNodeLog((int)PlayParticipationEnum.ZAI_XING, 2);
                 }
             });
         }

+ 0 - 12
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

@@ -64,8 +64,6 @@ namespace GFGGame
 
         private void OnClickBtnStart()
         {
-            SendLog();
-
             // int time = InstanceZonesDataManager.GetCanFightTime(_levelID);
             InstanceZonesDataManager.GetCanFightTime(_type, _storyType, _levelID, out int times, out string title);
             if (times > 0)
@@ -262,17 +260,7 @@ namespace GFGGame
             item.m_txtTag.text = tag[1];
         }
 
-        private void SendLog()
-        {
-            var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
 
-            switch (levelCfg.type)
-            {
-                case ConstInstanceZonesType.Story:
-                    LogServerHelper.SendNodeLog((int)PlayParticipationEnum.CHUN_ZHONG_LOU, 2);
-                    break;
-            }
-        }
         protected override void UpdateToCheckGuide(object param)
         {
 

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/GiftBagBuyView.cs

@@ -1,4 +1,5 @@
 using System.Threading.Tasks;
+using ET;
 using FairyGUI;
 using UI.RechargeStore;
 
@@ -55,7 +56,7 @@ namespace GFGGame
             {
                 _ui.m_txtLock.text = string.Format("角色达到{0}级解锁", cfg.lv);
             }
-            int buyNum = RechargeDataManager.Instance.GetGiftBuyNumById(cfg.id);         
+            int buyNum = RechargeDataManager.Instance.GetGiftBuyNumById(cfg.id);
             _ui.m_txtLimit.text = string.Format("{0}({1}/{2})", RechargeDataManager.Instance.refreshType[cfg.refreshType], StringUtil.GetColorText(buyNum.ToString(), "#DA8870"), cfg.maxBuyNum);
             if (cfg.refreshType == RefreshType.NONE) _ui.m_txtLimit.text = "永久限购";
             _ui.m_txtEndTime.text = RechargeDataManager.Instance.GetEndTime(cfg.id);
@@ -118,6 +119,7 @@ namespace GFGGame
             bool result = await RechargeSProxy.ReqBuyGiftBag(_giftId);
             if (result)
             {
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
                 this.Hide();
                 if (cfg.costType == CostType.RMB)
                 {

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ItemExchangeView.cs

@@ -1,4 +1,5 @@
 using System;
+using ET;
 using FairyGUI;
 using UI.RechargeStore;
 
@@ -130,6 +131,7 @@ namespace GFGGame
             bool result = await RechargeSProxy.ReqExchangeShopItem(_exchangeId, _buyCount);
             if (result)
             {
+                LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
                 this.Hide();
             }
         }

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/RechargeStoreView.cs

@@ -120,6 +120,8 @@ namespace GFGGame
                 item.target.onClick.Add(() =>
                 {
                     RechargeSProxy.ReqRecharge(itemData.id).Coroutine();
+                    LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+
                 });
             }
             item.target.data = index;