1
This commit is contained in:
parent
be0b12da9d
commit
49aedf5f62
@ -50,6 +50,24 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
|
||||
return RT_MidBrid;
|
||||
}
|
||||
}
|
||||
if (!msg.team_uuid().empty()) {
|
||||
bool has_mid_brid = false;
|
||||
bool has_old_brid1 = false;
|
||||
for (auto& team_member : msg.team_members()) {
|
||||
if (team_member.game_times() >= 1 && team_member.game_times() <= 1) {
|
||||
has_mid_brid = true;
|
||||
}
|
||||
if (team_member.game_times() >= 2 && team_member.game_times() <= 2) {
|
||||
has_old_brid1 = true;
|
||||
}
|
||||
}
|
||||
if (has_mid_brid) {
|
||||
return RT_MidBrid;
|
||||
}
|
||||
if (has_old_brid1) {
|
||||
return RT_OldBrid1;
|
||||
}
|
||||
}
|
||||
|
||||
if (game_times <= 0) {
|
||||
return RT_NewBrid;
|
||||
@ -58,13 +76,11 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
|
||||
} else {
|
||||
switch (game_times) {
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
{
|
||||
if (msg.team_uuid().empty()) {
|
||||
return RT_NewBrid;
|
||||
} else {
|
||||
return RT_MidBrid;
|
||||
return RT_OldBrid1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -74,21 +90,9 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!msg.team_uuid().empty()) {
|
||||
bool has_mid_brid = false;
|
||||
for (auto& team_member : msg.team_members()) {
|
||||
if (team_member.game_times() >= 1 && team_member.game_times() <= 4) {
|
||||
has_mid_brid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (has_mid_brid) {
|
||||
return RT_MidBrid;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
time_t register_time = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
|
||||
#if 1
|
||||
if (!msg.team_uuid().empty()) {
|
||||
bool has_new_brid = false;
|
||||
for (auto& team_member : msg.team_members()) {
|
||||
@ -113,12 +117,8 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
|
||||
#else
|
||||
if (rank >= 0 && rank <= 10) {
|
||||
return RT_OldBrid1;
|
||||
} else if (rank >= 11 && rank <= 17) {
|
||||
return RT_OldBrid2;
|
||||
} else if (rank >= 18) {
|
||||
return RT_OldBrid3;
|
||||
} else {
|
||||
return RT_OldBrid1;
|
||||
return RT_OldBrid2;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user