This commit is contained in:
azw 2023-11-08 10:03:04 +00:00
commit 4f822967d4
4 changed files with 8 additions and 8 deletions

View File

@ -434,7 +434,7 @@ namespace mtb
{ {
std::shared_ptr<a8::reflect::Class> meta_class = nullptr; std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
if (!meta_class) { if (!meta_class) {
meta_class = new a8::reflect::Class("SkillNumber", 29, 0); meta_class = std::make_shared<a8::reflect::Class>("SkillNumber", 29, 0);
meta_class->SetSimpleField(0, "skill_id", a8::reflect::ET_INT32, my_offsetof2(SkillNumber, skill_id_)); 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(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_)); meta_class->SetSimpleField(2, "number", a8::reflect::ET_FLOAT, my_offsetof2(SkillNumber, number_));

View File

@ -362,7 +362,7 @@ std::shared_ptr<Room> RoomMgr::GetJoinableRoom(MatchTeam* team)
nullptr); nullptr);
} }
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);
return itr != room_hash_.end() ? itr->second : nullptr; return itr != room_hash_.end() ? itr->second : nullptr;

View File

@ -78,7 +78,7 @@ class RoomMgr : public a8::Singleton<RoomMgr>
void ActiveRoom(const std::string& room_uuid); void ActiveRoom(const std::string& room_uuid);
int RoomNum(); int RoomNum();
int OverRoomNum(); int OverRoomNum();
Room* GetRoomByUuid(const std::string& uuid); std::shared_ptr<Room> GetRoomByUuid(const std::string& uuid);
void AddOverRoom(const std::string& room_uuid); void AddOverRoom(const std::string& room_uuid);
bool IsGM(const std::string& account_id); bool IsGM(const std::string& account_id);
void JoinTeam(MatchTeam* team); void JoinTeam(MatchTeam* team);
@ -127,10 +127,10 @@ class RoomMgr : public a8::Singleton<RoomMgr>
int current_room_idx_ = 0; int current_room_idx_ = 0;
int match_mode_ = 0; int match_mode_ = 0;
std::map<std::string, Room*> inactive_room_hash_; std::map<std::string, std::shared_ptr<Room>> inactive_room_hash_;
std::map<std::string, Room*> room_hash_; std::map<std::string, std::shared_ptr<Room>> room_hash_;
std::map<int, Room*> room_idx_hash_; std::map<int, std::shared_ptr<Room>> room_idx_hash_;
std::map<std::string, Room*> over_room_hash_; std::map<std::string, std::shared_ptr<Room>> over_room_hash_;
f8::Attacher reportstate_timer_attacher_; f8::Attacher reportstate_timer_attacher_;
std::map<std::string, int> gm_hash_; std::map<std::string, int> gm_hash_;
std::map<std::string, std::map<std::string, std::string>> team_room_hash_; std::map<std::string, std::map<std::string, std::string>> team_room_hash_;

2
third_party/f8 vendored

@ -1 +1 @@
Subproject commit f856de73d2a3087289495690e3ea9bd7b1aa79ef Subproject commit 7fb9c9083275fd35c2bb4456999673444dcfe986