diff --git a/server/gameserver/mtb/mtb.all.cc b/server/gameserver/mtb/mtb.all.cc index bd81ee49..dea3990b 100644 --- a/server/gameserver/mtb/mtb.all.cc +++ b/server/gameserver/mtb/mtb.all.cc @@ -434,7 +434,7 @@ namespace mtb { std::shared_ptr meta_class = nullptr; if (!meta_class) { - meta_class = new a8::reflect::Class("SkillNumber", 29, 0); + meta_class = std::make_shared("SkillNumber", 29, 0); meta_class->SetSimpleField(0, "skill_id", a8::reflect::ET_INT32, my_offsetof2(SkillNumber, skill_id_)); meta_class->SetSimpleField(1, "skill_type", a8::reflect::ET_INT32, my_offsetof2(SkillNumber, skill_type_)); meta_class->SetSimpleField(2, "number", a8::reflect::ET_FLOAT, my_offsetof2(SkillNumber, number_)); diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index c2f5ee27..cf1900a3 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -362,7 +362,7 @@ std::shared_ptr RoomMgr::GetJoinableRoom(MatchTeam* team) nullptr); } -Room* RoomMgr::GetRoomByUuid(const std::string& room_uuid) +std::shared_ptr RoomMgr::GetRoomByUuid(const std::string& room_uuid) { auto itr = room_hash_.find(room_uuid); return itr != room_hash_.end() ? itr->second : nullptr; diff --git a/server/gameserver/roommgr.h b/server/gameserver/roommgr.h index 4852638c..f2e2ff3d 100644 --- a/server/gameserver/roommgr.h +++ b/server/gameserver/roommgr.h @@ -78,7 +78,7 @@ class RoomMgr : public a8::Singleton void ActiveRoom(const std::string& room_uuid); int RoomNum(); int OverRoomNum(); - Room* GetRoomByUuid(const std::string& uuid); + std::shared_ptr GetRoomByUuid(const std::string& uuid); void AddOverRoom(const std::string& room_uuid); bool IsGM(const std::string& account_id); void JoinTeam(MatchTeam* team); @@ -127,10 +127,10 @@ class RoomMgr : public a8::Singleton int current_room_idx_ = 0; int match_mode_ = 0; - std::map inactive_room_hash_; - std::map room_hash_; - std::map room_idx_hash_; - std::map over_room_hash_; + std::map> inactive_room_hash_; + std::map> room_hash_; + std::map> room_idx_hash_; + std::map> over_room_hash_; f8::Attacher reportstate_timer_attacher_; std::map gm_hash_; std::map> team_room_hash_; diff --git a/third_party/f8 b/third_party/f8 index f856de73..7fb9c908 160000 --- a/third_party/f8 +++ b/third_party/f8 @@ -1 +1 @@ -Subproject commit f856de73d2a3087289495690e3ea9bd7b1aa79ef +Subproject commit 7fb9c9083275fd35c2bb4456999673444dcfe986