代码优化
This commit is contained in:
parent
5dde9f9f9f
commit
b8662c3afd
@ -598,13 +598,12 @@ func GetCardInfoMsg(CardInfo *card.CardInfo) *proto.ResFriendCard {
|
||||
}
|
||||
|
||||
ps := G_GameLogicPtr.GetSimplePlayerByUid(Uid)
|
||||
name := "未知玩家"
|
||||
if ps != nil {
|
||||
name = ps.Name
|
||||
if ps == nil {
|
||||
return &proto.ResFriendCard{}
|
||||
}
|
||||
return &proto.ResFriendCard{
|
||||
Uid: int64(Uid),
|
||||
Name: name,
|
||||
Name: ps.Name,
|
||||
Face: int32(ps.Face),
|
||||
Avatar: int32(ps.Avatar),
|
||||
Level: int32(ps.Level),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user