battleReport添加map_id map_tpl_name字段

This commit is contained in:
aozhiwei 2019-06-04 11:49:10 +08:00
parent 693f732864
commit bc5b1ca1eb
3 changed files with 5 additions and 2 deletions

View File

@ -1769,7 +1769,9 @@ void Human::GenBattleReportData(a8::MutableXObject* params)
}
}
params->SetVal("account_id", account_id);
params->SetVal("map_id", room->map_meta->i->map_id());
params->SetVal("map_name", room->map_meta->i->map_name());
params->SetVal("map_tpl_name", room->map_tpl_name);
params->SetVal("game_time", time(nullptr));
params->SetVal("hurt", stats.damage_amount_in);
params->SetVal("rank", rank);

View File

@ -319,8 +319,8 @@ void Room::ScatterDrop(Vector2D center, int drop_id)
void Room::CreateThings()
{
std::string tpl_name = map_meta->RandTemplate();
std::vector<MetaData::MapTplThing>* things = MetaMgr::Instance()->GetMapTplThing(tpl_name);
map_tpl_name = map_meta->RandTemplate();
std::vector<MetaData::MapTplThing>* things = MetaMgr::Instance()->GetMapTplThing(map_tpl_name);
if (things) {
for (auto& thing_tpl : *things) {
if (thing_tpl.i->weight() >= rand() % 10000) {

View File

@ -34,6 +34,7 @@ class Room
public:
long long room_uuid = 0;
MetaData::Map* map_meta = nullptr;
std::string map_tpl_name;
FrameEvent frame_event;
FrameMaker frame_maker;
long long frame_no = 0;