| | |
| | | import PlayerXMZZ
|
| | | import PlayerFamilySWRH
|
| | | import GameWorldBoss
|
| | | import PlayerFamilyRedPacket
|
| | | import PlayerFairyCeremony
|
| | | import PlayerNewFairyCeremony
|
| | | import GameWorldProcess
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | |
| | | ipyData = operationActionDict[ShareDefine.OperationActionName_FairyCeremony][0]
|
| | | if ipyData:
|
| | | PlayerFairyCeremony.Sync_OperationAction_FairyCeremony(ipyData, curPlayer)
|
| | | |
| | | # 新仙界盛典活动进行中
|
| | | if ShareDefine.OperationActionName_NewFairyCeremony in operationActionDict:
|
| | | ipyData = operationActionDict[ShareDefine.OperationActionName_NewFairyCeremony][0]
|
| | | if ipyData:
|
| | | PlayerNewFairyCeremony.Sync_OperationAction_NewFairyCeremony(ipyData, curPlayer)
|
| | | # 多倍修行点活动进行中
|
| | | if ShareDefine.OperationActionName_RealmPoint in operationActionDict:
|
| | | ipyData = operationActionDict[ShareDefine.OperationActionName_RealmPoint][0]
|
| | | if ipyData:
|
| | | Sync_OperationAction_RealmPoint(ipyData, curPlayer)
|
| | | # 节日红包活动进行中
|
| | | if ShareDefine.OperationActionName_FeastRedPacket in operationActionDict:
|
| | | ipyData = operationActionDict[ShareDefine.OperationActionName_FeastRedPacket][0]
|
| | | if ipyData:
|
| | | PlayerFamilyRedPacket.Sync_FeastRedPacket(ipyData, curPlayer)
|
| | | |
| | | return
|
| | |
|
| | | def SendMapServerOperationActionState():
|
| | |
| | | startDateStr = "%d-%d-%d" % (openServerDateTime.year, openServerDateTime.month, openServerDateTime.day)
|
| | | endDateStr = "%d-%d-%d" % (endServerDateTime.year, endServerDateTime.month, endServerDateTime.day)
|
| | | GameWorld.Log(" 开服天转化为日期: %s ~ %s" % (startDateStr, endDateStr))
|
| | | else:
|
| | | elif actName not in ShareDefine.FeastOperationActionNameList:
|
| | | if openServerDay <= customMaxServerDay:
|
| | | GameWorld.Log(" 按日期开的在开服定制限制天内,不处理! cfgID=%s,%s ~ %s,openServerDay=%s" % (cfgID, startDateStr, endDateStr, openServerDay))
|
| | | continue
|
| | |
| | | def __GetOperationActionServerIpyDataList(ipyDataMgr, serverID, actName):
|
| | | ## 获取运营活动本服务器对应的配置数据列表
|
| | |
|
| | | if not hasattr(ipyDataMgr, "Get%sCount" % actName):
|
| | | GameWorld.ErrLog("没有该运营活动类型对应活动时间表! actName=%s" % actName)
|
| | | return []
|
| | | |
| | | # 所有配置先按活动标识归组
|
| | | platform = GameWorld.GetPlatform()
|
| | | actGroupDict = {} # {ActMark:{ServerIDTuple:[ipyData, ...], ...}, ...}
|
| | |
| | |
|
| | | dbOperationActIDKey = PlayerDBGSEvent.Def_OperationActID % actName
|
| | | curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID)
|
| | | if state >= 1 and curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
|
| | | dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | if curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(dbOperationActIDKey, curActID)
|
| | | if actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | #记录开启时世界等级
|
| | |
| | | elif actName == ShareDefine.OperationActionName_FairyCeremony:
|
| | | #重置仙界盛典
|
| | | PlayerFairyCeremony.ResetFairyCeremony()
|
| | | |
| | | |
| | | elif actName == ShareDefine.OperationActionName_NewFairyCeremony:
|
| | | #重置仙界盛典
|
| | | PlayerNewFairyCeremony.ResetNewFairyCeremony()
|
| | | elif actName == ShareDefine.OperationActionName_FeastRedPacket:
|
| | | #重置节日红包
|
| | | if ipyData:
|
| | | PlayerFamilyRedPacket.OnResetFeastRedPacket(ipyData, dayIndex)
|
| | | elif actName == ShareDefine.OperationActionName_FlashSale:
|
| | | #限时抢购重置购买次数 本次活动每场不能重复
|
| | | #dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | PlayerStore.ResetFlashSaleBuyCnt(ipyData)
|
| | |
|
| | | if state >= 1 and actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | if actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
|
| | | sendMapServerMsgDict[ShareDefine.ActKey_WorldLV] = actWorldLV
|
| | |
|
| | |
| | | PlayerFairyCeremony.Sync_OperationAction_FairyCeremony(ipyData)
|
| | | if preState != state and state == 0:
|
| | | PlayerFairyCeremony.OnFairyCeremonyEnd()
|
| | | elif actName == ShareDefine.OperationActionName_NewFairyCeremony:
|
| | | if isReload and ipyData:
|
| | | PlayerNewFairyCeremony.Sync_OperationAction_NewFairyCeremony(ipyData)
|
| | | if preState != state and state == 0:
|
| | | PlayerNewFairyCeremony.OnNewFairyCeremonyEnd()
|
| | | |
| | | elif actName == ShareDefine.OperationActionName_RealmPoint:
|
| | | if isReload and ipyData:
|
| | | Sync_OperationAction_RealmPoint(ipyData)
|
| | | elif actName == ShareDefine.OperationActionName_FlashSale:
|
| | | if ipyData and preState != state:
|
| | | dayIndex = sendMapServerMsgDict.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | PlayerStore.ResetFlashSaleBuyCnt(ipyData, dayIndex, state)
|
| | | elif actName == ShareDefine.OperationActionName_FeastRedPacket:
|
| | | if isReload and ipyData:
|
| | | PlayerFamilyRedPacket.Sync_FeastRedPacket(ipyData)
|
| | |
|
| | | #通知Mapserver,设置字典
|
| | | #GameWorld.SendMapServerMsgEx(dictName, state) # 运营活动不单独通知活动状态,需与活动信息整合后一起通知
|