This commit is contained in:
aozhiwei 2024-03-12 15:42:07 +08:00
parent 25eca38433
commit 33e3b9aec4
3 changed files with 6 additions and 4 deletions

View File

@ -34,13 +34,10 @@ type Player interface {
GetSessionId() string
GetZoneId() int32
GetNodeId() int32
GetName() string
GetAvatarUrl() string
GetHeroId() string
GetHeadFrame() string
GetPing() int32
IsOnline() bool
GetTeam() Team
SetTeam(Team)
FillMFTeamMember(*cs.MFTeamMember)
}

View File

@ -130,6 +130,10 @@ func (this *player) GetTeam() common.Team {
return this.team
}
func (this *player) SetTeam(team common.Team) {
this.team = team
}
func (this *player) FillMFTeamMember(member_pb *cs.MFTeamMember) {
member_pb.AccountId = proto.String(this.accountId)
member_pb.Name = proto.String(this.name)

View File

@ -25,6 +25,7 @@ func (this *team) init(teamUuid string, owner common.Player) {
this.zoneId = owner.GetZoneId()
this.nodeId = owner.GetNodeId()
this.owner = owner
owner.SetTeam(this)
this.accountIdHash[owner.GetAccountId()] = owner
}