1
This commit is contained in:
parent
0a50e4ae91
commit
45b58339cb
@ -334,6 +334,16 @@ std::shared_ptr<Room> RoomMgr::GetJoinableRoom(const cs::CMJoin& msg,
|
|||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<Room> RoomMgr::GetJoinableRoom(std::shared_ptr<CustomBattle> custom_battle,
|
||||||
|
const RoomType_e self_room_type,
|
||||||
|
int game_times,
|
||||||
|
int creator_register_time,
|
||||||
|
int proto_version,
|
||||||
|
int channel)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<Room> RoomMgr::GetRoomByUuid(const std::string& room_uuid)
|
std::shared_ptr<Room> RoomMgr::GetRoomByUuid(const std::string& room_uuid)
|
||||||
{
|
{
|
||||||
auto itr = room_hash_.find(room_uuid);
|
auto itr = room_hash_.find(room_uuid);
|
||||||
@ -1015,6 +1025,9 @@ void RoomMgr::_CMJoinCustomBattle(f8::MsgHdr* hdr, const cs::CMJoin& msg, int cu
|
|||||||
int proto_version = msg.proto_version();
|
int proto_version = msg.proto_version();
|
||||||
int channel = f8::ExtractChannelIdFromAccountId(msg.account_id());
|
int channel = f8::ExtractChannelIdFromAccountId(msg.account_id());
|
||||||
std::shared_ptr<Room> room = nullptr;
|
std::shared_ptr<Room> room = nullptr;
|
||||||
|
if (p->IsNormalMode()) {
|
||||||
|
|
||||||
|
} else {
|
||||||
if (p->IsPvp()) {
|
if (p->IsPvp()) {
|
||||||
room = RoomMgr::Instance()->CreateRoom
|
room = RoomMgr::Instance()->CreateRoom
|
||||||
(*join_msg,
|
(*join_msg,
|
||||||
@ -1038,6 +1051,7 @@ void RoomMgr::_CMJoinCustomBattle(f8::MsgHdr* hdr, const cs::CMJoin& msg, int cu
|
|||||||
}
|
}
|
||||||
p->SetRoom(room.get());
|
p->SetRoom(room.get());
|
||||||
room->InitWithCustomBattle(ip_saddr, socket_handle, join_msg, p);
|
room->InitWithCustomBattle(ip_saddr, socket_handle, join_msg, p);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
SendGetCustomBattleData(join_msg, cb, custom_room_type);
|
SendGetCustomBattleData(join_msg, cb, custom_room_type);
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,12 @@ class RoomMgr : public a8::Singleton<RoomMgr>
|
|||||||
int creator_register_time,
|
int creator_register_time,
|
||||||
int proto_version,
|
int proto_version,
|
||||||
int channel);
|
int channel);
|
||||||
|
std::shared_ptr<Room> GetJoinableRoom(std::shared_ptr<CustomBattle> custom_battle,
|
||||||
|
const RoomType_e self_room_type,
|
||||||
|
int game_times,
|
||||||
|
int creator_register_time,
|
||||||
|
int proto_version,
|
||||||
|
int channel);
|
||||||
void ReportServerState(int instance_id, const std::string& host, int port);
|
void ReportServerState(int instance_id, const std::string& host, int port);
|
||||||
void FreeOverRoom(const std::string& room_uuid);
|
void FreeOverRoom(const std::string& room_uuid);
|
||||||
bool IsLimitJoin();
|
bool IsLimitJoin();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user