From 350e0e1f0fa62719e58e1b8d1e9eb9b6416cdd44 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 11 四月 2025 16:33:04 +0800
Subject: [PATCH] 10367 【越南】【英语】【BT】【砍树】仙盟攻城战-服务端(优化仙盟充值协助支持配置关联的充值ID列表即商城类型;充值协助支持记录领取的成员明细;攻城战结束支持回收相关道具;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActFamilyCTGAssist.py |   42 +++++++++++++++++++++++++++++++++---------
 1 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActFamilyCTGAssist.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActFamilyCTGAssist.py
index 4cb31eb..c31bd37 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActFamilyCTGAssist.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActFamilyCTGAssist.py
@@ -26,6 +26,8 @@
 import IPY_GameWorld
 import GameWorld
 import ChConfig
+import PlayerCoin
+import FunctionNPCCommon
 
 def OnPlayerLogin(curPlayer):
     
@@ -58,7 +60,7 @@
     actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_FamilyCTGAssist, actNum)
     actID = actInfo.get(ShareDefine.ActKey_ID, 0)
     state = actInfo.get(ShareDefine.ActKey_State, 0)
-    #cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
+    cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
     #dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
     
     playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FamilyCTGAssistID % actNum) # 玩家身上的活动ID
@@ -73,21 +75,38 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FamilyCTGAssistAward % actNum, 0)
     
     if state:
+        ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID)
+        if ipyData:
+            resetCTGIDList = ipyData.GetCTGIDList()
+            PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActFamilyCTGAssist", resetCTGIDList)
+            shopType = ipyData.GetActShopType()
+            if shopType:
+                FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, [shopType])
+                
         Sync_FamilyCTGAssistActionInfo(curPlayer, actNum)
         Sync_FamilyCTGAssistPlayerInfo(curPlayer, actNum)
         
     return True
 
-def OnPlayerCTG(curPlayer):
+def OnPlayerCTG(curPlayer, ctgID):
     if not curPlayer.GetFamilyID():
         return
     
     actNumList = []
     for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FamilyCTGAssist, {}).values():
         actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
-        if actInfo.get(ShareDefine.ActKey_State):
-            actNumList.append(actNum)
-            
+        if not actInfo.get(ShareDefine.ActKey_State):
+            continue
+        cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
+        ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID)
+        if not ipyData:
+            continue
+        ctgIDList = ipyData.GetCTGIDList()
+        if ctgIDList and ctgID not in ctgIDList:
+            GameWorld.DebugLog("仙盟充值协助该充值ID不触发协助! cfgID=%s,actNum=%s,ctgID=%s not in %s" % (cfgID, actNum, ctgID, ctgIDList), curPlayer.GetPlayerID())
+            continue
+        actNumList.append(actNum)
+        
     if not actNumList:
         return
     
@@ -112,11 +131,11 @@
         return
     
     cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
-    dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
+    #dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
     ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID)
     if not ipyData:
         return
-    templateID = GameWorld.GetTemplateID(ipyData, cfgID, dayIndex)
+    templateID = ipyData.GetTemplateID()
     if not templateID:
         return
     
@@ -215,11 +234,11 @@
         return
     
     cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
-    dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
+    #dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
     ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID)
     if not ipyData:
         return
-    templateID = GameWorld.GetTemplateID(ipyData, cfgID, dayIndex)
+    templateID = ipyData.GetTemplateID()
     if not templateID:
         return
     tempIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFamilyCTGAssistTemp", templateID)
@@ -253,5 +272,10 @@
         actInfo.AwardInfoList.append(award)
         
     actInfo.AwardCount = len(actInfo.AwardInfoList)
+    
+    actInfo.CTGIDList = ipyData.GetCTGIDList()
+    actInfo.CTGIDCount = len(actInfo.CTGIDList)
+    actInfo.ShopType = ipyData.GetActShopType()
+    
     NetPackCommon.SendFakePack(curPlayer, actInfo)
     return

--
Gitblit v1.8.0