| | |
| | | DR_Team(eventName, teamID, drDict)
|
| | | return
|
| | |
|
| | | def SyncMapServerPlayerNoTeam(curPlayer):
|
| | | ## 同步地图玩家没有队伍,切图时调用
|
| | | teamInfo = ChGameToMapPyPack.tagGMTeamInfo()
|
| | | teamInfo.PlayerID = curPlayer.GetPlayerID()
|
| | | teamInfo.TeamID = 0
|
| | | teamInfo.TeamLV = 0
|
| | | teamInfo.MemInfoList = []
|
| | | teamInfo.MemCnt = len(teamInfo.MemInfoList)
|
| | | NetPackCommon.SendPyPackToMapServer(curPlayer.GetLineNO(), curPlayer.GetRealMapID(), teamInfo)
|
| | | return
|
| | |
|
| | | def SyncMapServerPlayerLeaveTeam(curPlayer, teamID):
|
| | | ## 同步地图玩家离开队伍
|
| | | leavePack = ChGameToMapPyPack.tagGMPlayerLeaveTeam()
|
| | | leavePack.PlayerID = curPlayer.GetPlayerID()
|
| | | leavePack.CopyMapID = curPlayer.GetFBID()
|
| | | leavePack.TeamID = teamID
|
| | | NetPackCommon.SendPyPackToMapServer(curPlayer.GetLineNO(), curPlayer.GetRealMapID(), leavePack)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #// B9 03 修改队伍信息 #tagCGChangeTeamInfo
|
| | |
| | | #GameServer清除玩家队伍ID为空
|
| | | delPlayer.SetTeam(None)
|
| | | #通知MapServerd队伍变更, 在mapserver构建目前队伍
|
| | | delPlayer.MapServer_Sync_Team(0)
|
| | | #delPlayer.MapServer_Sync_Team(0)
|
| | | SyncMapServerPlayerLeaveTeam(delPlayer, curTeam.GetTeamID())
|
| | | #玩家离开副本
|
| | | delPlayer.MapServer_LeaveFB()
|
| | | if IsTeamMatchingPlayer(curTeam.GetTeamID()):
|
| | |
| | | #GameServer玩家队伍为空
|
| | | curPlayer.SetTeam(None)
|
| | | #通知MapServerd队伍变更
|
| | | curPlayer.MapServer_Sync_Team(0)
|
| | | #curPlayer.MapServer_Sync_Team(0)
|
| | | SyncMapServerPlayerLeaveTeam(curPlayer, curTeam.GetTeamID())
|
| | | __DoLogic_PlayerTeamChange(curPlayer)
|
| | |
|
| | | if curMember.GetTeamLV() != IPY_GameServer.tmlLeader:
|
| | |
| | | if curTeam == None:
|
| | | return
|
| | |
|
| | | if curTeam.GetTeamPlayerCount() <= 1:
|
| | | #补救完毕, 队伍中只有一个人, 删除这个队伍
|
| | | GameWorld.Log('玩家(%s)仍然有队伍(%s), 补救完毕, 队伍中只有一个人, 删除这个队伍' % (playerID, curTeamID))
|
| | | DeleteTeam(curTeam, tick)
|
| | | return
|
| | | #允许存在单人队伍,暂屏蔽该逻辑
|
| | | # if curTeam.GetTeamPlayerCount() <= 1:
|
| | | # #补救完毕, 队伍中只有一个人, 删除这个队伍
|
| | | # GameWorld.Log('玩家(%s)仍然有队伍(%s), 补救完毕, 队伍中只有一个人, 删除这个队伍' % (playerID, curTeamID))
|
| | | # DeleteTeam(curTeam, tick)
|
| | | # return
|
| | |
|
| | | GameWorld.Log('玩家(%s)仍然有队伍(%s), 补救' % (playerID, curTeamID))
|
| | | curPlayer.SetTeamID(curTeamID)
|
| | |
| | | curPlayer.SetTeam(None)
|
| | | curPlayer.Sync_LeaveTeam(1)
|
| | | #通知MapServer, 玩家已经队伍了, 刷新玩家的TeamID
|
| | | curPlayer.MapServer_Sync_Team(0)
|
| | | #curPlayer.MapServer_Sync_Team(0)
|
| | | SyncMapServerPlayerLeaveTeam(curPlayer, curTeamID)
|
| | | gameMap = GameWorld.GetMap(curPlayer.GetMapID())
|
| | | if gameMap and gameMap.GetMapFBType() == ChConfig.fbtTeam:
|
| | | curPlayer.MapServer_LeaveFB()
|
| | |
| | | # 玩家进入组队副本,则停止匹配
|
| | | if gameMap.GetMapFBType() == ChConfig.fbtTeam:
|
| | | DelPlayerIDFromMatchingList(curPlayer)
|
| | | |
| | | SyncMapServerPlayerNoTeam(curPlayer) # 没有队伍的时候切图也通知地图
|
| | | |
| | | return
|
| | |
|
| | | def PlayerTeamMemberRefresh(curPlayer, refreshType, value, tick):
|