Merge branch 'new_dev' of git.kingsome.cn:server/game2006 into new_dev
This commit is contained in:
commit
bc6ffe3eec
@ -8,6 +8,7 @@
|
||||
|
||||
#include <f8/btmgr.h>
|
||||
#include <f8/udplog.h>
|
||||
#include <f8/app.h>
|
||||
|
||||
#include "android_agent.h"
|
||||
#include "player.h"
|
||||
@ -163,7 +164,7 @@ behaviac::EBTStatus AndroidAgent::CoConnectBattleServer()
|
||||
owner_->GetWebSocket()->on_connect =
|
||||
[this, context] (a8::WebSocketClient* )
|
||||
{
|
||||
//a8::XPrintf("id:%d WebSocketClient on_connect\n", {context->socket_id});
|
||||
a8::XPrintf("id:%d WebSocketClient on_connect\n", {context->socket_id});
|
||||
context->pending = false;
|
||||
context->connect_ok = true;
|
||||
};
|
||||
@ -200,11 +201,31 @@ behaviac::EBTStatus AndroidAgent::CoJoin()
|
||||
PRE_ENTER_COROUTINE();
|
||||
cs::CMJoin msg;
|
||||
msg.set_server_id(6);
|
||||
msg.set_team_uuid("");
|
||||
msg.set_team_uuid("ihCQQdNzoYFC^6q4ohsao39br%Ui!C9u2d^qvzek5hOB$3q1");
|
||||
msg.set_account_id(owner_->GetAccountId());
|
||||
msg.set_proto_version(cs::ProtoVersion);
|
||||
//weapons
|
||||
msg.set_session_id(owner_->GetSessionId());
|
||||
msg.set_proto_version(cs::ProtoVersion);
|
||||
std::string payload_data = "ihCQQdNzoYFC^6q4ohsao39br%Ui!C9u2d^qvzek5hOB$3q1:|";
|
||||
{
|
||||
auto xobj = a8::MutableXObject::CreateObject();
|
||||
auto team_list = a8::MutableXObject::CreateArray();
|
||||
{
|
||||
auto team = a8::MutableXObject::CreateObject();
|
||||
auto member_list = a8::MutableXObject::CreateArray();
|
||||
auto member = a8::MutableXObject::CreateObject();
|
||||
member->SetVal("account_id", owner_->GetAccountId());
|
||||
member->SetVal("session_id", owner_->GetSessionId());
|
||||
member_list->Push(*member.get());
|
||||
|
||||
team->SetVal("team_uuid", f8::App::Instance()->NewGlobalUuid());
|
||||
team->SetVal("members", *member_list.get());
|
||||
|
||||
team_list->Push(*team.get());
|
||||
}
|
||||
xobj->SetVal("team_list", *team_list.get());
|
||||
payload_data += xobj->ToJsonStr();
|
||||
}
|
||||
msg.set_payload_data(payload_data);
|
||||
owner_->SendMsg(msg);
|
||||
|
||||
//a8::XPrintf("CoJoin %d\n", {owner_->GetSocketId()});
|
||||
|
Loading…
x
Reference in New Issue
Block a user