1
This commit is contained in:
parent
6967cb12a5
commit
b208d1b05e
@ -838,6 +838,70 @@ void RoomMgr::AdjustCMJoin(cs::CMJoin* msg)
|
|||||||
const mt::Map* map_meta = mt::Map::GetById(msg->mapid());
|
const mt::Map* map_meta = mt::Map::GetById(msg->mapid());
|
||||||
if (map_meta && map_meta->is_moba()) {
|
if (map_meta && map_meta->is_moba()) {
|
||||||
msg->set_room_mode(kMobaMode);
|
msg->set_room_mode(kMobaMode);
|
||||||
|
#if 1
|
||||||
|
{
|
||||||
|
auto data = a8::MutableXObject::CreateObject();
|
||||||
|
data->SetVal("zone_id", 1);
|
||||||
|
data->SetVal("node_id", 1);
|
||||||
|
data->SetVal("room_uuid", f8::App::Instance()->NewGlobalUuid());
|
||||||
|
data->SetVal("start_time", f8::App::Instance()->GetNowTime());
|
||||||
|
auto team_list = a8::MutableXObject::CreateArray();
|
||||||
|
{
|
||||||
|
std::map<std::string, std::string> test_members;
|
||||||
|
test_members[msg->account_id()] = msg->session_id();
|
||||||
|
auto team = a8::MutableXObject::CreateObject();
|
||||||
|
auto members = a8::MutableXObject::CreateArray();
|
||||||
|
team->SetVal("team_uuid", f8::App::Instance()->NewGlobalUuid());
|
||||||
|
for (auto& pair : test_members) {
|
||||||
|
auto member = a8::MutableXObject::CreateObject();
|
||||||
|
member->SetVal("account_id", pair.first);
|
||||||
|
//member->SetVal("session_id", pair.second);
|
||||||
|
members->Push(*member.get());
|
||||||
|
}
|
||||||
|
team->SetVal("members", *members.get());
|
||||||
|
team_list->Push(*team.get());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::string test_account_id = "6513_2006_2";
|
||||||
|
std::map<std::string, std::string> test_members;
|
||||||
|
test_members[test_account_id] = test_account_id;
|
||||||
|
auto team = a8::MutableXObject::CreateObject();
|
||||||
|
auto members = a8::MutableXObject::CreateArray();
|
||||||
|
team->SetVal("team_uuid", f8::App::Instance()->NewGlobalUuid());
|
||||||
|
for (auto& pair : test_members) {
|
||||||
|
auto member = a8::MutableXObject::CreateObject();
|
||||||
|
member->SetVal("account_id", pair.first);
|
||||||
|
//member->SetVal("session_id", pair.second);
|
||||||
|
members->Push(*member.get());
|
||||||
|
}
|
||||||
|
team->SetVal("members", *members.get());
|
||||||
|
team_list->Push(*team.get());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::string test_account_id = "6513_2006_3";
|
||||||
|
std::map<std::string, std::string> test_members;
|
||||||
|
test_members[test_account_id] = test_account_id;
|
||||||
|
auto team = a8::MutableXObject::CreateObject();
|
||||||
|
auto members = a8::MutableXObject::CreateArray();
|
||||||
|
team->SetVal("team_uuid", f8::App::Instance()->NewGlobalUuid());
|
||||||
|
for (auto& pair : test_members) {
|
||||||
|
auto member = a8::MutableXObject::CreateObject();
|
||||||
|
member->SetVal("account_id", pair.first);
|
||||||
|
//member->SetVal("session_id", pair.second);
|
||||||
|
members->Push(*member.get());
|
||||||
|
}
|
||||||
|
team->SetVal("members", *members.get());
|
||||||
|
team_list->Push(*team.get());
|
||||||
|
}
|
||||||
|
data->SetVal("team_list", *team_list.get());
|
||||||
|
{
|
||||||
|
std::string custom_data = a8::openssl::md5
|
||||||
|
(data->ToJsonStr() + "520d8eAbB(8cf1^#$^&!@d833a42c820432PDAFE^^)") + ":moba_room|" +
|
||||||
|
data->ToJsonStr();
|
||||||
|
msg->set_payload_data(custom_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user