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("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_name", room->map_meta->i->map_name());
|
||||||
|
params->SetVal("map_tpl_name", room->map_tpl_name);
|
||||||
params->SetVal("game_time", time(nullptr));
|
params->SetVal("game_time", time(nullptr));
|
||||||
params->SetVal("hurt", stats.damage_amount_in);
|
params->SetVal("hurt", stats.damage_amount_in);
|
||||||
params->SetVal("rank", rank);
|
params->SetVal("rank", rank);
|
||||||
|
@ -319,8 +319,8 @@ void Room::ScatterDrop(Vector2D center, int drop_id)
|
|||||||
|
|
||||||
void Room::CreateThings()
|
void Room::CreateThings()
|
||||||
{
|
{
|
||||||
std::string tpl_name = map_meta->RandTemplate();
|
map_tpl_name = map_meta->RandTemplate();
|
||||||
std::vector<MetaData::MapTplThing>* things = MetaMgr::Instance()->GetMapTplThing(tpl_name);
|
std::vector<MetaData::MapTplThing>* things = MetaMgr::Instance()->GetMapTplThing(map_tpl_name);
|
||||||
if (things) {
|
if (things) {
|
||||||
for (auto& thing_tpl : *things) {
|
for (auto& thing_tpl : *things) {
|
||||||
if (thing_tpl.i->weight() >= rand() % 10000) {
|
if (thing_tpl.i->weight() >= rand() % 10000) {
|
||||||
|
@ -34,6 +34,7 @@ class Room
|
|||||||
public:
|
public:
|
||||||
long long room_uuid = 0;
|
long long room_uuid = 0;
|
||||||
MetaData::Map* map_meta = nullptr;
|
MetaData::Map* map_meta = nullptr;
|
||||||
|
std::string map_tpl_name;
|
||||||
FrameEvent frame_event;
|
FrameEvent frame_event;
|
||||||
FrameMaker frame_maker;
|
FrameMaker frame_maker;
|
||||||
long long frame_no = 0;
|
long long frame_no = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user