diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 0f4ed2d..03768c3 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -44,9 +44,6 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times) #endif if (!msg.team_uuid().empty()) { - if (RoomMgr::Instance()->IsProtectTeam(msg.team_uuid())) { - return RT_MidBrid; - } bool has_mid_brid = false; bool has_old_brid1 = false; bool has_old_brid2 = false; @@ -98,36 +95,11 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times) } } -#if 0 - time_t register_time = f8::ExtractRegisterTimeFromSessionId(msg.session_id()); - if (!msg.team_uuid().empty()) { - bool has_new_brid = false; - for (auto& team_member : msg.team_members()) { - if (team_member.create_time() != 0 && - a8::BetweenDays(Global::g_nowtime, team_member.create_time()) <= 0) { - has_new_brid = true; - break; - } - } - if (has_new_brid) { - return RT_OldBrid1; - } else { - return RT_OldBrid2; - } - } else { - if (a8::BetweenDays(Global::g_nowtime, register_time) <= 0) { - return RT_OldBrid1; - } else { - return RT_OldBrid2; - } - } -#else if (rank >= 0 && rank <= 6) { return RT_OldBrid1; } else { return RT_OldBrid2; } -#endif } void RoomMgr::Init() @@ -511,23 +483,3 @@ bool RoomMgr::IsGM(const cs::CMJoin& msg) } return false; } - -void RoomMgr::AddProtectTeam(const std::string& team_uuid) -{ - protect_team_hash_[team_uuid] = 1; - a8::Timer::Instance()->AddDeadLineTimer - ( - 1000 * 30, - a8::XParams() - .SetSender(team_uuid), - [] (const a8::XParams& param) - { - RoomMgr::Instance()->protect_team_hash_.erase(param.sender.GetString()); - } - ); -} - -bool RoomMgr::IsProtectTeam(const std::string& team_uuid) -{ - return protect_team_hash_.find(team_uuid) != protect_team_hash_.end(); -} diff --git a/server/gameserver/roommgr.h b/server/gameserver/roommgr.h index 0e435de..bb6a369 100644 --- a/server/gameserver/roommgr.h +++ b/server/gameserver/roommgr.h @@ -29,8 +29,6 @@ class RoomMgr : public a8::Singleton Room* GetRoomByUuid(long long uuid); void AddOverRoom(long long room_uuid); bool IsGM(const cs::CMJoin& msg); - void AddProtectTeam(const std::string& team_uuid); - bool IsProtectTeam(const std::string& team_uuid); private: void InstallReportStateTimer(); @@ -60,5 +58,4 @@ class RoomMgr : public a8::Singleton std::map over_room_hash_; a8::TimerAttacher reportstate_timer_attacher_; std::map gm_hash_; - std::map protect_team_hash_; };