1
This commit is contained in:
parent
33e3b9aec4
commit
051a3a62ca
@ -8,6 +8,12 @@ import (
|
|||||||
. "main/global"
|
. "main/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type hero struct {
|
||||||
|
heroUniId string
|
||||||
|
heroId int32
|
||||||
|
quality int32
|
||||||
|
}
|
||||||
|
|
||||||
type player struct {
|
type player struct {
|
||||||
cs.MsgHandlerImpl
|
cs.MsgHandlerImpl
|
||||||
socket f5.WspCliConn
|
socket f5.WspCliConn
|
||||||
@ -25,6 +31,7 @@ type player struct {
|
|||||||
state int32
|
state int32
|
||||||
isReady int32
|
isReady int32
|
||||||
permission int32
|
permission int32
|
||||||
|
hero *hero
|
||||||
team common.Team
|
team common.Team
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +146,11 @@ func (this *player) FillMFTeamMember(member_pb *cs.MFTeamMember) {
|
|||||||
member_pb.Name = proto.String(this.name)
|
member_pb.Name = proto.String(this.name)
|
||||||
member_pb.IsLeader = proto.Int32(this.isLeader)
|
member_pb.IsLeader = proto.Int32(this.isLeader)
|
||||||
member_pb.SpecSkill = proto.Int32(this.specSkill)
|
member_pb.SpecSkill = proto.Int32(this.specSkill)
|
||||||
//hero
|
{
|
||||||
|
member_pb.Hero = &cs.MFHero{}
|
||||||
|
member_pb.Hero.HeroId = proto.Int32(this.hero.heroId)
|
||||||
|
member_pb.Hero.Quality = proto.Int32(this.hero.quality)
|
||||||
|
}
|
||||||
member_pb.State = proto.Int32(this.state)
|
member_pb.State = proto.Int32(this.state)
|
||||||
if this.IsOnline() {
|
if this.IsOnline() {
|
||||||
member_pb.Online = proto.Int32(1)
|
member_pb.Online = proto.Int32(1)
|
||||||
|
@ -71,6 +71,7 @@ func (this *team) OnPlayerOnline(hum common.Player) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *team) Join(hum common.Player) bool {
|
func (this *team) Join(hum common.Player) bool {
|
||||||
|
hum.SetTeam(this)
|
||||||
this.accountIdHash[hum.GetAccountId()] = hum
|
this.accountIdHash[hum.GetAccountId()] = hum
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user