1
This commit is contained in:
parent
bba1e6ba8e
commit
823f51a8c8
@ -1720,63 +1720,30 @@ void Human::GenBattleReportData(a8::MutableXObject* params)
|
||||
params->SetVal("session_id", session_id);
|
||||
params->SetVal("map_id", room->GetMapMeta()->i->map_id());
|
||||
params->SetVal("map_name", room->GetMapMeta()->i->map_name());
|
||||
params->SetVal("team_mode", GetTeam() && GetTeam()->GetMemberNum() > 1 ? 1 : 0);
|
||||
params->SetVal("map_tpl_name", room->GetMapTplName());
|
||||
params->SetVal("game_time", time(nullptr));
|
||||
params->SetVal("hurt", stats.damage_amount_in);
|
||||
params->SetVal("rank", rank);
|
||||
params->SetVal("kills", stats.kills);
|
||||
params->SetVal("harm", stats.damage_amount_out);
|
||||
params->SetVal("add_HP", stats.heal_amount);
|
||||
params->SetVal("room_uuid", room->GetRoomUuid());
|
||||
params->SetVal("game_time", time(nullptr)); //?
|
||||
if (!dead) {
|
||||
params->SetVal("alive_time", room->GetFrameNo() * 1000.0f / SERVER_FRAME_RATE);
|
||||
} else {
|
||||
params->SetVal("alive_time", dead_frameno * 1000.0f / SERVER_FRAME_RATE);
|
||||
}
|
||||
params->SetVal("team_status", GetTeam() && GetTeam()->GetMemberNum() > 1 ? 1 : 0);
|
||||
params->SetVal("room_uuid", room->GetRoomUuid());
|
||||
|
||||
int snipe_kill = 0;
|
||||
int rifle_kill = 0;
|
||||
int pistol_kill = 0;
|
||||
int submachine_kill = 0;
|
||||
for (Human* hum : kill_humans) {
|
||||
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(stats.weapon_id);
|
||||
if (equip_meta) {
|
||||
switch (equip_meta->i->equip_subtype()) {
|
||||
case 7:
|
||||
{
|
||||
//狙击枪
|
||||
++snipe_kill;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
//步枪
|
||||
++rifle_kill;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
//手枪
|
||||
++pistol_kill;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
//冲锋枪
|
||||
++submachine_kill;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
params->SetVal("snipe_kill", snipe_kill);
|
||||
params->SetVal("rifle_kill", rifle_kill);
|
||||
params->SetVal("pistol_kill", pistol_kill);
|
||||
params->SetVal("submachine_kill", submachine_kill);
|
||||
|
||||
params->SetVal("rescue_member", stats.rescue_member);
|
||||
params->SetVal("rescue_guild_member", stats.rescue_guild_member);
|
||||
params->SetVal("ranked", rank);
|
||||
params->SetVal("kills", stats.kills);
|
||||
params->SetVal("damage_out", stats.damage_amount_out);
|
||||
params->SetVal("rescue_teammate_times", stats.rescue_member);
|
||||
params->SetVal("diving_times", stats.diving_times);
|
||||
params->SetVal("damage_in", stats.damage_amount_in);
|
||||
params->SetVal("recover_hp", stats.heal_amount);
|
||||
params->SetVal("open_airdrop_times", stats.open_airdrop_times);
|
||||
params->SetVal("use_medicine_times", stats.use_medicine_times);
|
||||
params->SetVal("destory_car_times", stats.destory_car_times);
|
||||
params->SetVal("use_camouflage_times", stats.use_camouflage_times);
|
||||
params->SetVal("use_skill_times", stats.use_skill_times);
|
||||
params->SetVal("ride_car_move_distance", stats.ride_car_move_distance);
|
||||
params->SetVal("ride_car_kills", stats.ride_car_kills);
|
||||
params->SetVal("max_hero_skill_lv", stats.max_hero_skill_lv);
|
||||
{
|
||||
float rank_param = MetaMgr::Instance()->GetRankRewardParam(rank);
|
||||
float kill_param = MetaMgr::Instance()->GetKillRewardParam(stats.kills);
|
||||
|
@ -37,6 +37,16 @@ struct PlayerStats
|
||||
int history_damage_amount = 0;
|
||||
int history_heal_amount = 0;
|
||||
|
||||
int diving_times = 0;
|
||||
int open_airdrop_times = 0;
|
||||
int use_medicine_times = 0;
|
||||
int destory_car_times = 0;
|
||||
int use_camouflage_times = 0;
|
||||
int use_skill_times = 0;
|
||||
int ride_car_move_distance = 0;
|
||||
int ride_car_kills = 0;
|
||||
int max_hero_skill_lv = 0;
|
||||
|
||||
int gold = 0;
|
||||
int score = 0;
|
||||
std::vector<std::pair<int, int>> items;
|
||||
|
Loading…
x
Reference in New Issue
Block a user