添加杀手头像

This commit is contained in:
aozhiwei 2019-08-15 14:52:45 +08:00
parent 70156f3dc3
commit ecbba052c5
2 changed files with 13 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include "gamelog.h"
#include "typeconvert.h"
#include "obstacle.h"
#include "player.h"
#include "framework/cpp/utils.h"
#include "framework/cpp/httpclientpool.h"
@ -158,6 +159,16 @@ void Human::FillMFPlayerStats(cs::MFPlayerStats* stats_pb)
stats_pb->set_dead(dead);
stats_pb->set_killer_id(stats.killer_id);
stats_pb->set_killer_name(stats.killer_name);
{
Player* killer = room->GetPlayerByUniId(stats.killer_id);
if (killer) {
stats_pb->set_killer_avatar_url(killer->avatar_url);
stats_pb->set_killer_account_id(killer->account_id);
} else {
stats_pb->set_killer_avatar_url("");
stats_pb->set_killer_account_id("");
}
}
stats_pb->set_account_id(account_id);

View File

@ -561,6 +561,8 @@ message MFPlayerStats
optional bool dead = 5; //
optional int32 killer_id = 7; //id() id: -1:
optional string killer_name = 40; //
optional string killer_avatar_url = 41; //
optional string killer_account_id = 42; //accountid()
optional string account_id = 21; //id
}