1
This commit is contained in:
parent
b0a183cc45
commit
26dff62dd1
@ -103,8 +103,12 @@ void BoxDrop::RequestAllocBoxNum()
|
||||
}
|
||||
if (!room_wp.expired()) {
|
||||
auto room = room_wp.lock();
|
||||
int box_num = rsp_obj->Get("box_num").GetInt();
|
||||
room->GetBoxDrop()->OnAllocOk(box_num);
|
||||
if (rsp_obj->Get("errcode").GetInt() == 0) {
|
||||
int box_num = rsp_obj->Get("box_num").GetInt();
|
||||
room->GetBoxDrop()->OnAllocOk(box_num);
|
||||
} else {
|
||||
room->GetBoxDrop()->OnAllocFail();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
f8::UdpLog::Instance()->Warning
|
||||
@ -198,3 +202,8 @@ void BoxDrop::OnAllocOk(int box_num)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BoxDrop::OnAllocFail()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ class BoxDrop : public std::enable_shared_from_this<BoxDrop>
|
||||
int GetRemainNum();
|
||||
bool FillAccountIdSessionId(std::string account_id, std::string session_id);
|
||||
void OnAllocOk(int box_num);
|
||||
void OnAllocFail();
|
||||
|
||||
private:
|
||||
Room* room_ = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user