完成ca正规化
This commit is contained in:
parent
b68eff5b5e
commit
5fe5887d22
@ -3650,11 +3650,8 @@ void Human::SendPersonalBattleReport()
|
||||
}
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "c=Battle&a=personalReport";
|
||||
} else {
|
||||
url += "?c=Battle&a=personalReport";
|
||||
}
|
||||
params->SetVal("c", "Battle");
|
||||
params->SetVal("a", "personalReport");
|
||||
std::string data;
|
||||
params->ToUrlEncodeStr(data);
|
||||
HttpProxy::Instance()->HttpGet
|
||||
|
@ -1378,12 +1378,9 @@ void Player::_CMRevive(f8::MsgHdr* hdr, const cs::CMRevive& msg)
|
||||
{
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "&c=Battle&a=decReviveCoin";
|
||||
} else {
|
||||
url += "?&c=Battle&a=decReviveCoin";
|
||||
}
|
||||
auto url_params = a8::MutableXObject::CreateObject();
|
||||
url_params->SetVal("c", "Battle");
|
||||
url_params->SetVal("a", "decReviveCoin");
|
||||
url_params->SetVal("account_id", account_id);
|
||||
url_params->SetVal("session_id", session_id);
|
||||
url_params->SetVal("target_id", hum->account_id);
|
||||
|
@ -2236,13 +2236,10 @@ void Room::TryMobaReport(int try_count)
|
||||
}
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "c=Battle&a=mobaTeamReport";
|
||||
} else {
|
||||
url += "?c=Battle&a=mobaTeamReport";
|
||||
}
|
||||
std::shared_ptr<a8::MutableXObject> params = a8::MutableXObject::CreateObject();
|
||||
std::shared_ptr<a8::MutableXObject> post_data = a8::MutableXObject::CreateObject();
|
||||
params->SetVal("c", "Battle");
|
||||
params->SetVal("a", "mobaTeamReport");
|
||||
params->SetVal("account_id", player->account_id);
|
||||
params->SetVal("session_id", player->session_id);
|
||||
GenBattleMobaReportData(post_data.get());
|
||||
@ -4113,14 +4110,11 @@ void Room::TryRoomReport(int try_count)
|
||||
}
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "c=Battle&a=roomReport";
|
||||
} else {
|
||||
url += "?c=Battle&a=roomReport";
|
||||
}
|
||||
std::shared_ptr<a8::MutableXObject> params = a8::MutableXObject::CreateObject();
|
||||
std::shared_ptr<a8::MutableXObject> post_data = a8::MutableXObject::CreateObject();
|
||||
GenBattleRoomReportData(post_data.get());
|
||||
params->SetVal("c", "Battle");
|
||||
params->SetVal("a", "roomReport");
|
||||
params->SetVal("account_id", player->account_id);
|
||||
params->SetVal("session_id", player->session_id);
|
||||
std::string content = post_data->ToJsonStr();
|
||||
|
@ -596,22 +596,15 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
|
||||
{
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
auto url_params = a8::MutableXObject::CreateObject();
|
||||
url_params->SetVal("c", "Battle");
|
||||
if (custom_room_type == CUSTOM_ROOM_CUSTOM) {
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "&c=Battle&a=getCustomBattleDataNew";
|
||||
} else {
|
||||
url += "?&c=Battle&a=getCustomBattleDataNew";
|
||||
}
|
||||
url_params->SetVal("a", "getCustomBattleDataNew");
|
||||
} else if (custom_room_type == CUSTOM_ROOM_NORMAL) {
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "&c=Battle&a=getNormalBattleData";
|
||||
} else {
|
||||
url += "?&c=Battle&a=getNormalBattleData";
|
||||
}
|
||||
url_params->SetVal("a", "getNormalBattleData");
|
||||
} else {
|
||||
A8_ABORT();
|
||||
}
|
||||
auto url_params = a8::MutableXObject::CreateObject();
|
||||
url_params->SetVal("account_id", join_msg->account_id());
|
||||
url_params->SetVal("session_id", join_msg->session_id());
|
||||
url_params->SetVal("version", 1);
|
||||
|
@ -211,12 +211,9 @@ void Team::SendTeamBattleReport(Human* sender)
|
||||
#endif
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "c=Battle&a=teamReport";
|
||||
} else {
|
||||
url += "?c=Battle&a=teamReport";
|
||||
}
|
||||
std::shared_ptr<a8::MutableXObject> params = a8::MutableXObject::CreateObject();
|
||||
params->SetVal("c", "Battle");
|
||||
params->SetVal("a", "teamReport");
|
||||
params->SetVal("account_id", player->account_id);
|
||||
params->SetVal("session_id", player->session_id);
|
||||
params->SetVal("__POST", post_data->ToJsonStr());
|
||||
|
Loading…
x
Reference in New Issue
Block a user