添加杀手头像
This commit is contained in:
parent
70156f3dc3
commit
ecbba052c5
@ -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);
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user