1
This commit is contained in:
parent
44dd7d03b7
commit
9fa163e028
@ -119,6 +119,9 @@ behaviac::EBTStatus AndroidAgent::CoLogin()
|
||||
[context, hum] (bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
||||
{
|
||||
if (ok) {
|
||||
auto info = rsp_obj->At("property_chg")->At("user_info");
|
||||
long long hero_uniid = info->Get("hero_uniid", "");
|
||||
hum->SetHeroUniId(hero_uniid);
|
||||
++Perf::Instance()->enter_ok_times;
|
||||
context->login_ok = true;
|
||||
} else {
|
||||
@ -240,6 +243,10 @@ behaviac::EBTStatus AndroidAgent::CoJoin()
|
||||
auto member = a8::MutableXObject::CreateObject();
|
||||
member->SetVal("account_id", owner_->GetAccountId());
|
||||
member->SetVal("session_id", owner_->GetSessionId());
|
||||
member->SetVal("hero_uniid", owner_->GetHeroUniId());
|
||||
if (owner_->GetHeroUniId() <= 0) {
|
||||
A8_ABORT();
|
||||
}
|
||||
member_list->Push(*member.get());
|
||||
|
||||
team->SetVal("team_uuid", f8::App::Instance()->NewGlobalUuid());
|
||||
@ -247,6 +254,8 @@ behaviac::EBTStatus AndroidAgent::CoJoin()
|
||||
|
||||
team_list->Push(*team.get());
|
||||
}
|
||||
xobj->SetVal("room_uuid", f8::App::Instance()->NewGlobalUuid());
|
||||
xobj->SetVal("start_time", f8::App::Instance()->GetNowTime());
|
||||
xobj->SetVal("team_list", *team_list.get());
|
||||
payload_data += xobj->ToJsonStr();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ void PlayerMgr::Init()
|
||||
account_id_hash_[hum->GetAccountId()] = hum;
|
||||
socket_id_hash_[hum->GetSocketId()] = hum;
|
||||
++count;
|
||||
if (count >= 1) {
|
||||
if (count >= 3) {
|
||||
f8::Timer::Instance()->DeleteCurrentTimer();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user