diff --git a/server/robotserver/android_agent.cc b/server/robotserver/android_agent.cc index a09f2ba4..baea43a2 100644 --- a/server/robotserver/android_agent.cc +++ b/server/robotserver/android_agent.cc @@ -168,6 +168,19 @@ behaviac::EBTStatus AndroidAgent::CoConnectBattleServer() behaviac::EBTStatus AndroidAgent::CoJoin() { cs::CMJoin msg; + msg.set_server_id(1); + msg.set_team_uuid(""); + msg.set_account_id(owner_->GetAccountId()); + msg.set_team_mode(2); + msg.set_proto_version(cs::ProtoVersion); + msg.set_auto_fill(1); + msg.set_name(""); + msg.set_avatar_url(""); + //weapons + msg.set_session_id(owner_->GetSessionId()); + owner_->SendMsg(msg); + + a8::XPrintf("CoJoin\n", {}); return behaviac::BT_SUCCESS; } diff --git a/server/robotserver/player.h b/server/robotserver/player.h index 6dd691a1..b37673af 100644 --- a/server/robotserver/player.h +++ b/server/robotserver/player.h @@ -30,6 +30,7 @@ public: int GetSocketId() { return socket_handle_; } bool NetConnected() { return net_connected_; } const std::string& GetAccountId() { return account_id_; } + const std::string& GetSessionId() { return session_id_; } auto GetWebSocket() { return web_socket_; } int GetIdx() { return idx_; } void SetLoginSucess();