This commit is contained in:
aozhiwei 2023-07-20 17:58:32 +08:00
parent 176d33b9de
commit 5916f3ea1f
3 changed files with 10 additions and 4 deletions

View File

@ -285,7 +285,12 @@ namespace mt
return 0;
}
const RankMatchConf* Param::GetRankModeConf(int elo)
const RankMatchConf* Param::GetRankModeConfByElo(int elo)
{
return nullptr;
}
const RankMatchConf* Param::GetRankModeConfByRoomType(int room_type)
{
return nullptr;
}

View File

@ -133,7 +133,7 @@ namespace mt
int revive_count = 1;
int pvp_revive_time = 10;
std::vector<std::tuple<int, int, int, int>> rank_mode_confs;
std::vector<std::shared_ptr<RankMatchConf>> rank_mode_confs;
};
static void StaticPostInit();
static const S& s() { return s_; };
@ -142,7 +142,8 @@ namespace mt
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 int GetStarNum(int rank);
static const RankMatchConf* GetRankModeConf(int elo);
static const RankMatchConf* GetRankModeConfByElo(int elo);
static const RankMatchConf* GetRankModeConfByRoomType(int room_type);
private:
static S s_;

View File

@ -39,7 +39,7 @@ const int HUM_NUM_DOWN_LIMIT = 2500;
static RoomType_e GetHumanRoomType(const std::shared_ptr<BattleDataContext> netdata)
{
if (netdata->join_msg->room_mode() == kPvpRankMode) {
auto rank_mode_conf = mt::Param::GetRankModeConf(netdata->GetElo());
auto rank_mode_conf = mt::Param::GetRankModeConfByElo(netdata->GetElo());
if (!rank_mode_conf) {
abort();
}