| | |
| | |
|
| | | return
|
| | |
|
| | | #// B9 11 请求加入队伍 #tagCGRequestJoinTeam
|
| | | #
|
| | | #struct tagCGRequestJoinTeam
|
| | | #{
|
| | | # tagHead Head;
|
| | | # DWORD TeamID; // 目标队伍ID
|
| | | #};
|
| | | def OnRequestJoinTeam(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | teamID = clientData.TeamID
|
| | | tagPlayerTeam = GameWorld.GetTeamManager().FindTeam(teamID)
|
| | | if tagPlayerTeam == None:
|
| | | # TeamNoExist 队伍不存在
|
| | | PlayerControl.NotifyCode(curPlayer, "TeamNoExist")
|
| | | return
|
| | | RequestJoinTeamReq(curPlayer, tagPlayerTeam, tick)
|
| | | return
|
| | |
|
| | | #//09 09 请求加入队伍#tagCRequestJoinTeam
|
| | | #
|
| | | #struct tagCRequestJoinTeam
|
| | |
| | |
|
| | | if tagPlayerTeam == None:
|
| | | # TeamNoExist 队伍不存在
|
| | | PlayerControl.NotifyCode(curPlayer, "TeamNoExist")
|
| | | #PlayerControl.NotifyCode(curPlayer, "TeamNoExist")
|
| | | #目标玩家没有队伍, 邀请玩家加入, 支持无队伍双方无队伍邀请
|
| | | #InvitePlayerJoinTeamReq(curPlayer, tagPlayer, curPlayerTeam, tick)
|
| | | |
| | | #支持双方无队伍请求加入,直接发送给被请求方确认
|
| | | #通知客户端弹窗口(目标弹框)
|
| | | requestPack = ChPyNetSendPack.tagGCRequestJoinTeam()
|
| | | requestPack.PlayerID = playerID
|
| | | requestPack.Name = curPlayer.GetName()
|
| | | requestPack.NameLen = len(requestPack.Name)
|
| | | requestPack.LV = curPlayer.GetLV()
|
| | | requestPack.Job = curPlayer.GetJob()
|
| | | requestPack.RealmLV = curPlayer.GetOfficialRank()
|
| | | NetPackCommon.SendFakePack(tagPlayer, requestPack)
|
| | | |
| | | #TeamAskSuccess: 已成功发送入队申请
|
| | | PlayerControl.NotifyCode(curPlayer, "TeamAskSuccess")
|
| | | else:
|
| | | # 请求加入队伍(#被请求的玩家有队,请求加入其队伍)
|
| | | RequestJoinTeamReq(curPlayer, tagPlayerTeam, tick)
|
| | |
| | | #被邀请的玩家队伍
|
| | | curPlayerTeam = curPlayer.GetTeam()
|
| | | if curPlayerTeam == None:
|
| | | GameWorld.DebugLog("玩家无队伍,无法审核加入队伍请求!" , playerID)
|
| | | PlayerControl.NotifyCode(tagPlayer, "TeamNoExist")
|
| | | return
|
| | | pass
|
| | | #屏蔽,修改为支持无队伍被请求加入
|
| | | #GameWorld.DebugLog("玩家无队伍,无法审核加入队伍请求!" , playerID)
|
| | | #PlayerControl.NotifyCode(tagPlayer, "TeamNoExist")
|
| | | #return
|
| | |
|
| | | #申请入队的允许双方都有队伍
|
| | | # #发出申请的玩家的队伍
|