From 8f8525e43428245729d15e91fa7a553da447b99e Mon Sep 17 00:00:00 2001 From: UnKownOwO <80520429@qq.com> Date: Thu, 9 Feb 2023 21:17:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A6=E5=99=A8=E4=B8=8A=E9=94=81=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gdconf/game_data_config.go | 22 ++-- gdconf/item_data.go | 2 +- gs/game/player_avatar.go | 122 +----------------- gs/game/player_equip.go | 179 +++++++++++++++++++++++++++ gs/game/player_weapon.go | 29 +++++ gs/game/route_manager.go | 1 + protocol/cmd/cmd_id_proto_obj_map.go | 2 + 7 files changed, 224 insertions(+), 133 deletions(-) create mode 100644 gs/game/player_equip.go diff --git a/gdconf/game_data_config.go b/gdconf/game_data_config.go index 3d3b8331..5322bfb3 100644 --- a/gdconf/game_data_config.go +++ b/gdconf/game_data_config.go @@ -114,17 +114,17 @@ func (g *GameDataConfig) load() { g.loadSceneData() // 场景 g.loadScenePoint() // 场景传送点 g.loadSceneTagData() // 场景地图图标 - g.loadScene() // 场景详情 - g.loadWorldAreaData() // 世界区域 - g.loadGatherData() // 采集物 - g.loadFetterData() // 角色资料解锁 - g.loadItemData() // 统一道具 - g.loadAvatarLevelData() // 角色等级 - g.loadAvatarPromoteData() // 角色突破 - g.loadPlayerLevelData() // 玩家等级 - g.loadWeaponLevelData() // 武器等级 - g.loadWeaponPromoteData() // 武器突破 - g.loadRewardData() // 奖励 + // g.loadScene() // 场景详情 + g.loadWorldAreaData() // 世界区域 + g.loadGatherData() // 采集物 + g.loadFetterData() // 角色资料解锁 + g.loadItemData() // 统一道具 + g.loadAvatarLevelData() // 角色等级 + g.loadAvatarPromoteData() // 角色突破 + g.loadPlayerLevelData() // 玩家等级 + g.loadWeaponLevelData() // 武器等级 + g.loadWeaponPromoteData() // 武器突破 + g.loadRewardData() // 奖励 } func (g *GameDataConfig) readCsvFileData(fileName string) []byte { diff --git a/gdconf/item_data.go b/gdconf/item_data.go index 91ca1fb5..1d60d7b9 100644 --- a/gdconf/item_data.go +++ b/gdconf/item_data.go @@ -2,10 +2,10 @@ package gdconf import ( "fmt" + "hk4e/common/constant" "strconv" "strings" - "hk4e/common/constant" "hk4e/pkg/logger" "github.com/jszwec/csvutil" diff --git a/gs/game/player_avatar.go b/gs/game/player_avatar.go index c45d21ce..344c4a23 100644 --- a/gs/game/player_avatar.go +++ b/gs/game/player_avatar.go @@ -57,7 +57,7 @@ func (g *GameManager) AddUserAvatar(userId uint32, avatarId uint32) { weaponId := g.AddUserWeapon(player.PlayerID, uint32(avatarDataConfig.InitialWeapon)) // 角色装上初始武器 - g.WearUserAvatarEquip(player.PlayerID, avatarId, weaponId) + g.WearUserAvatarWeapon(player.PlayerID, avatarId, weaponId) g.UpdateUserAvatarFightProp(player.PlayerID, avatarId) @@ -359,87 +359,6 @@ func (g *GameManager) PacketAvatarPropNotify(avatar *model.Avatar) *proto.Avatar return avatarPropNotify } -func (g *GameManager) WearEquipReq(player *model.Player, payloadMsg pb.Message) { - logger.Debug("user wear equip, uid: %v", player.PlayerID) - req := payloadMsg.(*proto.WearEquipReq) - avatarGuid := req.AvatarGuid - equipGuid := req.EquipGuid - avatar, ok := player.GameObjectGuidMap[avatarGuid].(*model.Avatar) - if !ok { - logger.Error("avatar error, avatarGuid: %v", avatarGuid) - g.SendError(cmd.WearEquipRsp, player, &proto.WearEquipRsp{}, proto.Retcode_RET_CAN_NOT_FIND_AVATAR) - return - } - weapon, ok := player.GameObjectGuidMap[equipGuid].(*model.Weapon) - if !ok { - logger.Error("equip error, equipGuid: %v", equipGuid) - g.SendError(cmd.WearEquipRsp, player, &proto.WearEquipRsp{}) - return - } - g.WearUserAvatarEquip(player.PlayerID, avatar.AvatarId, weapon.WeaponId) - - wearEquipRsp := &proto.WearEquipRsp{ - AvatarGuid: avatarGuid, - EquipGuid: equipGuid, - } - g.SendMsg(cmd.WearEquipRsp, player.PlayerID, player.ClientSeq, wearEquipRsp) -} - -func (g *GameManager) WearUserAvatarEquip(userId uint32, avatarId uint32, weaponId uint64) { - player := USER_MANAGER.GetOnlineUser(userId) - if player == nil { - logger.Error("player is nil, uid: %v", userId) - return - } - avatar := player.AvatarMap[avatarId] - weapon := player.WeaponMap[weaponId] - - world := WORLD_MANAGER.GetWorldByID(player.WorldId) - scene := world.GetSceneById(player.SceneId) - - if weapon.AvatarId != 0 { - // 武器在别的角色身上 - weakAvatarId := weapon.AvatarId - weakWeaponId := weaponId - strongAvatarId := avatarId - strongWeaponId := avatar.EquipWeapon.WeaponId - player.TakeOffWeapon(weakAvatarId, weakWeaponId) - player.TakeOffWeapon(strongAvatarId, strongWeaponId) - player.WearWeapon(weakAvatarId, strongWeaponId) - player.WearWeapon(strongAvatarId, weakWeaponId) - - weakAvatar := player.AvatarMap[weakAvatarId] - weakWeapon := player.WeaponMap[weakAvatar.EquipWeapon.WeaponId] - - weakWorldAvatar := world.GetPlayerWorldAvatar(player, weakAvatarId) - if weakWorldAvatar != nil { - weakWorldAvatar.SetWeaponEntityId(scene.CreateEntityWeapon()) - avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(weakAvatar, weakWeapon, weakWorldAvatar.GetWeaponEntityId()) - g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) - } else { - avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(weakAvatar, weakWeapon, 0) - g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) - } - } else if avatar.EquipWeapon != nil { - // 角色当前有武器 - player.TakeOffWeapon(avatarId, avatar.EquipWeapon.WeaponId) - player.WearWeapon(avatarId, weaponId) - } else { - // 是新角色还没有武器 - player.WearWeapon(avatarId, weaponId) - } - - worldAvatar := world.GetPlayerWorldAvatar(player, avatarId) - if worldAvatar != nil { - worldAvatar.SetWeaponEntityId(scene.CreateEntityWeapon()) - avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(avatar, weapon, worldAvatar.GetWeaponEntityId()) - g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) - } else { - avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(avatar, weapon, 0) - g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) - } -} - func (g *GameManager) AvatarChangeCostumeReq(player *model.Player, payloadMsg pb.Message) { logger.Debug("user change avatar costume, uid: %v", player.PlayerID) req := payloadMsg.(*proto.AvatarChangeCostumeReq) @@ -515,45 +434,6 @@ func (g *GameManager) AvatarWearFlycloakReq(player *model.Player, payloadMsg pb. g.SendMsg(cmd.AvatarWearFlycloakRsp, player.PlayerID, player.ClientSeq, avatarWearFlycloakRsp) } -func (g *GameManager) PacketAvatarEquipChangeNotify(avatar *model.Avatar, weapon *model.Weapon, entityId uint32) *proto.AvatarEquipChangeNotify { - itemDataConfig := gdconf.GetItemDataById(int32(weapon.ItemId)) - if itemDataConfig == nil { - logger.Error("item data config error, itemId: %v", weapon.ItemId) - return new(proto.AvatarEquipChangeNotify) - } - avatarEquipChangeNotify := &proto.AvatarEquipChangeNotify{ - AvatarGuid: avatar.Guid, - ItemId: weapon.ItemId, - EquipGuid: weapon.Guid, - } - switch itemDataConfig.Type { - case int32(constant.ITEM_TYPE_WEAPON): - avatarEquipChangeNotify.EquipType = uint32(constant.EQUIP_TYPE_WEAPON) - case int32(constant.ITEM_TYPE_RELIQUARY): - avatarEquipChangeNotify.EquipType = uint32(itemDataConfig.ReliquaryType) - } - avatarEquipChangeNotify.Weapon = &proto.SceneWeaponInfo{ - EntityId: entityId, - GadgetId: uint32(itemDataConfig.GadgetId), - ItemId: weapon.ItemId, - Guid: weapon.Guid, - Level: uint32(weapon.Level), - AbilityInfo: new(proto.AbilitySyncStateInfo), - } - return avatarEquipChangeNotify -} - -func (g *GameManager) PacketAvatarEquipTakeOffNotify(avatar *model.Avatar, weapon *model.Weapon) *proto.AvatarEquipChangeNotify { - avatarEquipChangeNotify := &proto.AvatarEquipChangeNotify{ - AvatarGuid: avatar.Guid, - } - itemDataConfig := gdconf.GetItemDataById(int32(weapon.ItemId)) - if itemDataConfig != nil { - avatarEquipChangeNotify.EquipType = uint32(itemDataConfig.Type) - } - return avatarEquipChangeNotify -} - func (g *GameManager) UpdateUserAvatarFightProp(userId uint32, avatarId uint32) { player := USER_MANAGER.GetOnlineUser(userId) if player == nil { diff --git a/gs/game/player_equip.go b/gs/game/player_equip.go new file mode 100644 index 00000000..67ad69d4 --- /dev/null +++ b/gs/game/player_equip.go @@ -0,0 +1,179 @@ +package game + +import ( + "hk4e/common/constant" + "hk4e/gdconf" + "hk4e/gs/model" + "hk4e/pkg/logger" + "hk4e/protocol/cmd" + "hk4e/protocol/proto" + + pb "google.golang.org/protobuf/proto" +) + +// SetEquipLockStateReq 设置装备上锁状态请求 +func (g *GameManager) SetEquipLockStateReq(player *model.Player, payloadMsg pb.Message) { + logger.Debug("user set equip lock, uid: %v", player.PlayerID) + req := payloadMsg.(*proto.SetEquipLockStateReq) + + // 获取目标装备 + equipGameObj, ok := player.GameObjectGuidMap[req.TargetEquipGuid] + if !ok { + logger.Error("equip error, equipGuid: %v", req.TargetEquipGuid) + g.SendError(cmd.SetEquipLockStateRsp, player, &proto.SetEquipLockStateRsp{}, proto.Retcode_RET_ITEM_NOT_EXIST) + return + } + switch equipGameObj.(type) { + case *model.Weapon: + weapon := equipGameObj.(*model.Weapon) + weapon.Lock = req.IsLocked + // 更新武器的物品数据 + g.SendMsg(cmd.StoreItemChangeNotify, player.PlayerID, player.ClientSeq, g.PacketStoreItemChangeNotifyByWeapon(weapon)) + case *model.Reliquary: + reliquary := equipGameObj.(*model.Reliquary) + reliquary.Lock = req.IsLocked + // TODO 更新圣遗物的物品数据 + default: + logger.Error("equip type error, equipGuid: %v", req.TargetEquipGuid) + g.SendError(cmd.SetEquipLockStateRsp, player, &proto.SetEquipLockStateRsp{}) + return + } + + setEquipLockStateRsp := &proto.SetEquipLockStateRsp{ + TargetEquipGuid: req.TargetEquipGuid, + IsLocked: req.IsLocked, + } + g.SendMsg(cmd.SetEquipLockStateRsp, player.PlayerID, player.ClientSeq, setEquipLockStateRsp) +} + +// WearEquipReq 穿戴装备请求 +func (g *GameManager) WearEquipReq(player *model.Player, payloadMsg pb.Message) { + logger.Debug("user wear equip, uid: %v", player.PlayerID) + req := payloadMsg.(*proto.WearEquipReq) + + avatar, ok := player.AvatarMap[player.GetAvatarIdByGuid(req.AvatarGuid)] + if !ok { + logger.Error("avatar error, avatarGuid: %v", req.AvatarGuid) + g.SendError(cmd.WearEquipRsp, player, &proto.WearEquipRsp{}, proto.Retcode_RET_CAN_NOT_FIND_AVATAR) + return + } + // 获取目标装备 + equipGameObj, ok := player.GameObjectGuidMap[req.EquipGuid] + if !ok { + logger.Error("equip error, equipGuid: %v", req.EquipGuid) + g.SendError(cmd.WearEquipRsp, player, &proto.WearEquipRsp{}, proto.Retcode_RET_ITEM_NOT_EXIST) + return + } + switch equipGameObj.(type) { + case *model.Weapon: + weapon := equipGameObj.(*model.Weapon) + g.WearUserAvatarWeapon(player.PlayerID, avatar.AvatarId, weapon.WeaponId) + case *model.Reliquary: + // 暂时不写 + default: + logger.Error("equip type error, equipGuid: %v", req.EquipGuid) + g.SendError(cmd.WearEquipRsp, player, &proto.WearEquipRsp{}) + return + } + + wearEquipRsp := &proto.WearEquipRsp{ + AvatarGuid: req.AvatarGuid, + EquipGuid: req.EquipGuid, + } + g.SendMsg(cmd.WearEquipRsp, player.PlayerID, player.ClientSeq, wearEquipRsp) +} + +// WearUserAvatarWeapon 玩家角色装备武器 +func (g *GameManager) WearUserAvatarWeapon(userId uint32, avatarId uint32, weaponId uint64) { + player := USER_MANAGER.GetOnlineUser(userId) + if player == nil { + logger.Error("player is nil, uid: %v", userId) + return + } + avatar := player.AvatarMap[avatarId] + weapon := player.WeaponMap[weaponId] + + world := WORLD_MANAGER.GetWorldByID(player.WorldId) + scene := world.GetSceneById(player.SceneId) + + if weapon.AvatarId != 0 { + // 武器在别的角色身上 + weakAvatarId := weapon.AvatarId + weakWeaponId := weaponId + strongAvatarId := avatarId + strongWeaponId := avatar.EquipWeapon.WeaponId + player.TakeOffWeapon(weakAvatarId, weakWeaponId) + player.TakeOffWeapon(strongAvatarId, strongWeaponId) + player.WearWeapon(weakAvatarId, strongWeaponId) + player.WearWeapon(strongAvatarId, weakWeaponId) + + weakAvatar := player.AvatarMap[weakAvatarId] + weakWeapon := player.WeaponMap[weakAvatar.EquipWeapon.WeaponId] + + weakWorldAvatar := world.GetPlayerWorldAvatar(player, weakAvatarId) + if weakWorldAvatar != nil { + weakWorldAvatar.SetWeaponEntityId(scene.CreateEntityWeapon()) + avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(weakAvatar, weakWeapon, weakWorldAvatar.GetWeaponEntityId()) + g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) + } else { + avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(weakAvatar, weakWeapon, 0) + g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) + } + } else if avatar.EquipWeapon != nil { + // 角色当前有武器 + player.TakeOffWeapon(avatarId, avatar.EquipWeapon.WeaponId) + player.WearWeapon(avatarId, weaponId) + } else { + // 是新角色还没有武器 + player.WearWeapon(avatarId, weaponId) + } + + worldAvatar := world.GetPlayerWorldAvatar(player, avatarId) + if worldAvatar != nil { + worldAvatar.SetWeaponEntityId(scene.CreateEntityWeapon()) + avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(avatar, weapon, worldAvatar.GetWeaponEntityId()) + g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) + } else { + avatarEquipChangeNotify := g.PacketAvatarEquipChangeNotify(avatar, weapon, 0) + g.SendMsg(cmd.AvatarEquipChangeNotify, userId, player.ClientSeq, avatarEquipChangeNotify) + } +} + +func (g *GameManager) PacketAvatarEquipChangeNotify(avatar *model.Avatar, weapon *model.Weapon, entityId uint32) *proto.AvatarEquipChangeNotify { + itemDataConfig := gdconf.GetItemDataById(int32(weapon.ItemId)) + if itemDataConfig == nil { + logger.Error("item data config error, itemId: %v", weapon.ItemId) + return new(proto.AvatarEquipChangeNotify) + } + avatarEquipChangeNotify := &proto.AvatarEquipChangeNotify{ + AvatarGuid: avatar.Guid, + ItemId: weapon.ItemId, + EquipGuid: weapon.Guid, + } + switch itemDataConfig.Type { + case int32(constant.ITEM_TYPE_WEAPON): + avatarEquipChangeNotify.EquipType = uint32(constant.EQUIP_TYPE_WEAPON) + case int32(constant.ITEM_TYPE_RELIQUARY): + avatarEquipChangeNotify.EquipType = uint32(itemDataConfig.ReliquaryType) + } + avatarEquipChangeNotify.Weapon = &proto.SceneWeaponInfo{ + EntityId: entityId, + GadgetId: uint32(itemDataConfig.GadgetId), + ItemId: weapon.ItemId, + Guid: weapon.Guid, + Level: uint32(weapon.Level), + AbilityInfo: new(proto.AbilitySyncStateInfo), + } + return avatarEquipChangeNotify +} + +func (g *GameManager) PacketAvatarEquipTakeOffNotify(avatar *model.Avatar, weapon *model.Weapon) *proto.AvatarEquipChangeNotify { + avatarEquipChangeNotify := &proto.AvatarEquipChangeNotify{ + AvatarGuid: avatar.Guid, + } + itemDataConfig := gdconf.GetItemDataById(int32(weapon.ItemId)) + if itemDataConfig != nil { + avatarEquipChangeNotify.EquipType = uint32(itemDataConfig.Type) + } + return avatarEquipChangeNotify +} diff --git a/gs/game/player_weapon.go b/gs/game/player_weapon.go index 9936f1eb..64b03359 100644 --- a/gs/game/player_weapon.go +++ b/gs/game/player_weapon.go @@ -136,12 +136,23 @@ func (g *GameManager) WeaponAwakenReq(player *model.Player, payloadMsg pb.Messag g.SendError(cmd.WeaponAwakenRsp, player, &proto.WeaponAwakenRsp{}, proto.Retcode_RET_ITEM_NOT_EXIST) return } + // 确保获取消耗的摩拉索引不越界 + if int(weapon.Refinement) >= len(weaponConfig.AwakenCoinCostList) { + logger.Error("weapon config cost coin error, itemId: %v", weapon.ItemId) + return + } // 摩拉数量是否足够 if player.GetItemCount(constant.ITEM_ID_SCOIN) < weaponConfig.AwakenCoinCostList[weapon.Refinement] { logger.Error("item count not enough, itemId: %v", constant.ITEM_ID_SCOIN) g.SendError(cmd.WeaponAwakenRsp, player, &proto.WeaponAwakenRsp{}, proto.Retcode_RET_SCOIN_NOT_ENOUGH) return } + // 一星二星的武器不能精炼 + if weaponConfig.EquipLevel < 3 { + logger.Error("weapon equip level le 3, itemId: %v", weapon.ItemId) + g.SendError(cmd.WeaponAwakenRsp, player, &proto.WeaponAwakenRsp{}, proto.Retcode_RET_AWAKEN_LEVEL_MAX) + return + } // 武器精炼等级是否不超过限制 // 暂时精炼等级是写死的 应该最大精炼等级就是5级 if weapon.Refinement >= 4 { @@ -174,6 +185,12 @@ func (g *GameManager) WeaponAwakenReq(player *model.Player, payloadMsg pb.Messag g.SendError(cmd.WeaponAwakenRsp, player, &proto.WeaponAwakenRsp{}, proto.Retcode_RET_EQUIP_HAS_BEEN_WEARED) return } + // 确保被精炼武器没有上锁 + if foodWeapon.Lock { + logger.Error("food weapon has been lock, weaponGuid: %v", req.ItemGuid) + g.SendError(cmd.WeaponAwakenRsp, player, &proto.WeaponAwakenRsp{}, proto.Retcode_RET_EQUIP_IS_LOCKED) + return + } // 消耗作为精炼材料的武器 g.CostUserWeapon(player.PlayerID, []uint64{foodWeapon.WeaponId}) case int32(constant.ITEM_TYPE_MATERIAL): @@ -584,6 +601,18 @@ func (g *GameManager) WeaponUpgradeReq(player *model.Player, payloadMsg pb.Messa logger.Error("food weapon error, weaponGuid: %v", weaponGuid) g.SendError(cmd.WeaponUpgradeRsp, player, &proto.WeaponUpgradeRsp{}, proto.Retcode_RET_ITEM_NOT_EXIST) } + // 确保被精炼武器没有被任何角色装备 + if foodWeapon.AvatarId != 0 { + logger.Error("food weapon has been wear, weaponGuid: %v", weaponGuid) + g.SendError(cmd.WeaponUpgradeRsp, player, &proto.WeaponUpgradeRsp{}, proto.Retcode_RET_EQUIP_HAS_BEEN_WEARED) + return + } + // 确保被精炼武器没有上锁 + if foodWeapon.Lock { + logger.Error("food weapon has been lock, weaponGuid: %v", weaponGuid) + g.SendError(cmd.WeaponUpgradeRsp, player, &proto.WeaponUpgradeRsp{}, proto.Retcode_RET_EQUIP_IS_LOCKED) + return + } costWeaponIdList = append(costWeaponIdList, foodWeapon.WeaponId) } // 消耗升级材料和摩拉 diff --git a/gs/game/route_manager.go b/gs/game/route_manager.go index 679bfe83..a43e21ed 100644 --- a/gs/game/route_manager.go +++ b/gs/game/route_manager.go @@ -136,6 +136,7 @@ func (r *RouteManager) initRoute() { r.registerRouter(cmd.WeaponPromoteReq, GAME_MANAGER.WeaponPromoteReq) r.registerRouter(cmd.WeaponAwakenReq, GAME_MANAGER.WeaponAwakenReq) r.registerRouter(cmd.AvatarPromoteGetRewardReq, GAME_MANAGER.AvatarPromoteGetRewardReq) + r.registerRouter(cmd.SetEquipLockStateReq, GAME_MANAGER.SetEquipLockStateReq) } func (r *RouteManager) RouteHandle(netMsg *mq.NetMsg) { diff --git a/protocol/cmd/cmd_id_proto_obj_map.go b/protocol/cmd/cmd_id_proto_obj_map.go index 763718fb..b3a672a5 100644 --- a/protocol/cmd/cmd_id_proto_obj_map.go +++ b/protocol/cmd/cmd_id_proto_obj_map.go @@ -248,6 +248,8 @@ func (c *CmdProtoMap) registerAllMessage() { c.registerMessage(WeaponPromoteRsp, &proto.WeaponPromoteRsp{}) // 武器突破响应 c.registerMessage(WeaponAwakenReq, &proto.WeaponAwakenReq{}) // 武器精炼请求 c.registerMessage(WeaponAwakenRsp, &proto.WeaponAwakenRsp{}) // 武器精炼响应 + c.registerMessage(SetEquipLockStateReq, &proto.SetEquipLockStateReq{}) // 设置装备上锁状态请求 + c.registerMessage(SetEquipLockStateRsp, &proto.SetEquipLockStateRsp{}) // 设置装备上锁状态响应 // 商店 c.registerMessage(GetShopmallDataReq, &proto.GetShopmallDataReq{}) // 商店信息请求