| | |
| | | import CrossActCTGBillboard
|
| | | import CrossRealmMsg
|
| | | import PyGameData
|
| | | import PlayerFB
|
| | | import ChConfig
|
| | | import CommFunc
|
| | |
|
| | | import datetime
|
| | | import time
|
| | |
| | |
|
| | | # ipyData 活动时间表信息由跨服服务器同步子服,活动内容取子服自己的
|
| | | ipyDataDict = {}
|
| | | for k, v in ipyData.__dict__.items():
|
| | | if k in ["NotifyInfoStart", "NotifyInfoEnd", "NotifyInfoLoop", "ServerIDRangeList"]:
|
| | | methods = CommFunc.get_class_method(ipyData, "Get") # 获取所有Get开头的方法
|
| | | for method_name in methods:
|
| | | if method_name in ["GetNotifyInfoStart", "GetNotifyInfoEnd", "GetNotifyInfoLoop", "GetServerIDRangeList"]:
|
| | | continue
|
| | | ipyDataDict[k] = v
|
| | | ipyDataDict[method_name[3:]] = getattr(ipyData, method_name)()
|
| | | ipyDataDict.update({"StartDate":startDateStr, "EndDate":endDateStr})
|
| | | GameWorld.Log(" ipyDataDict=%s" % ipyDataDict)
|
| | |
|
| | |
| | | GameWorld.Log(" isDayReset=%s,actIDDateTime=%s,actID=%s" % (isDayReset, actIDDateTime, actID))
|
| | |
|
| | | # 模板ID
|
| | | if hasattr(ipyData, "TemplateIDList"):
|
| | | if hasattr(ipyData, "GetTemplateIDList"):
|
| | | templateIDList = ipyData.GetTemplateIDList()
|
| | | templateID = templateIDList[-1] if dayIndex >= len(templateIDList) else templateIDList[dayIndex]
|
| | |
|
| | |
| | | continue
|
| | |
|
| | | if state:
|
| | | if dailyActionID in ChConfig.Def_CrossDailyMap:
|
| | | # 开启对应日常地图分区线路
|
| | | __openCrossDailyMap(ChConfig.Def_CrossDailyMap[dailyActionID])
|
| | | |
| | | if dailyActionID == ShareDefine.CrossDailyActionID_YaomoBoss:
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_ActionBossRebornSign % dailyActionID, int(time.time()))
|
| | |
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def __openCrossDailyMap(mapID):
|
| | | if mapID not in ChConfig.Def_CrossZoneMapTableName:
|
| | | return
|
| | | zoneTypeName = ChConfig.Def_CrossZoneMapTableName[mapID]
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | if zoneTypeName and hasattr(ipyDataMgr, "Get%sCount" % zoneTypeName):
|
| | | realMapInfo = {}
|
| | | for index in range(getattr(ipyDataMgr, "Get%sCount" % zoneTypeName)()):
|
| | | ipyData = getattr(ipyDataMgr, "Get%sByIndex" % zoneTypeName)(index)
|
| | | zoneID = ipyData.GetZoneID()
|
| | | realMapID = ipyData.GetMapID()
|
| | | copyMapID = ipyData.GetCopyMapID()
|
| | | if realMapID not in realMapInfo:
|
| | | realMapInfo[realMapID] = []
|
| | | copyPropertyList = realMapInfo[realMapID]
|
| | | copyPropertyList.append([copyMapID, zoneID])
|
| | | for realMapID, copyPropertyList in realMapInfo.items():
|
| | | PlayerFB.SendMapOpenFBEx(realMapID, copyPropertyList)
|
| | | return
|
| | |
|
| | | def SendMapServerCrossDailyActionState():
|
| | | # 地图启动成功时通知本日进行中的日常活动状态
|
| | |
|