This commit is contained in:
aozhiwei 2024-03-16 14:13:53 +08:00
parent 9c81c17c9a
commit 4b91640ad9
2 changed files with 0 additions and 13 deletions

View File

@ -136,18 +136,6 @@ void CustomBattle::ParseResult(a8::XObject& obj)
parse_ok_ = true; parse_ok_ = true;
} }
bool CustomBattle::CanAdd(const std::string& account_id, const std::string& session_id)
{
auto member = GetMemberByAccountId(account_id);
if (!member) {
return false;
}
if (member->IsJoined()) {
return false;
}
return true;
}
std::shared_ptr<CustomMember> CustomBattle::GetMemberByAccountId(const std::string& account_id) std::shared_ptr<CustomMember> CustomBattle::GetMemberByAccountId(const std::string& account_id)
{ {
auto itr = member_id_hash_.find(account_id); auto itr = member_id_hash_.find(account_id);

View File

@ -25,7 +25,6 @@ class CustomBattle
int GetNodeId() { return zone_id_; } int GetNodeId() { return zone_id_; }
int GetStartTime() { return start_time_; } int GetStartTime() { return start_time_; }
void ParseResult(a8::XObject& obj); void ParseResult(a8::XObject& obj);
bool CanAdd(const std::string& account_id, const std::string& session_id);
std::shared_ptr<CustomTeam> GetTeamByAccountId(const std::string& account_id); std::shared_ptr<CustomTeam> GetTeamByAccountId(const std::string& account_id);
std::shared_ptr<CustomMember> GetMemberByAccountId(const std::string& account_id); std::shared_ptr<CustomMember> GetMemberByAccountId(const std::string& account_id);
std::shared_ptr<CustomTeam> GetTeamByTeamUuid(const std::string& team_uuid); std::shared_ptr<CustomTeam> GetTeamByTeamUuid(const std::string& team_uuid);