From 1dc5de96e47020867994ac17c643e221cec24c5b Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 25 Dec 2022 12:58:07 +0800 Subject: [PATCH] 1 --- server/gameserver/pbutils.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/gameserver/pbutils.cc b/server/gameserver/pbutils.cc index 7a61d8cd..245815b2 100644 --- a/server/gameserver/pbutils.cc +++ b/server/gameserver/pbutils.cc @@ -734,11 +734,10 @@ void Human::FillMFPlayerStats(cs::MFPlayerStats* stats_pb) skin.ToPB(pb_skin); } } - // 222 - #if 0 - *stats_pb->mutable_hero_stats() = stats.pb_hero_stats; - *stats_pb->mutable_weapons_stats() = stats.pb_weapons_stats; - #endif + TypeConvert::ToPb(stats.pb_hero_stats, stats_pb->mutable_hero_stats()); + for (auto& itr : stats.pb_weapons_stats) { + TypeConvert::ToPb(itr, stats_pb->add_weapons_stats()); + } } void Human::FillMFTeamData(Human* hum, cs::MFTeamData* team_data, bool is_game_over)