1
This commit is contained in:
parent
ea20fcbf97
commit
8ee1248e21
@ -6,6 +6,7 @@
|
|||||||
#include "netdata.h"
|
#include "netdata.h"
|
||||||
|
|
||||||
#include "mt/Map.h"
|
#include "mt/Map.h"
|
||||||
|
#include "mt/Param.h"
|
||||||
|
|
||||||
void CustomBattle::Init()
|
void CustomBattle::Init()
|
||||||
{
|
{
|
||||||
@ -230,5 +231,25 @@ RoomMode_e CustomBattle::GetRoomMode()
|
|||||||
|
|
||||||
RoomType_e CustomBattle::GetRoomType()
|
RoomType_e CustomBattle::GetRoomType()
|
||||||
{
|
{
|
||||||
|
if (IsMoba()) {
|
||||||
|
return RoomType_MidBrid;
|
||||||
|
}
|
||||||
|
if (IsCustomMode()) {
|
||||||
|
return RoomType_MidBrid;
|
||||||
|
}
|
||||||
|
if (GetRoomMode() == kPvpRankMode) {
|
||||||
|
auto rank_mode_conf = mt::Param::GetRankModeConfByHeroLv(team1_average_hero_lv_);
|
||||||
|
if (!rank_mode_conf) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
return rank_mode_conf->room_type;
|
||||||
|
} else {
|
||||||
|
if (team1_average_hero_lv_ < mt::Param::s().new_room_max_level) {
|
||||||
|
return RoomType_OldBrid1;
|
||||||
|
}
|
||||||
|
if (team1_average_hero_lv_ < mt::Param::s().mid_room_max_level) {
|
||||||
|
return RoomType_OldBrid2;
|
||||||
|
}
|
||||||
|
return RoomType_OldBrid3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ class CustomBattle
|
|||||||
int node_id_ = 0;
|
int node_id_ = 0;
|
||||||
int map_id_ = 0;
|
int map_id_ = 0;
|
||||||
int start_time_ = 0;
|
int start_time_ = 0;
|
||||||
|
int team1_average_hero_lv_ = 0;
|
||||||
std::string sign_;
|
std::string sign_;
|
||||||
std::shared_ptr<a8::XObject> raw_data_;
|
std::shared_ptr<a8::XObject> raw_data_;
|
||||||
std::map<std::string, std::shared_ptr<CustomTeam>> uuid_hash_;
|
std::map<std::string, std::shared_ptr<CustomTeam>> uuid_hash_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user