From c75403bc0d1c96733b7aedd308abd2b07605dcf2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 26 Jun 2019 10:07:17 +0800 Subject: [PATCH] gamelog add team_id --- server/gameserver/gamelog.cc | 2 ++ server/gameserver/human.cc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/gameserver/gamelog.cc b/server/gameserver/gamelog.cc index 1fd7bab..e270a0b 100644 --- a/server/gameserver/gamelog.cc +++ b/server/gameserver/gamelog.cc @@ -27,6 +27,7 @@ void GameLog::GameStart(Player* hum) prop->SetVal("nickname", hum->name); //prop->SetVal("localuuid", ""); //prop->SetVal("start_param", ""); + prop->SetVal("team_id", hum->team_id); prop->SetVal("server_node_id", App::Instance()->node_id); prop->SetVal("server_instance_id", App::Instance()->instance_id); @@ -62,6 +63,7 @@ void GameLog::GameEnd(Player* hum) //prop->SetVal("localuuid", ""); prop->SetVal("game_time", a8::XGetTickCount() - hum->create_tick); //prop->SetVal("start_param", ""); + prop->SetVal("team_id", hum->team_id); prop->SetVal("server_node_id", App::Instance()->node_id); prop->SetVal("server_instance_id", App::Instance()->instance_id); diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index b7222ab..3551e27 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -564,7 +564,8 @@ void Human::FillSMGameOver(cs::SMGameOver& msg) room->TouchHumanList(a8::XParams(), [&human_list] (Human* hum, a8::XParams& param) -> bool { - if (hum->leave_frameno_ == 0 || hum->leave_frameno_ > hum->room->battle_start_frameno_) { + if (hum->leave_frameno_ == 0 || + hum->leave_frameno_ > hum->room->battle_start_frameno_) { human_list.push_back(hum); } return true;