This commit is contained in:
aozhiwei 2024-04-20 16:05:50 +08:00
parent 4fbd3f2959
commit b411e9d46a

View File

@ -82,6 +82,7 @@ func (this *playerMgr) UnInit() {
func (this *playerMgr) queryStatusHandle(c *gin.Context) {
accountIds := strings.Split(c.DefaultQuery("accountIds", ""), ",")
rspObj := new(common.UserQueryStatusRsp)
rspObj.Users = make([]*common.UserStatus, 0, 1)
chDone := make(chan bool)
f5.GetApp().RegisterMainThreadCb(
func () {
@ -93,9 +94,9 @@ func (this *playerMgr) queryStatusHandle(c *gin.Context) {
u.Battling = q5.BoolToInt32(hum.IsBattling())
u.Online = q5.BoolToInt32(hum.IsOnline())
q5.AppendSlice(&rspObj.Users, u)
chDone <- true
}
}
chDone <- true
})
for {
select {