增加请求玩家资产接口

This commit is contained in:
hahwu 2025-01-13 16:20:57 +08:00
parent 30c1b4414b
commit c480c4d66a
3 changed files with 3224 additions and 3180 deletions

View File

@ -613,7 +613,7 @@ func (ad *GameLogic) RegisterNetWorkFunc() {
RegisterMsgProcessFunc("ReqRemoveAd", ReqRemoveAdFunc) RegisterMsgProcessFunc("ReqRemoveAd", ReqRemoveAdFunc)
RegisterMsgProcessFunc("ReqPlayerBriefProfileData", ReqPlayerBriefProfileDataFunc) RegisterMsgProcessFunc("ReqPlayerBriefProfileData", ReqPlayerBriefProfileDataFunc)
RegisterMsgProcessFunc("ReqOfflineReconnect", ReqOfflineReconnectFunc) RegisterMsgProcessFunc("ReqOfflineReconnect", ReqOfflineReconnectFunc)
RegisterMsgProcessFunc("ReqPlayerAsset", ReqPlayerAsset)
// 玩家 // 玩家
RegisterMsgProcessFunc("ReqUserInfo", ReqUserInfo) RegisterMsgProcessFunc("ReqUserInfo", ReqUserInfo)
RegisterMsgProcessFunc("ReqSetName", ReqSetName) // 设置名字 RegisterMsgProcessFunc("ReqSetName", ReqSetName) // 设置名字

View File

@ -31,6 +31,12 @@ import (
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )
func ReqPlayerAsset(args []interface{}) error {
_, player, _ := ParseArgs(args)
player.PushClientRes(player.PlayerBaseMod.BackAsset())
return nil
}
// 请求玩家基础信息 // 请求玩家基础信息
func ReqPlayerBaseInfofunction(args []interface{}) error { func ReqPlayerBaseInfofunction(args []interface{}) error {
// 消息的发送者 // 消息的发送者

File diff suppressed because it is too large Load Diff