33 lines
578 B
C++
33 lines
578 B
C++
#pragma once
|
|
|
|
namespace cs
|
|
{
|
|
class CMJoin;
|
|
}
|
|
|
|
class Room;
|
|
class RoomMgr : public a8::Singleton<RoomMgr>
|
|
{
|
|
public:
|
|
enum { HID = HID_RoomMgr };
|
|
|
|
private:
|
|
RoomMgr() {};
|
|
friend class a8::Singleton<RoomMgr>;
|
|
|
|
public:
|
|
void Init();
|
|
void UnInit();
|
|
void Update(int delta_time);
|
|
|
|
void _CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg);
|
|
|
|
private:
|
|
Room* GetJoinableRoom(const std::string& account_id);
|
|
Room* GetRoomByUuid(long long uuid);
|
|
|
|
private:
|
|
std::map<long long, Room*> inactive_room_hash_;
|
|
std::map<long long, Room*> room_hash_;
|
|
};
|