代码优化

This commit is contained in:
hahwu 2025-12-16 15:23:25 +08:00
parent 3466a7f0fb
commit 5dde9f9f9f

View File

@ -598,9 +598,13 @@ func GetCardInfoMsg(CardInfo *card.CardInfo) *proto.ResFriendCard {
}
ps := G_GameLogicPtr.GetSimplePlayerByUid(Uid)
name := "未知玩家"
if ps != nil {
name = ps.Name
}
return &proto.ResFriendCard{
Uid: int64(Uid),
Name: ps.Name,
Name: name,
Face: int32(ps.Face),
Avatar: int32(ps.Avatar),
Level: int32(ps.Level),