1
This commit is contained in:
parent
bb8bfe2340
commit
cfa327c1e9
19
server/imserver/cache/user_profile.go
vendored
19
server/imserver/cache/user_profile.go
vendored
@ -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))
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user