This commit is contained in:
aozhiwei 2024-04-16 21:00:29 +08:00
parent 17649fc4c2
commit a4effeb06e
2 changed files with 7 additions and 2 deletions

View File

@ -38,7 +38,9 @@ func (this *userProfile) fillMFUser(pbUser *cs.MFUser) {
pbUser.Battling = proto.Int32(0)
hum := GetPlayerMgr().GetPlayerByAccountId(this.accountId)
if hum != nil {
pbUser.OnlineStatus = proto.Int32(1)
if hum.IsOnline() {
pbUser.OnlineStatus = proto.Int32(1)
}
if hum.IsBattling() {
pbUser.Battling = proto.Int32(1)
}
@ -59,7 +61,9 @@ func (this *userProfile) fillMFGuildMember(pbMember *cs.MFGuildMember) {
pbMember.Battling = proto.Int32(0)
hum := GetPlayerMgr().GetPlayerByAccountId(this.accountId)
if hum != nil {
pbMember.OnlineStatus = proto.Int32(1)
if hum.IsOnline() {
pbMember.OnlineStatus = proto.Int32(1)
}
if hum.IsBattling() {
pbMember.Battling = proto.Int32(1)
}

View File

@ -840,6 +840,7 @@ func (this *player) CMGuildLogs(hdr *f5.MsgHdr, msg *cs.CMGuildLogs) {
func (this *player) onOffline() {
this.socket.Reset()
f5.GetSysLog().Info("onOffline %s", this.GetAccountId())
}
func newPlayer() *player {