This commit is contained in:
aozhiwei 2024-03-13 11:33:45 +08:00
parent 3e75f8b83e
commit b88c1cd02e
2 changed files with 2 additions and 3 deletions

View File

@ -48,7 +48,6 @@ type Team interface {
}
type TeamMgr interface {
ProcessCMMsg(*cs.CsNetMsgHandler, *f5.MsgHdr)
CreateTeam(Player, *cs.CMLogin) Team
GetTeamByUuid(string) Team
OnEnterNewUser(Player)
@ -70,7 +69,6 @@ type Player interface {
type PlayerMgr interface {
ProcessCMMsg(*cs.CsNetMsgHandler, *f5.MsgHdr)
GetPlayerBySocket(f5.WspCliConn) Player
GetPlayerByAccountId(string) Player
}
type WspListener interface {

View File

@ -22,11 +22,12 @@ func (this *teamMgr) Init() {
func (this *teamMgr) UnInit() {
}
func (this *teamMgr) CreateTeam(hum common.Player, msg *cs.CMLogin) {
func (this *teamMgr) CreateTeam(hum common.Player, msg *cs.CMLogin) common.Team {
teamUuid := this.genTeamUuid(hum.GetZoneId(), hum.GetNodeId())
team := newTeam()
team.init(teamUuid, hum)
this.teamUuidHash[team.teamUuid] = team
return team
}
func (this *teamMgr) genTeamUuid(zoneId int32, nodeId int32) string {