This commit is contained in:
aozhiwei 2023-05-16 19:28:35 +08:00
parent de0d60503f
commit 183ef13fc3
5 changed files with 15 additions and 7 deletions

View File

@ -2036,3 +2036,8 @@ void Team::FillSMGameOver(cs::SMGameOver& msg)
}
}
}
bool PBUtils::SupportSandTable(int proto_version)
{
return proto_version >= 2023051601;
}

View File

@ -42,6 +42,8 @@ class PBUtils
static void Human_SendSMPvePassWave(Human* self, int new_wave, int pve_max_wave, int wait_time);
static bool SupportSandTable(int proto_version);
private:
static void _Ability_FillMFAttrAdditionList
(Ability* self,

View File

@ -95,7 +95,6 @@ void Room::InitData(RoomInitInfo& init_info)
force_entry_newbie_room_ = init_info.force_entry_newbie_room;
pve_human_num = init_info.pve_human_num;
is_newbie_room_ = init_info.is_newbie_room;
support_sand_table_room = init_info.support_sand_table_room;
map_tpl_name_ = init_info.map_tpl_name;
grid_service = init_info.grid_service;
@ -944,10 +943,8 @@ bool Room::CanJoin(const std::string& accountid,
if (IsNewBieRoom()) {
return false;
}
if (self_proto_version < 2023051601) {
if (support_sand_table_room) {
return false;
}
if (PBUtils::SupportSandTable(self_proto_version) != SupportSandTable()) {
return false;
}
if (msg.force_enter_newbie_room()) {
return false;
@ -3781,3 +3778,8 @@ bool Room::IsNewBieRoom()
{
return is_newbie_room_;
}
bool Room::SupportSandTable()
{
return PBUtils::SupportSandTable(creator_proto_version_);
}

View File

@ -238,6 +238,7 @@ public:
int GetReportRoomMode();
int GetPvpMatchMode();
void ForceOver();
bool SupportSandTable();
private:
void ShuaAndroid();
@ -355,7 +356,6 @@ private:
int creator_channel_ = 0;
bool force_entry_newbie_room_ = false;
bool is_newbie_room_ = false;
bool support_sand_table_room = false;
a8::XTimerWp battle_report_timer_;
int current_teamid_ = 0;

View File

@ -39,7 +39,6 @@ struct RoomInitInfo
int pve_instance_id = 0;
int pve_human_num = 0;
bool is_newbie_room = false;
bool support_sand_table_room = false;
const mt::Map* map_meta = nullptr;
std::string map_tpl_name;