battleReport添加map_id map_tpl_name字段
This commit is contained in:
parent
693f732864
commit
bc5b1ca1eb
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user