This commit is contained in:
aozhiwei 2024-04-20 15:26:22 +08:00
parent 626fe8c4cd
commit 9199170817
3 changed files with 14 additions and 1 deletions

View File

@ -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
}

View File

@ -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

View File

@ -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 {