Browse Source

新春活动协议提交

zhangyuqian 1 year ago
parent
commit
625e6df341

+ 35 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivityTeaSProxy.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using ET;
+
+namespace GFGGame
+{
+    public class ActivityTeaSProxy
+    {
+        public static async ETTask<bool> ReqGetNPCVisitInfo(int id)
+        {
+            var response = (S2C_GetNpcVisits) await MessageHelper.SendToServer(new C2S_GetNpcVisits { ActivityId = id });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits;
+            return true;
+        }
+
+        public static async ETTask<bool> ReqUnLockNPCVisit(int id,int npcid)
+        {
+            var response = (S2C_UnlockNpcVisit)await MessageHelper.SendToServer(new C2S_UnlockNpcVisit { ActivityId = id , NpcId = npcid});
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits;
+            return true;
+        }
+
+        public static async ETTask<bool> ReqGetNPCVisitReward(int id, int npcid)
+        {
+            var response = (S2C_GetNpcVisitRewrd)await MessageHelper.SendToServer(new C2S_GetNpcVisitRewrd { ActivityId = id, NpcId = npcid });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            // 奖励弹窗
+            BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.BonusList));
+            MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits;
+            return true;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivityTeaSProxy.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d3ed76ce925790948a9ec209585eee49
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: