1
This commit is contained in:
parent
eb80584ea0
commit
3a5cd46128
@ -128,6 +128,11 @@ int CustomBattle::GetMemberNum()
|
|||||||
return member_id_hash_.size();
|
return member_id_hash_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CustomBattle::GetTeamNum()
|
||||||
|
{
|
||||||
|
return uuid_hash_.size();
|
||||||
|
}
|
||||||
|
|
||||||
void CustomBattle::TraverseMemberList(std::function<bool (CustomMember*)> func)
|
void CustomBattle::TraverseMemberList(std::function<bool (CustomMember*)> func)
|
||||||
{
|
{
|
||||||
for (auto& pair : member_id_hash_) {
|
for (auto& pair : member_id_hash_) {
|
||||||
|
@ -27,6 +27,7 @@ class CustomBattle
|
|||||||
std::shared_ptr<CustomTeam> GetTeamByTeamUuid(const std::string& team_uuid);
|
std::shared_ptr<CustomTeam> GetTeamByTeamUuid(const std::string& team_uuid);
|
||||||
bool AllIsJoined();
|
bool AllIsJoined();
|
||||||
int GetMemberNum();
|
int GetMemberNum();
|
||||||
|
int GetTeamNum();
|
||||||
void TraverseMemberList(std::function<bool (CustomMember*)> func);
|
void TraverseMemberList(std::function<bool (CustomMember*)> func);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -2701,6 +2701,12 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Room::InitWithCustomBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
||||||
|
std::shared_ptr<CustomBattle> p)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void SyncObject::FillSMSyncPosition(cs::SMSyncPosition& sync_msg)
|
void SyncObject::FillSMSyncPosition(cs::SMSyncPosition& sync_msg)
|
||||||
{
|
{
|
||||||
if (!c.Get()) {
|
if (!c.Get()) {
|
||||||
|
@ -286,6 +286,8 @@ public:
|
|||||||
int GenShotUniid() { return ++current_shot_uniid_; }
|
int GenShotUniid() { return ++current_shot_uniid_; }
|
||||||
int InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
int InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
||||||
std::shared_ptr<MobaBattle> p);
|
std::shared_ptr<MobaBattle> p);
|
||||||
|
int InitWithCustomBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
||||||
|
std::shared_ptr<CustomBattle> p);
|
||||||
void CreateAndroid(int android_num, std::shared_ptr<Team> team = nullptr);
|
void CreateAndroid(int android_num, std::shared_ptr<Team> team = nullptr);
|
||||||
int GetFullLevelIdx() { return ++curr_full_level_idx_;}
|
int GetFullLevelIdx() { return ++curr_full_level_idx_;}
|
||||||
std::shared_ptr<RoomOb> GetRoomOb();
|
std::shared_ptr<RoomOb> GetRoomOb();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user