game2006/server/gameserver/custom_team.h
aozhiwei 2dd720af02 1
2024-03-25 20:45:49 +08:00

24 lines
669 B
C++

#pragma once
class CustomMember;
class CustomBattle;
class CustomTeam
{
public:
const std::string& GetTeamUuid() { return team_uuid_; }
std::shared_ptr<CustomMember> GetMember(const std::string& account_id);
bool IsView() { return is_view_; }
void TraverseMember(std::function<bool (std::shared_ptr<CustomMember>)> cb);
int GetMemberNum();
int GetAverageHeroLv();
CustomBattle* GetCustomBattle() { return custom_battle_; }
private:
CustomBattle* custom_battle_ = nullptr;
std::string team_uuid_;
bool is_view_ = false;
std::map<std::string, std::shared_ptr<CustomMember>> member_hash_;
friend class CustomBattle;
};