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 ROOM_NUM_UP_LIMIT = 1000;
|
||||||
static const int HUM_NUM_DOWN_LIMIT = 2500;
|
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)
|
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) {
|
msg.payload_data().size() < 10) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (msg.payload_data().at(0) == '?') {
|
auto pos = msg.payload_data().find('|');
|
||||||
switch (msg.payload_data().at(1)) {
|
std::string head;
|
||||||
case CUSTOM_ROOM_TYPE:
|
std::string body;
|
||||||
{
|
if (pos == std::string::npos) {
|
||||||
_CMJoinCustomBattle(hdr, msg);
|
return;
|
||||||
}
|
}
|
||||||
break;
|
head = msg.payload_data().substr(0, pos);
|
||||||
case MOBA_ROOM_TYPE:
|
std::vector<std::string> strings;
|
||||||
{
|
a8::Split(head, strings, ':');
|
||||||
_CMJoinMoba(hdr, msg);
|
if (strings.size() > 1) {
|
||||||
}
|
if (strings.at(1) == "custom_room") {
|
||||||
break;
|
_CMJoinCustomBattle(hdr, msg);
|
||||||
default:
|
} else if (strings.at(1) == "moba_room") {
|
||||||
{
|
_CMJoinMoba(hdr, msg);
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_CMJoinCustomBattle(hdr, msg);
|
_CMJoinCustomBattle(hdr, msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user