1
This commit is contained in:
parent
789068d346
commit
27873bacc5
@ -98,6 +98,8 @@ type Player interface {
|
|||||||
IsReady() bool
|
IsReady() bool
|
||||||
GetSpecSkill() int32
|
GetSpecSkill() int32
|
||||||
GetHeroUniid() string
|
GetHeroUniid() string
|
||||||
|
GetPermission() int32
|
||||||
|
SetPermission(int32)
|
||||||
FillMFTeamMember(*cs.MFTeamMember)
|
FillMFTeamMember(*cs.MFTeamMember)
|
||||||
GetSortIdx() int32
|
GetSortIdx() int32
|
||||||
SetSortIdx(int32)
|
SetSortIdx(int32)
|
||||||
|
@ -137,6 +137,14 @@ func (this *player) GetHeroUniid() string {
|
|||||||
return this.hero.heroUniId
|
return this.hero.heroUniId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *player) GetPermission() int32 {
|
||||||
|
return this.permission
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *player) SetPermission(permission int32) {
|
||||||
|
this.permission = permission
|
||||||
|
}
|
||||||
|
|
||||||
func (this *player) GetTeam() common.Team {
|
func (this *player) GetTeam() common.Team {
|
||||||
return this.team
|
return this.team
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ func (this *team) init(teamUuid string, owner common.Player, msg *cs.CMLogin) {
|
|||||||
this.nodeId = owner.GetNodeId()
|
this.nodeId = owner.GetNodeId()
|
||||||
this.mapId = msg.GetCreateTeamParam().GetMapId()
|
this.mapId = msg.GetCreateTeamParam().GetMapId()
|
||||||
this.owner = owner
|
this.owner = owner
|
||||||
|
this.owner.SetPermission(1)
|
||||||
this.stateNotifyMsg.JoinMsg.TeamUuid = proto.String(this.teamUuid)
|
this.stateNotifyMsg.JoinMsg.TeamUuid = proto.String(this.teamUuid)
|
||||||
owner.SetTeam(this)
|
owner.SetTeam(this)
|
||||||
owner.SetSortIdx(this.sortIdx)
|
owner.SetSortIdx(this.sortIdx)
|
||||||
@ -151,6 +152,7 @@ func (this *team) chooseNextLeader() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.owner = nextLeader
|
this.owner = nextLeader
|
||||||
|
this.owner.SetPermission(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *team) Leave(hum common.Player) {
|
func (this *team) Leave(hum common.Player) {
|
||||||
@ -201,6 +203,7 @@ func (this *team) HandoverLeader(hum common.Player, targetId string) {
|
|||||||
target := this.GetMemberByAccountId(targetId)
|
target := this.GetMemberByAccountId(targetId)
|
||||||
if target != nil && target != hum {
|
if target != nil && target != hum {
|
||||||
this.owner = target
|
this.owner = target
|
||||||
|
this.owner.SetPermission(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user