From 12be80ecd33e26a29c0f7186bd1f200550eea15f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 21 八月 2024 18:59:56 +0800
Subject: [PATCH] 10223 10238 10241 【越南】【砍树】【主干】【港台】仙匣秘境、骑宠养成、古宝养成,修复本服活动同时开多个时活动榜单可能被重置的bug;

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py |    6 +++---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py             |   12 +++++++++++-
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py         |   12 +++++++++++-
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py                 |   12 +++++++++++-
 4 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index 6ffbdec..2f97f1f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -860,11 +860,11 @@
                     elif actName == ShareDefine.OperationActionName_BossTrial:
                         PlayerActBossTrial.OnActStart(actNum)
                     elif actName == ShareDefine.OperationActionName_XianXiaMJ:
-                        PlayerActXianXiaMJ.OnActStart(actNum)
+                        PlayerActXianXiaMJ.OnActStart(actNum, ipyData)
                     elif actName == ShareDefine.OperationActionName_Gubao:
-                        PlayerActGubao.OnActStart(actNum)
+                        PlayerActGubao.OnActStart(actNum, ipyData)
                     elif actName == ShareDefine.OperationActionName_HorsePetTrain:
-                        PlayerActHorsePetTrain.OnActStart(actNum)
+                        PlayerActHorsePetTrain.OnActStart(actNum, ipyData)
                     elif actName == ShareDefine.OperationActionName_FamilyCTGAssist:
                         PlayerActFamilyCTGAssist.OnActStart(actNum)
                 else:
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py
index 1e8006c..d0845a5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py
@@ -28,8 +28,14 @@
 import CrossRealmMsg
 import GameWorld
 
-def OnActStart(actNum):
+def OnActStart(actNum, ipyData):
     ## 活动开启
+    if not ipyData:
+        return
+    personalTemplateID = ipyData.GetPersonalTemplateID()
+    if not personalTemplateID:
+        GameWorld.DebugLog("古宝养成活动没有榜单奖励,不处理OnActStart! actNum=%s" % (actNum))
+        return
     PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAward % actNum, 0)
     PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_GubaoScore)
     return
@@ -54,6 +60,10 @@
     if not ipyData:
         return
     cfgID = ipyData.GetCfgID()
+    personalTemplateID = ipyData.GetPersonalTemplateID()
+    if not personalTemplateID:
+        GameWorld.DebugLog("古宝养成活动没有榜单奖励,不结算榜单奖励! actNum=%s" % (actNum))
+        return
     awardState = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActGubaoAward % actNum)
     if awardState:
         #已经结算过该活动
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py
index c05f09a..b1116b7 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py
@@ -27,8 +27,14 @@
 import CrossRealmMsg
 import GameWorld
 
-def OnActStart(actNum):
+def OnActStart(actNum, ipyData):
     ## 活动开启
+    if not ipyData:
+        return
+    personalTemplateID = ipyData.GetPersonalTemplateID()
+    if not personalTemplateID:
+        GameWorld.DebugLog("骑宠养成活动没有榜单奖励,不处理OnActStart! actNum=%s" % (actNum))
+        return
     PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActHorsePetTrainAward % actNum, 0)
     PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_HorsePetTrainScore)
     return
@@ -53,6 +59,10 @@
     if not ipyData:
         return
     cfgID = ipyData.GetCfgID()
+    personalTemplateID = ipyData.GetPersonalTemplateID()
+    if not personalTemplateID:
+        GameWorld.DebugLog("骑宠养成活动没有榜单奖励,不结算榜单奖励! actNum=%s" % (actNum))
+        return
     awardState = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActHorsePetTrainAward % actNum)
     if awardState:
         #已经结算过该活动
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py
index 5667123..c7cb01d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py
@@ -27,8 +27,14 @@
 import CrossRealmMsg
 import GameWorld
 
-def OnActStart(actNum):
+def OnActStart(actNum, ipyData):
     ## 活动开启
+    if not ipyData:
+        return
+    personalTemplateID = ipyData.GetPersonalTemplateID()
+    if not personalTemplateID:
+        GameWorld.DebugLog("仙匣秘境活动没有榜单奖励,不处理OnActStart! actNum=%s" % (actNum))
+        return
     PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActXianXiaMJAward % actNum, 0)
     PlayerBillboard.ClearBillboardByIndex(ShareDefine.Def_BT_XianXiaMJScore)
     return
@@ -53,6 +59,10 @@
     if not ipyData:
         return
     cfgID = ipyData.GetCfgID()
+    personalTemplateID = ipyData.GetPersonalTemplateID()
+    if not personalTemplateID:
+        GameWorld.DebugLog("仙匣秘境活动没有榜单奖励,不结算榜单奖励! actNum=%s" % (actNum))
+        return
     awardState = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ActXianXiaMJAward % actNum)
     if awardState:
         #已经结算过该活动

--
Gitblit v1.8.0