1
This commit is contained in:
parent
626fe8c4cd
commit
9199170817
@ -76,7 +76,7 @@ type UserQueryStatusRsp struct {
|
||||
Errmsg string `json:"errmsg"`
|
||||
Users []struct {
|
||||
AccountId string `json:"account_id"`
|
||||
Battling string `json:"battling"`
|
||||
Battling int32 `json:"battling"`
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,6 +159,7 @@ type Player interface {
|
||||
GetSortIdx() int32
|
||||
SetSortIdx(int32)
|
||||
IsBattling() bool
|
||||
SetBattling(bool)
|
||||
GenNextCopy() Player
|
||||
}
|
||||
|
||||
|
@ -546,6 +546,10 @@ func (this *player) IsBattling() bool {
|
||||
return this.battling
|
||||
}
|
||||
|
||||
func (this *player) SetBattling(state bool) {
|
||||
this.battling = state
|
||||
}
|
||||
|
||||
func newPlayer() *player {
|
||||
hum := new(player)
|
||||
return hum
|
||||
|
@ -634,6 +634,14 @@ func (this *team) checkMemberState() {
|
||||
rspObj,
|
||||
func(rsp f5.HttpCliResponse) {
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user