From 68b01882576aa2e4d5590abff4cc73ff8808de8a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 11 Mar 2024 20:10:08 +0800 Subject: [PATCH] 1 --- server/matchserver/common/types.go | 2 +- server/matchserver/player/playermgr.go | 2 +- server/matchserver/team/teammgr.go | 13 +++++++++++++ third_party/f5 | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/server/matchserver/common/types.go b/server/matchserver/common/types.go index ecc2e82c..9c3606ea 100644 --- a/server/matchserver/common/types.go +++ b/server/matchserver/common/types.go @@ -21,7 +21,7 @@ type Team interface { type TeamMgr interface { ProcessCMMsg(*cs.CsNetMsgHandler, *f5.MsgHdr) - CreateTeam(Player) Team + CreateTeam(Player, *cs.CMLogin) Team GetTeamByUuid(string) Team } diff --git a/server/matchserver/player/playermgr.go b/server/matchserver/player/playermgr.go index aea7c29a..17fc70e0 100644 --- a/server/matchserver/player/playermgr.go +++ b/server/matchserver/player/playermgr.go @@ -174,7 +174,7 @@ func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCli hum := new(player) hum.init(pendingReq, rspObj.Info.Name, rspObj.Info.HeadId, rspObj.Info.HeroId, rspObj.Info.HeadFrame) this.socketHash[pendingReq.hdr.GetSocket()] = hum - team := GetTeamMgr().CreateTeam(hum) + team := GetTeamMgr().CreateTeam(hum, msg) if team == nil { rspMsg.Errcode = proto.Int32(102) rspMsg.Errmsg = proto.String("create team error") diff --git a/server/matchserver/team/teammgr.go b/server/matchserver/team/teammgr.go index 14102bfd..6ce568cb 100644 --- a/server/matchserver/team/teammgr.go +++ b/server/matchserver/team/teammgr.go @@ -1,7 +1,10 @@ package team import ( + "q5" + "f5" "cs" + "main/common" ) type teamMgr struct { @@ -15,3 +18,13 @@ func (this *teamMgr) Init() { func (this *teamMgr) UnInit() { } + +func (this *teamMgr) CreateTeam(hum common.Player, msg *cs.CMLogin) { + +} + +func (this *teamMgr) genTeamUuid(zoneId int32, nodeId int32) string { + teamUuid := q5.ToString(zoneId) + "_" + q5.ToString(nodeId) + "_" + + q5.Md5Str(q5.ToString(f5.GetApp().NewUuid())) + return teamUuid +} diff --git a/third_party/f5 b/third_party/f5 index a12d6d4b..803c5d79 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit a12d6d4b9e133a9f3b4e3e7cd83d035b4064fccd +Subproject commit 803c5d7912b4a0ca902643985a906b18784c8ab9