This commit is contained in:
aozhiwei 2023-12-28 16:44:47 +08:00
parent 66a10b35db
commit 0eb7fca2b5
2 changed files with 6 additions and 14 deletions

View File

@ -5,17 +5,16 @@
int MobaTeam::GetMemberNum()
{
return 0;
return member_hash_.size();
}
void MobaTeam::TraverseMember(std::function<bool (std::shared_ptr<MobaMember>)> cb)
{
}
bool MobaBattle::CanAdd(const std::string& account_id, const std::string& session_id)
{
return true;
for (auto& pair : member_hash_) {
if (!cb(pair.second)) {
break;
}
}
}
std::shared_ptr<MobaTeam> MobaBattle::GetTeamByAccountId(const std::string& account_id)
@ -36,11 +35,6 @@ std::shared_ptr<MobaTeam> MobaBattle::GetTeamByTeamUuid(const std::string& team_
return itr != uuid_hash_.end() ? itr->second : nullptr;
}
bool MobaBattle::AllIsJoined()
{
return false;
}
int MobaBattle::GetMemberNum()
{
return member_id_hash_.size();

View File

@ -69,11 +69,9 @@ class MobaBattle
int GetNodeId() { return zone_id_; }
int GetStartTime() { return start_time_; }
void ParseResult(a8::XObject& obj);
bool CanAdd(const std::string& account_id, const std::string& session_id);
std::shared_ptr<MobaTeam> GetTeamByAccountId(const std::string& account_id);
std::shared_ptr<MobaMember> GetMemberByAccountId(const std::string& account_id);
std::shared_ptr<MobaTeam> GetTeamByTeamUuid(const std::string& team_uuid);
bool AllIsJoined();
int GetMemberNum();
int GetTeamNum();
void TraverseMemberList(std::function<bool (MobaMember*)> func);