hxp
2024-06-03 3539de8ccaaa2cf67575a4074a25a1edde415a5b
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -34,6 +34,7 @@
import PlayerFairyCeremony
import PlayerNewFairyCeremony
import PlayerActGarbageSorting
import PlayerActBossTrial
import PlayerUniversalGameRec
import GameWorldAverageLv
import PlayerFamilyBoss
@@ -141,7 +142,7 @@
        
        活动分组编号 = 活动类型 * 10 + 不同界面编号
    '''
    if ipyData and hasattr(ipyData, "ActNum"):
    if ipyData and hasattr(ipyData, "GetActNum"):
        return ipyData.GetActNum()
    
    # 原节日活动的还是默认节日活动
@@ -245,9 +246,9 @@
        
        for ipyData in curServerActIpyDataList:
            
            platformList = [] if not hasattr(ipyData, "PlatformList") else ipyData.GetPlatformList()
            serverGroupIDList = [] if not hasattr(ipyData, "ServerGroupIDList") else ipyData.GetServerGroupIDList()
            serverGroupIDListExcept = [] if not hasattr(ipyData, "ServerGroupIDListExcept") else ipyData.GetServerGroupIDListExcept()
            platformList = [] if not hasattr(ipyData, "GetPlatformList") else ipyData.GetPlatformList()
            serverGroupIDList = [] if not hasattr(ipyData, "GetServerGroupIDList") else ipyData.GetServerGroupIDList()
            serverGroupIDListExcept = [] if not hasattr(ipyData, "GetServerGroupIDListExcept") else ipyData.GetServerGroupIDListExcept()
            cfgID = ipyData.GetCfgID()
            startDateStr = ipyData.GetStartDate()
            endDateStr = ipyData.GetEndDate()
@@ -598,9 +599,9 @@
    actCfgCount = getattr(ipyDataMgr, "Get%sCount" % actName)()
    for cfgIndex in xrange(actCfgCount):
        ipyData = getattr(ipyDataMgr, "Get%sByIndex" % actName)(cfgIndex)            
        platformList = [] if not hasattr(ipyData, "PlatformList") else ipyData.GetPlatformList()
        serverGroupIDList = [] if not hasattr(ipyData, "ServerGroupIDList") else ipyData.GetServerGroupIDList()
        serverGroupIDListExcept = [] if not hasattr(ipyData, "ServerGroupIDListExcept") else ipyData.GetServerGroupIDListExcept()
        platformList = [] if not hasattr(ipyData, "GetPlatformList") else ipyData.GetPlatformList()
        serverGroupIDList = [] if not hasattr(ipyData, "GetServerGroupIDList") else ipyData.GetServerGroupIDList()
        serverGroupIDListExcept = [] if not hasattr(ipyData, "GetServerGroupIDListExcept") else ipyData.GetServerGroupIDListExcept()
        
        if platformList and platform not in platformList:
            continue
@@ -776,6 +777,11 @@
                GameWorld.Log("    dbActID变更: dbActID=%s,curActID=%s" % (dbActID, curActID))
                PlayerDBGSEvent.SetDBGSTrig_ByKey(dbOperationActIDKey, curActID)
                
                # 结束旧的
                if dbActID:
                    if actName == ShareDefine.OperationActionName_BossTrial:
                        PlayerActBossTrial.OnActEnd(actNum, ipyData, dayIndex)
                if curActID:
                    if actName in ShareDefine.NeedWorldLVOperationActNameList:
                        #记录开启时世界等级
@@ -803,6 +809,8 @@
                        PlayerStore.ResetFlashSaleBuyCnt(ipyData)
                    elif actName == ShareDefine.OperationActionName_GarbageSorting:
                        PlayerActGarbageSorting.OnActStart(actNum)
                    elif actName == ShareDefine.OperationActionName_BossTrial:
                        PlayerActBossTrial.OnActStart(actNum)
                else:
                    if actName == ShareDefine.OperationActionName_GarbageSorting:
                        PlayerActGarbageSorting.OnActEnd(actNum)
@@ -1072,7 +1080,6 @@
    
    if GameWorld.IsCrossServer():
        CrossActionControl.Dispose_CrossDailyActionState()
        return
    
    todayDailyActionInfo = __GetTodayDailyActionInfo()
    if not todayDailyActionInfo:
@@ -1139,16 +1146,15 @@
def SendMapServerDailyActionState():
    # 地图启动成功时通知本日进行中的日常活动状态
    
    gameWorld = GameWorld.GetGameWorld()
    if GameWorld.IsCrossServer():
        CrossActionControl.SendMapServerCrossDailyActionState()
        return
    gameWorld = GameWorld.GetGameWorld()
    for dailyActionID in ShareDefine.CrossDailyActionIDList:
        dictName = ShareDefine.Def_Notify_WorldKey_CrossDailyActionState % dailyActionID
        state = gameWorld.GetDictByKey(dictName)
        if state:
            GameWorld.SendMapServerMsgEx(dictName, state)
    else:
        for dailyActionID in ShareDefine.CrossDailyActionIDList:
            dictName = ShareDefine.Def_Notify_WorldKey_CrossDailyActionState % dailyActionID
            state = gameWorld.GetDictByKey(dictName)
            if state:
                GameWorld.SendMapServerMsgEx(dictName, state)
            
    todayDailyActionInfo = __GetTodayDailyActionInfo()
    if not todayDailyActionInfo: