| | |
| | |
|
| | | #邀请组队的时候,双方都有队伍不处理
|
| | | if curPlayerTeam != None and tagPlayerTeam != None:
|
| | | #InviteEnterLost02 <n color="255,255,0">`o很抱歉,目标玩家已在他人队伍中,邀请入队失败!</n> 25 - -
|
| | | #PlayerControl.NotifyCode(curPlayer, "InviteEnterLost02")
|
| | | InvitePlayerJoinTeamReq(curPlayer, tagPlayer, curPlayerTeam, tick)
|
| | | #该玩家已在他人队伍中,邀请入队失败!
|
| | | PlayerControl.NotifyCode(curPlayer, "InviteEnterLost02")
|
| | | #InvitePlayerJoinTeamReq(curPlayer, tagPlayer, curPlayerTeam, tick)
|
| | | return
|
| | |
|
| | | if tagPlayerTeam == None:
|
| | |
| | | return
|
| | |
|
| | | #获得双方的队伍
|
| | | #curPlayerTeam = curPlayer.GetTeam()
|
| | | curPlayerTeam = curPlayer.GetTeam()
|
| | | tagPlayerTeam = tagPlayer.GetTeam()
|
| | |
|
| | | #请求加入的时候,双方都有队伍也可请求加入,支持退出队伍请求加入
|
| | | # if curPlayerTeam != None and tagPlayerTeam != None:
|
| | | # #InviteEnterLost02 <n color="255,255,0">`o很抱歉,目标玩家已在他人队伍中,邀请入队失败!</n> 25 - -
|
| | | # PlayerControl.NotifyCode(curPlayer, "InviteEnterLost02")
|
| | | # return
|
| | | if curPlayerTeam != None and tagPlayerTeam != None:
|
| | | #您已有队伍,请先退出再申请
|
| | | PlayerControl.NotifyCode(curPlayer, "Friend_HaveTeam")
|
| | | return
|
| | |
|
| | | if tagPlayerTeam == None:
|
| | | # TeamNoExist 队伍不存在
|
| | |
| | | return
|
| | |
|
| | | #双方的队伍
|
| | | #curPlayerTeam = curPlayer.GetTeam() |
| | | curPlayerTeam = curPlayer.GetTeam() |
| | | tagPlayerTeam = tagPlayer.GetTeam()
|
| | |
|
| | | if tagPlayerTeam == None:
|
| | |
| | | PlayerControl.NotifyCode(curPlayer, "TeamNoExist")
|
| | | return
|
| | |
|
| | | #===============================================================================================
|
| | | # if curPlayerTeam != None:
|
| | | # #InviteEnterLost02 组队失败,双方都有队伍!
|
| | | # PlayerControl.NotifyCode(curPlayer, "InviteEnterLost02")
|
| | | # return
|
| | | #===============================================================================================
|
| | | if curPlayerTeam != None:
|
| | | #您已有队伍,请先退出再申请
|
| | | PlayerControl.NotifyCode(curPlayer, "Friend_HaveTeam")
|
| | | return
|
| | |
|
| | | #组队类型
|
| | | #teamType = sendPack.GetTeamType()
|
| | |
| | | #return
|
| | |
|
| | | #申请入队的允许双方都有队伍
|
| | | # #发出申请的玩家的队伍
|
| | | # tagPlayerTeam = tagPlayer.GetTeam()
|
| | | # if tagPlayerTeam != None:
|
| | | # #InviteEnterLost02 组队失败,双方都有队伍!
|
| | | # PlayerControl.NotifyCode(tagPlayer, "InviteEnterLost02")
|
| | | # return
|
| | | #发出申请的玩家的队伍
|
| | | tagPlayerTeam = tagPlayer.GetTeam()
|
| | | if tagPlayerTeam != None:
|
| | | #该玩家已有队伍,同意时才提示对方有队伍
|
| | | if isAgree == 1:
|
| | | PlayerControl.NotifyCode(curPlayer, "AcceptTeamLost")
|
| | | return
|
| | |
|
| | | #===============================================================================================
|
| | | # #请求检查,是否有这个请求
|
| | |
| | | return (teamLV == IPY_GameServer.tmlMemberCanCall or
|
| | | teamLV == IPY_GameServer.tmlLeader)
|
| | |
|
| | | def CheckTeamOnLineCount(curTeam):
|
| | | def CheckTeamOnLineCount(curTeam, includeTJG=True):
|
| | | ##获得队伍剩余在线人数
|
| | | |
| | | if not curTeam:
|
| | | return 0
|
| | | count = 0
|
| | | for i in xrange(curTeam.GetMemberCount()):
|
| | | curPlayer = curTeam.GetMemberPlayer(i)
|
| | | if curPlayer == None:
|
| | | continue
|
| | | if not includeTJG and PlayerControl.GetIsTJG(curPlayer):
|
| | | continue
|
| | | count += 1
|
| | | return count
|
| | |
| | | return
|
| | |
|
| | | def DR_Team(eventName, teamID, dataDict):
|
| | | drDict = {"EventName":eventName, "TeamID":teamID}
|
| | | drDict.update(dataDict)
|
| | | DataRecordPack.SendEventPack("Team_GameServer", drDict)
|
| | | #drDict = {"EventName":eventName, "TeamID":teamID}
|
| | | #drDict.update(dataDict)
|
| | | #DataRecordPack.SendEventPack("Team_GameServer", drDict)
|
| | | return
|
| | |
|