1
This commit is contained in:
parent
4059d50c19
commit
08bf0782d5
@ -4,32 +4,35 @@
|
|||||||
|
|
||||||
bool MobaBattle::CanAdd(const std::string& account_id, const std::string& session_id)
|
bool MobaBattle::CanAdd(const std::string& account_id, const std::string& session_id)
|
||||||
{
|
{
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<MobaTeam> MobaBattle::GetTeamByAccountId(const std::string& account_id)
|
std::shared_ptr<MobaTeam> MobaBattle::GetTeamByAccountId(const std::string& account_id)
|
||||||
{
|
{
|
||||||
|
auto itr = account_hash_.find(account_id);
|
||||||
|
return itr != account_hash_.end() ? itr->second : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<MobaMember> MobaBattle::GetMemberByAccountId(const std::string& account_id)
|
std::shared_ptr<MobaMember> MobaBattle::GetMemberByAccountId(const std::string& account_id)
|
||||||
{
|
{
|
||||||
|
auto itr = member_id_hash_.find(account_id);
|
||||||
|
return itr != member_id_hash_.end() ? itr->second : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<MobaTeam> MobaBattle::GetTeamByTeamUuid(const std::string& team_uuid)
|
std::shared_ptr<MobaTeam> MobaBattle::GetTeamByTeamUuid(const std::string& team_uuid)
|
||||||
{
|
{
|
||||||
|
auto itr = uuid_hash_.find(team_uuid);
|
||||||
|
return itr != uuid_hash_.end() ? itr->second : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MobaBattle::AllIsJoined()
|
bool MobaBattle::AllIsJoined()
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MobaBattle::GetMemberNum()
|
int MobaBattle::GetMemberNum()
|
||||||
{
|
{
|
||||||
|
return member_id_hash_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MobaBattle::TraverseMemberList(std::function<bool (MobaMember*)> func)
|
void MobaBattle::TraverseMemberList(std::function<bool (MobaMember*)> func)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user