From bc433db8262081f0400bcb9c2c3476000662daf3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 10 七月 2024 14:24:53 +0800
Subject: [PATCH] 10205 【越南】【主干】【港台】【砍树】自选礼包(支持一次性放入超65535个数叠加物品;邮件同步支持一次性领取超65535个数叠加物品)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index d8ae9bd..c89e50d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -742,7 +742,7 @@
         for sendMapServerMsgDict in curActMapInfoDictList:
             
             state = 0 # 默认关闭
-            stateJoin = 0 # 可参与状态
+            stateJoin = ShareDefine.ActStateJoin_None # 可参与状态,0-参与前;1-可参与;2-参与结束
             ipyData = None
             
             actNum = sendMapServerMsgDict.get(ShareDefine.ActKey_ActNum, 0)
@@ -773,10 +773,12 @@
                         for jIndex, joinStartDateTime in enumerate(joinStartTimeList):
                             endJoinDateTime = joinEndTimeList[jIndex]
                             if joinStartDateTime <= curDateTime < endJoinDateTime:
-                                stateJoin = state
+                                stateJoin = ShareDefine.ActStateJoin_Start
                                 break
+                            elif curDateTime >= endJoinDateTime:
+                                stateJoin = ShareDefine.ActStateJoin_End
                     else:
-                        stateJoin = state
+                        stateJoin = ShareDefine.ActStateJoin_Start if state else ShareDefine.ActStateJoin_None
                         
                     # 全服广播提示信息
                     if curDateTime in notifyDict:
@@ -857,6 +859,17 @@
             else:
                 GameWorld.Log("    dbActID不变: dbActID=%s,curActID=%s" % (dbActID, curActID))
                 
+            # 仅活动有配置参与时间段的会触发
+            if curActID and dbActID == curActID and preStateJoin != stateJoin:
+                GameWorld.Log("    参与状态变更: preStateJoin=%s,stateJoin=%s" % (preStateJoin, stateJoin))
+                # 参与开始
+                if stateJoin == ShareDefine.ActStateJoin_Start:
+                    pass
+                # 参与结束
+                elif stateJoin == ShareDefine.ActStateJoin_End:
+                    if actName == ShareDefine.OperationActionName_BossTrial:
+                        PlayerActBossTrial.OnActJoinEnd(actNum, ipyData, dayIndex)
+                        
             if ipyData and actName in ShareDefine.NeedWorldLVOperationActNameList:
                 actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActWorldLVKey)
                 sendMapServerMsgDict[ShareDefine.ActKey_WorldLV] = actWorldLV

--
Gitblit v1.8.0