This commit is contained in:
aozhiwei 2022-10-13 16:33:30 +08:00
parent a946159f12
commit afd51a7366
2 changed files with 11 additions and 6 deletions

View File

@ -120,9 +120,17 @@ bool MatchMgr::NeedMatch(const cs::CMJoin& msg)
msg.team_slot_num() < MAX_TEAM_NUM &&
msg.team_members().size() == msg.team_slot_num();
if (need) {
MatchTeam* team = GetTeam(msg.team_uuid());
if (team && !team->IsValidMember(msg)) {
need = false;
bool found = false;
for (int i = 0; i < msg.team_members().size(); ++i) {
if (msg.account_id() == msg.team_members(i).account_id()) {
found = true;
}
}
if (found) {
MatchTeam* team = GetTeam(msg.team_uuid());
if (team && !team->IsValidMember(msg)) {
need = false;
}
}
}
return need;

View File

@ -213,9 +213,6 @@ bool MatchTeam::IsRawMember(const std::string &account_id)
bool MatchTeam::IsValidMember(const cs::CMJoin& msg)
{
if (msg.team_members().size() <= 0) {
return false;
}
if (first_member_->msg->team_uuid() != msg.team_uuid()) {
return false;
}