This commit is contained in:
aozhiwei 2023-07-20 11:01:18 +08:00
parent 2e77222302
commit 973984bb7b
3 changed files with 17 additions and 6 deletions

View File

@ -285,4 +285,9 @@ namespace mt
return 0; return 0;
} }
std::tuple<int, int, int, int>* Param::GetRankModeConf(int elo)
{
return nullptr;
}
} }

View File

@ -125,6 +125,7 @@ namespace mt
int revive_count = 1; int revive_count = 1;
int pvp_revive_time = 10; int pvp_revive_time = 10;
std::vector<std::tuple<int, int, int, int>> rank_mode_confs;
}; };
static void StaticPostInit(); static void StaticPostInit();
static const S& s() { return s_; }; static const S& s() { return s_; };
@ -133,6 +134,7 @@ namespace mt
static double GetFloatParam(const std::string& param_name, double def_val = 0.0f); static double GetFloatParam(const std::string& param_name, double def_val = 0.0f);
static std::string GetStringParam(const std::string& param_name, const char* def_val = ""); static std::string GetStringParam(const std::string& param_name, const char* def_val = "");
static int GetStarNum(int rank); static int GetStarNum(int rank);
static std::tuple<int, int, int, int>* GetRankModeConf(int elo);
private: private:
static S s_; static S s_;

View File

@ -38,13 +38,17 @@ const int HUM_NUM_DOWN_LIMIT = 2500;
static RoomType_e GetHumanRoomType(const std::shared_ptr<BattleDataContext> netdata) static RoomType_e GetHumanRoomType(const std::shared_ptr<BattleDataContext> netdata)
{ {
if (netdata->GetBattleTimes() < mt::Param::s().newbie_room_battle_times) { if (netdata->join_msg->room_mode() == kPvpRankMode) {
return RoomType_OldBrid1; auto rank_mode_conf = mt::Param::GetRankModeConf(netdata->GetElo());
} else {
if (netdata->GetBattleTimes() < mt::Param::s().newbie_room_battle_times) {
return RoomType_OldBrid1;
}
if (netdata->GetRank() < mt::Param::s().mid_room_max_rank) {
return RoomType_OldBrid2;
}
return RoomType_OldBrid3;
} }
if (netdata->GetRank() < mt::Param::s().mid_room_max_rank) {
return RoomType_OldBrid2;
}
return RoomType_OldBrid3;
} }
void RoomMgr::Init() void RoomMgr::Init()