diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 96801d91..df186a52 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -834,3 +834,9 @@ std::shared_ptr 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 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; +} diff --git a/server/gameserver/roommgr.h b/server/gameserver/roommgr.h index 34dee96e..ae44f3be 100644 --- a/server/gameserver/roommgr.h +++ b/server/gameserver/roommgr.h @@ -116,6 +116,7 @@ class RoomMgr : public a8::Singleton void TeamRoomTimeOut(const std::string& team_uuid); void AdjustCMJoin(cs::CMJoin* msg); std::shared_ptr GetCustomRoom(const std::string& room_uuid); + std::shared_ptr GetHisCustomRoom(const std::string& room_uuid); private: int current_room_idx_ = 0; @@ -129,4 +130,5 @@ class RoomMgr : public a8::Singleton std::map gm_hash_; std::map> team_room_hash_; std::map> custom_room_hash_; + std::map> his_custom_room_hash_; };