This commit is contained in:
aozhiwei 2024-04-16 20:07:05 +08:00
parent bb8bfe2340
commit cfa327c1e9
2 changed files with 16 additions and 4 deletions

View File

@ -35,9 +35,13 @@ func (this *userProfile) fillMFUser(pbUser *cs.MFUser) {
}
pbUser.Rank = proto.Int32(this.rank)
{
pbUser.Battling = proto.Int32(0)
hum := GetPlayerMgr().GetPlayerByAccountId(this.accountId)
if hum != nil {
pbUser.OnlineStatus = proto.Int32(1)
if hum.IsBattling() {
pbUser.Battling = proto.Int32(1)
}
} else {
pbUser.OnlineStatus = proto.Int32(0)
}
@ -51,10 +55,17 @@ func (this *userProfile) fillMFGuildMember(pbMember *cs.MFGuildMember) {
pbMember.Avatar = proto.Int32(q5.ToInt32(this.avatarUrl))
pbMember.AvatarHead = proto.Int32(q5.ToInt32(this.head))
pbMember.Rank = proto.Int32(this.rank)
if GetPlayerMgr().GetPlayerByAccountId(this.accountId) != nil {
pbMember.OnlineStatus = proto.Int32(1)
} else {
pbMember.OnlineStatus = proto.Int32(0)
{
pbMember.Battling = proto.Int32(0)
hum := GetPlayerMgr().GetPlayerByAccountId(this.accountId)
if hum != nil {
pbMember.OnlineStatus = proto.Int32(1)
if hum.IsBattling() {
pbMember.Battling = proto.Int32(1)
}
} else {
pbMember.OnlineStatus = proto.Int32(0)
}
}
pbMember.LastLoginTime = proto.Int32(this.lastLoginTime)
pbMember.Level = proto.Int32(GetGuildMgr().GetGuildJob(this.accountId))

View File

@ -149,6 +149,7 @@ message MFGuildMember
optional int32 last_login_time = 9;
optional int32 level = 10;
optional int32 star = 11;
optional int32 battling = 12;
}
message MFUser {