1
This commit is contained in:
parent
a946159f12
commit
afd51a7366
@ -120,9 +120,17 @@ bool MatchMgr::NeedMatch(const cs::CMJoin& msg)
|
|||||||
msg.team_slot_num() < MAX_TEAM_NUM &&
|
msg.team_slot_num() < MAX_TEAM_NUM &&
|
||||||
msg.team_members().size() == msg.team_slot_num();
|
msg.team_members().size() == msg.team_slot_num();
|
||||||
if (need) {
|
if (need) {
|
||||||
MatchTeam* team = GetTeam(msg.team_uuid());
|
bool found = false;
|
||||||
if (team && !team->IsValidMember(msg)) {
|
for (int i = 0; i < msg.team_members().size(); ++i) {
|
||||||
need = false;
|
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;
|
return need;
|
||||||
|
@ -213,9 +213,6 @@ bool MatchTeam::IsRawMember(const std::string &account_id)
|
|||||||
|
|
||||||
bool MatchTeam::IsValidMember(const cs::CMJoin& msg)
|
bool MatchTeam::IsValidMember(const cs::CMJoin& msg)
|
||||||
{
|
{
|
||||||
if (msg.team_members().size() <= 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (first_member_->msg->team_uuid() != msg.team_uuid()) {
|
if (first_member_->msg->team_uuid() != msg.team_uuid()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user