接口优化

This commit is contained in:
hahwu 2025-04-01 16:24:16 +08:00
parent 38212f284b
commit 6a92d119db

View File

@ -52,6 +52,13 @@ func ReqPlayerBriefProfileDataFunc(player *Player, buf []byte) error {
proto.Unmarshal(buf, detail)
Uid := int(detail.DwUin)
PlayerSimpleData := G_GameLogicPtr.GetSimplePlayerByUid(Uid)
if PlayerSimpleData == nil {
log.Debug("玩家不存在, Uid:%d", Uid)
player.SendErrClienRes(&msg.ResPlayerBriefProfileData{
DwUin: detail.DwUin,
})
return errors.New("玩家不存在")
}
player.PushClientRes(&msg.ResPlayerBriefProfileData{
DwUin: detail.DwUin,
ImageFrame: int32(PlayerSimpleData.Avatar),