1
This commit is contained in:
parent
38f9689c25
commit
ceaf83f9e3
@ -3662,5 +3662,31 @@ void Human::ShiledBreak()
|
|||||||
|
|
||||||
void Human::SendPersonalBattleReport()
|
void Human::SendPersonalBattleReport()
|
||||||
{
|
{
|
||||||
|
std::shared_ptr<a8::MutableXObject> params = a8::MutableXObject::CreateObject();
|
||||||
|
GenBattleReportData(params.get());
|
||||||
|
std::string url;
|
||||||
|
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||||
|
if (url.find('?') != std::string::npos) {
|
||||||
|
url += "c=Battle&a=personalReport";
|
||||||
|
} else {
|
||||||
|
url += "?c=Battle&a=personalReport";
|
||||||
|
}
|
||||||
|
std::string data;
|
||||||
|
params->ToUrlEncodeStr(data);
|
||||||
|
HttpProxy::Instance()->HttpGet
|
||||||
|
(
|
||||||
|
[data]
|
||||||
|
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
||||||
|
{
|
||||||
|
if (!ok) {
|
||||||
|
f8::UdpLog::Instance()->Error("personalReport http error params: %s response: %s",
|
||||||
|
{
|
||||||
|
data,
|
||||||
|
""
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url.c_str(),
|
||||||
|
*params.get()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -1552,7 +1552,7 @@ void Human::SendGameOver()
|
|||||||
FillSMGameOver(msg);
|
FillSMGameOver(msg);
|
||||||
SendNotifyMsg(msg);
|
SendNotifyMsg(msg);
|
||||||
}
|
}
|
||||||
if (sent_personal_report_) {
|
if (IsPlayer() && sent_personal_report_) {
|
||||||
SendPersonalBattleReport();
|
SendPersonalBattleReport();
|
||||||
sent_personal_report_ = true;
|
sent_personal_report_ = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user