This commit is contained in:
aozhiwei 2023-09-16 19:56:20 +08:00
parent 727a33a05a
commit 91e34c2200
2 changed files with 8 additions and 0 deletions

View File

@ -834,3 +834,9 @@ std::shared_ptr<CustomBattle> RoomMgr::GetCustomRoom(const std::string& room_uui
auto itr = custom_room_hash_.find(room_uuid);
return itr != custom_room_hash_.end() ? itr->second : nullptr;
}
std::shared_ptr<CustomBattle> RoomMgr::GetHisCustomRoom(const std::string& room_uuid)
{
auto itr = his_custom_room_hash_.find(room_uuid);
return itr != his_custom_room_hash_.end() ? itr->second : nullptr;
}

View File

@ -116,6 +116,7 @@ class RoomMgr : public a8::Singleton<RoomMgr>
void TeamRoomTimeOut(const std::string& team_uuid);
void AdjustCMJoin(cs::CMJoin* msg);
std::shared_ptr<CustomBattle> GetCustomRoom(const std::string& room_uuid);
std::shared_ptr<CustomBattle> GetHisCustomRoom(const std::string& room_uuid);
private:
int current_room_idx_ = 0;
@ -129,4 +130,5 @@ class RoomMgr : public a8::Singleton<RoomMgr>
std::map<std::string, int> gm_hash_;
std::map<std::string, std::map<std::string, long long>> team_room_hash_;
std::map<std::string, std::shared_ptr<CustomBattle>> custom_room_hash_;
std::map<std::string, std::shared_ptr<CustomBattle>> his_custom_room_hash_;
};