添加battle report

This commit is contained in:
aozhiwei 2019-04-29 17:23:17 +08:00
parent 9b33e85aed
commit 6efaccf258

View File

@ -1197,7 +1197,7 @@ void Human::SendUpdateMsg()
void Human::UpdateGameOver() void Human::UpdateGameOver()
{ {
#if 0 #if 1
a8::MutableXObject* params = a8::MutableXObject::NewObject(); a8::MutableXObject* params = a8::MutableXObject::NewObject();
GenBattleReportData(params); GenBattleReportData(params);
auto on_ok = [] (a8::XParams& param, a8::XObject& data) auto on_ok = [] (a8::XParams& param, a8::XObject& data)
@ -1209,6 +1209,9 @@ void Human::UpdateGameOver()
Entity* entity = room->GetEntityByUniId(hum_uniid); Entity* entity = room->GetEntityByUniId(hum_uniid);
if (entity && entity->entity_type == ET_Player) { if (entity && entity->entity_type == ET_Player) {
Human* hum = (Human*)entity; Human* hum = (Human*)entity;
cs::SMGameOver msg;
hum->FillSMGameOver(msg);
hum->SendNotifyMsg(msg);
} }
} }
}; };
@ -1231,7 +1234,7 @@ void Human::UpdateGameOver()
std::string url; std::string url;
if (!f8::IsOnlineEnv()) { if (!f8::IsOnlineEnv()) {
if (App::Instance()->flags.find(3) != App::Instance()->flags.end()) { if (App::Instance()->flags.find(3) != App::Instance()->flags.end()) {
url = "http://http://192.168.100.41/webapp/index.php?c=Role&a=battleReport"; url = "http://192.168.100.41/webapp/index.php?c=Role&a=battleReport";
} else { } else {
url = "https://game2001api-test.kingsome.cn/webapp/index.php?c=Role&a=battleReport"; url = "https://game2001api-test.kingsome.cn/webapp/index.php?c=Role&a=battleReport";
} }