| | |
| | | import IPY_PlayerDefine
|
| | | import CrossBattlefield
|
| | | import CrossRealmPlayer
|
| | | import DataRecordPack
|
| | | import CrossRealmMsg
|
| | | import ShareDefine
|
| | | import CrossBoss
|
| | |
| | | if openState == IPY_PlayerDefine.fbosOpen:
|
| | | funcLineID = tagCopyMapObj.funcLineID
|
| | | playerIDList = [playerID]
|
| | | retInfo = [playerIDList, mapID, realMapID, copyMapID, funcLineID]
|
| | | # 分流地图的地图数据ID直接使用场景ID,因为分流地图实际上是两张不同的地图,所以直接使用场景ID,不然会导致上传跨服玩家数据时坐标为0
|
| | | retInfo = [playerIDList, mapID, realMapID, realMapID, copyMapID, funcLineID]
|
| | | CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_EnterFBRet, retInfo, [serverGroupID])
|
| | |
|
| | | dataDict = {}
|
| | | dataDict.update(msgData)
|
| | | dataDict.update({"mapID":mapID, "realMapID":realMapID, "copyMapID":copyMapID, "realFuncLineID":funcLineID, "openState":openState})
|
| | | DataRecordPack.SendEventPack("CrossFBRequest", dataDict)
|
| | | return tagCopyMapObj
|
| | |
|
| | | def CrossServerMsg_EnterFBRet(msgData, tick):
|
| | | ## 收到跨服服务器动态分配的跨服副本进入信息
|
| | | |
| | | playerIDList, dataMapID, mapID, copyMapID, funcLineID = msgData
|
| | | playerIDList, dataMapID, mapID, realMapID, copyMapID, funcLineID = msgData
|
| | |
|
| | | for playerID in playerIDList:
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
|
| | | if not curPlayer:
|
| | | continue
|
| | | CrossRealmPlayer.SendCrossRealmReg(curPlayer, dataMapID, mapID, dataMapID, copyMapID, lineID=funcLineID)
|
| | | CrossRealmPlayer.SendCrossRealmReg(curPlayer, dataMapID, realMapID, mapID, copyMapID, lineID=funcLineID)
|
| | |
|
| | | return
|
| | |
|
| | |
| | | return 0
|
| | |
|
| | | def OnCrossDynamicLineStateChange(msgList):
|
| | | realMapID, copyMapID, state = msgList[:3]
|
| | | mapID, realMapID, copyMapID, state = msgList[:4]
|
| | |
|
| | | if state == IPY_PlayerDefine.fbosWaitForClose:
|
| | | funcLineDataCache = msgList[3]
|
| | |
| | | elif state == IPY_PlayerDefine.fbosClosed:
|
| | | OnCrossDynamicLineClose(realMapID, copyMapID)
|
| | | elif state == IPY_PlayerDefine.fbosOpen:
|
| | | OnCrossDynamicLineOpen(realMapID, copyMapID)
|
| | | OnCrossDynamicLineOpen(mapID, realMapID, copyMapID)
|
| | |
|
| | | return
|
| | |
|
| | | def OnCrossDynamicLineOpen(realMapID, copyMapID):
|
| | | def OnCrossDynamicLineOpen(mapID, realMapID, copyMapID):
|
| | | ## 动态分配线路的地图虚拟线路启动成功
|
| | |
|
| | | key = (realMapID, copyMapID)
|
| | |
| | | playerIDList = serverPlayerIDListDict[serverGroupID]
|
| | | playerIDList.append(playerID)
|
| | |
|
| | | mapID = GetRecordMapID(realMapID)
|
| | | GameWorld.Log("动态分配虚拟线路启动成功,通知子服等待玩家可进入: mapID=%s,realMapID=%s,copyMapID=%s,serverPlayerIDListDict=%s" |
| | | % (mapID, realMapID, copyMapID, serverPlayerIDListDict))
|
| | | recordMapID = GetRecordMapID(realMapID)
|
| | | GameWorld.Log("动态分配虚拟线路启动成功,通知子服等待玩家可进入: recordMapID=%s,mapID=%s,realMapID=%s,copyMapID=%s,serverPlayerIDListDict=%s" |
| | | % (recordMapID, mapID, realMapID, copyMapID, serverPlayerIDListDict))
|
| | | for serverGroupID, playerIDList in serverPlayerIDListDict.items():
|
| | | retInfo = [playerIDList, mapID, realMapID, copyMapID, funcLineID]
|
| | | retInfo = [playerIDList, recordMapID, mapID, realMapID, copyMapID, funcLineID]
|
| | | CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_EnterFBRet, retInfo, [serverGroupID])
|
| | |
|
| | | #GameWorld.DebugLog(" PyGameData.g_crossDynamicLineInfo=%s" % PyGameData.g_crossDynamicLineInfo)
|