This commit is contained in:
aozhiwei 2024-03-11 20:10:08 +08:00
parent 827fcb3f9f
commit 68b0188257
4 changed files with 16 additions and 3 deletions

View File

@ -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
}

View File

@ -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")

View File

@ -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
}

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit a12d6d4b9e133a9f3b4e3e7cd83d035b4064fccd
Subproject commit 803c5d7912b4a0ca902643985a906b18784c8ab9