This commit is contained in:
aozhiwei 2023-09-23 17:06:57 +08:00
parent 3909891484
commit 814abfe4d0
3 changed files with 9 additions and 0 deletions

View File

@ -119,3 +119,8 @@ bool CustomBattle::AllIsJoined()
}
return ok;
}
int CustomBattle::GetMemberNum()
{
return member_id_hash_.size();
}

View File

@ -25,6 +25,7 @@ class CustomBattle
std::shared_ptr<CustomMember> GetMemberByAccountId(const std::string& account_id);
std::shared_ptr<CustomTeam> GetTeamByTeamUuid(const std::string& team_uuid);
bool AllIsJoined();
int GetMemberNum();
private:
bool parse_ok_ = false;

View File

@ -2696,6 +2696,9 @@ size_t Room::GetRoomMaxPlayerNum()
if (IsNewBieRoom()) {
return 1;
}
if (custom_battle_) {
return custom_battle_->GetMemberNum();
}
return map_meta_->player();
}