1
This commit is contained in:
parent
4f415520b6
commit
f0f4248806
@ -86,10 +86,9 @@ void BoxDrop::RequestAllocBoxNum()
|
|||||||
url_params->SetVal("room_uuid", room_->GetRoomUuid());
|
url_params->SetVal("room_uuid", room_->GetRoomUuid());
|
||||||
url_params->SetVal("account_id", account_id);
|
url_params->SetVal("account_id", account_id);
|
||||||
url_params->SetVal("session_id", session_id);
|
url_params->SetVal("session_id", session_id);
|
||||||
std::string room_uuid = room_->GetRoomUuid();
|
|
||||||
HttpProxy::Instance()->HttpGet
|
HttpProxy::Instance()->HttpGet
|
||||||
(
|
(
|
||||||
[room_wp = room_->weak_from_this(), room_uuid]
|
[room_wp = room_->weak_from_this(), room_uuid = room_->GetRoomUuid()]
|
||||||
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
||||||
{
|
{
|
||||||
if (ok) {
|
if (ok) {
|
||||||
@ -147,32 +146,32 @@ void BoxDrop::RequestReturnBoxNum()
|
|||||||
auto url_params = a8::MutableXObject::CreateObject();
|
auto url_params = a8::MutableXObject::CreateObject();
|
||||||
url_params->SetVal("c", "Battle");
|
url_params->SetVal("c", "Battle");
|
||||||
url_params->SetVal("a", "requestReturnBoxNum");
|
url_params->SetVal("a", "requestReturnBoxNum");
|
||||||
url_params->SetVal("room_uuid", room_->GetRoomUuid());
|
|
||||||
url_params->SetVal("account_id", account_id);
|
url_params->SetVal("account_id", account_id);
|
||||||
url_params->SetVal("session_id", session_id);
|
url_params->SetVal("session_id", session_id);
|
||||||
|
url_params->SetVal("used_num", used_num_);
|
||||||
|
url_params->SetVal("alloc_box_num", alloc_box_num_);
|
||||||
HttpProxy::Instance()->HttpGet
|
HttpProxy::Instance()->HttpGet
|
||||||
(
|
(
|
||||||
[]
|
[room_uuid = room_->GetRoomUuid()]
|
||||||
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
||||||
{
|
{
|
||||||
if (ok) {
|
if (ok) {
|
||||||
f8::UdpLog::Instance()->Info
|
f8::UdpLog::Instance()->Info
|
||||||
("GetBattleData ok %s",
|
("RequestReturnBoxNum ok room_uuid:%s %s",
|
||||||
{
|
{
|
||||||
|
room_uuid,
|
||||||
rsp_obj->ToJsonStr()
|
rsp_obj->ToJsonStr()
|
||||||
});
|
});
|
||||||
if (rsp_obj->GetType() != a8::XOT_OBJECT ||
|
if (rsp_obj->GetType() != a8::XOT_OBJECT ||
|
||||||
!rsp_obj->HasKey("errcode")) {
|
!rsp_obj->HasKey("errcode")) {
|
||||||
//cb(1, "", nullptr);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f8::UdpLog::Instance()->Warning
|
f8::UdpLog::Instance()->Warning
|
||||||
("GetCustomBattleData error %s",
|
("RequestReturnBoxNum error room_uuid:%s",
|
||||||
{
|
{
|
||||||
""
|
room_uuid
|
||||||
});
|
});
|
||||||
//cb(1, "custom battle data error", nullptr);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url,
|
url,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user