1
This commit is contained in:
parent
973984bb7b
commit
b3f59573ee
@ -285,7 +285,7 @@ namespace mt
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<int, int, int, int>* Param::GetRankModeConf(int elo)
|
const RankMatchConf* Param::GetRankModeConf(int elo)
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,14 @@
|
|||||||
|
|
||||||
namespace mt
|
namespace mt
|
||||||
{
|
{
|
||||||
|
struct RankMatchConf
|
||||||
|
{
|
||||||
|
RoomType_e room_type = RoomType_Rank1;
|
||||||
|
int min_elo = 0;
|
||||||
|
int max_elo = 0;
|
||||||
|
int hero_min_lv = 0;
|
||||||
|
int hero_max_lv = 0;
|
||||||
|
};
|
||||||
|
|
||||||
DECLARE_NAME_TABLE(Param, mtb::Parameter,
|
DECLARE_NAME_TABLE(Param, mtb::Parameter,
|
||||||
"parameter@parameter.json",
|
"parameter@parameter.json",
|
||||||
@ -134,7 +142,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);
|
static const RankMatchConf* GetRankModeConf(int elo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static S s_;
|
static S s_;
|
||||||
|
@ -40,6 +40,10 @@ static RoomType_e GetHumanRoomType(const std::shared_ptr<BattleDataContext> netd
|
|||||||
{
|
{
|
||||||
if (netdata->join_msg->room_mode() == kPvpRankMode) {
|
if (netdata->join_msg->room_mode() == kPvpRankMode) {
|
||||||
auto rank_mode_conf = mt::Param::GetRankModeConf(netdata->GetElo());
|
auto rank_mode_conf = mt::Param::GetRankModeConf(netdata->GetElo());
|
||||||
|
if (!rank_mode_conf) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
return rank_mode_conf->room_type;
|
||||||
} else {
|
} else {
|
||||||
if (netdata->GetBattleTimes() < mt::Param::s().newbie_room_battle_times) {
|
if (netdata->GetBattleTimes() < mt::Param::s().newbie_room_battle_times) {
|
||||||
return RoomType_OldBrid1;
|
return RoomType_OldBrid1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user