1
This commit is contained in:
parent
4df601f35d
commit
6967cb12a5
@ -42,8 +42,6 @@
|
||||
|
||||
static const int ROOM_NUM_UP_LIMIT = 1000;
|
||||
static const int HUM_NUM_DOWN_LIMIT = 2500;
|
||||
static const char CUSTOM_ROOM_TYPE = '1';
|
||||
static const char MOBA_ROOM_TYPE = '2';
|
||||
|
||||
static RoomType_e GetHumanRoomType(const std::shared_ptr<BattleDataContext> netdata)
|
||||
{
|
||||
@ -1210,23 +1208,20 @@ void RoomMgr::DispatchSpecRoom(f8::MsgHdr* hdr, const cs::CMJoin& msg)
|
||||
msg.payload_data().size() < 10) {
|
||||
return;
|
||||
}
|
||||
if (msg.payload_data().at(0) == '?') {
|
||||
switch (msg.payload_data().at(1)) {
|
||||
case CUSTOM_ROOM_TYPE:
|
||||
{
|
||||
_CMJoinCustomBattle(hdr, msg);
|
||||
}
|
||||
break;
|
||||
case MOBA_ROOM_TYPE:
|
||||
{
|
||||
_CMJoinMoba(hdr, msg);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
auto pos = msg.payload_data().find('|');
|
||||
std::string head;
|
||||
std::string body;
|
||||
if (pos == std::string::npos) {
|
||||
return;
|
||||
}
|
||||
head = msg.payload_data().substr(0, pos);
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(head, strings, ':');
|
||||
if (strings.size() > 1) {
|
||||
if (strings.at(1) == "custom_room") {
|
||||
_CMJoinCustomBattle(hdr, msg);
|
||||
} else if (strings.at(1) == "moba_room") {
|
||||
_CMJoinMoba(hdr, msg);
|
||||
}
|
||||
} else {
|
||||
_CMJoinCustomBattle(hdr, msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user