1
This commit is contained in:
parent
626fe8c4cd
commit
9199170817
@ -76,7 +76,7 @@ type UserQueryStatusRsp struct {
|
|||||||
Errmsg string `json:"errmsg"`
|
Errmsg string `json:"errmsg"`
|
||||||
Users []struct {
|
Users []struct {
|
||||||
AccountId string `json:"account_id"`
|
AccountId string `json:"account_id"`
|
||||||
Battling string `json:"battling"`
|
Battling int32 `json:"battling"`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,6 +159,7 @@ type Player interface {
|
|||||||
GetSortIdx() int32
|
GetSortIdx() int32
|
||||||
SetSortIdx(int32)
|
SetSortIdx(int32)
|
||||||
IsBattling() bool
|
IsBattling() bool
|
||||||
|
SetBattling(bool)
|
||||||
GenNextCopy() Player
|
GenNextCopy() Player
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,6 +546,10 @@ func (this *player) IsBattling() bool {
|
|||||||
return this.battling
|
return this.battling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *player) SetBattling(state bool) {
|
||||||
|
this.battling = state
|
||||||
|
}
|
||||||
|
|
||||||
func newPlayer() *player {
|
func newPlayer() *player {
|
||||||
hum := new(player)
|
hum := new(player)
|
||||||
return hum
|
return hum
|
||||||
|
@ -634,6 +634,14 @@ func (this *team) checkMemberState() {
|
|||||||
rspObj,
|
rspObj,
|
||||||
func(rsp f5.HttpCliResponse) {
|
func(rsp f5.HttpCliResponse) {
|
||||||
sending = false
|
sending = false
|
||||||
|
if rsp.GetErr() == nil && rsp.JsonParseOk() {
|
||||||
|
for _, u := range rspObj.Users {
|
||||||
|
m := this.GetMemberByAccountId(u.AccountId)
|
||||||
|
if m != nil {
|
||||||
|
m.SetBattling(u.Battling != 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user