From 273dff1fc69c26adbe62e927251509cccd98cad4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Mar 2024 20:34:54 +0800 Subject: [PATCH] 1 --- server/gameserver/creature.h | 1 - server/gameserver/custom_battle.cc | 15 --------------- server/gameserver/pbutils.cc | 7 +------ server/gameserver/pbutils.h | 2 -- server/gameserver/room.cc | 6 +----- server/gameserver/room.h | 4 ---- server/gameserver/roommgr.cc | 8 -------- server/gameserver/roommgr.h | 8 -------- 8 files changed, 2 insertions(+), 49 deletions(-) diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index b3c8ded5..db9f695e 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -12,7 +12,6 @@ enum CreatureStatus { CS_Disable, CS_DisableAttack, - CS_ForceTeam, CS_PreDieSuspended, CS_DeadNoDrop, CS_Reviving, diff --git a/server/gameserver/custom_battle.cc b/server/gameserver/custom_battle.cc index f5de4e75..300e0f52 100644 --- a/server/gameserver/custom_battle.cc +++ b/server/gameserver/custom_battle.cc @@ -369,31 +369,16 @@ void CustomBattle::GameStart() if (IsNormalMode()) { auto room = RoomMgr::Instance()->GetJoinableRoom(shared_from_this()); if (!room) { - int game_times = 0; RoomType_e self_room_type = GetRoomType(); - //time_t register_time = f8::ExtractRegisterTimeFromSessionId(msg.session_id()); - //int proto_version = msg.proto_version(); - //int channel = f8::ExtractChannelIdFromAccountId(msg.account_id()); - time_t register_time = 0; - int proto_version = 0; - int channel = 0; if (IsPvp()) { room = RoomMgr::Instance()->CreateRoom (self_room_type, - game_times, - register_time, - proto_version, - channel, GetMapId(), GetRoomMode(), nullptr); } else { room = RoomMgr::Instance()->CreateRoom (self_room_type, - game_times, - register_time, - proto_version, - channel, GetMapId(), GetRoomMode(), nullptr); diff --git a/server/gameserver/pbutils.cc b/server/gameserver/pbutils.cc index a303f388..7fe8369e 100644 --- a/server/gameserver/pbutils.cc +++ b/server/gameserver/pbutils.cc @@ -2198,7 +2198,7 @@ void Human::SendMobaTeamNotify() void Human::PushJoinRoomMsg() { - if (!a8::HasBitFlag(status, CS_ForceTeam)) { + { cs::SMJoinedNotify notifymsg; notifymsg.set_error_code(0); notifymsg.set_server_info(JsonDataMgr::Instance()->server_info); @@ -2548,11 +2548,6 @@ void Team::FillMFTeamFull(cs::MFTeamFull* p) }); } -bool PBUtils::SupportSandTable(int proto_version) -{ - return true; -} - void SandTable::FillMFSandTable(cs::SMUpdate* msg, Human* hum, FrameData* framedata) { if (room_->GetGasData().GetGasMode() != GasInactive) { diff --git a/server/gameserver/pbutils.h b/server/gameserver/pbutils.h index b9ba21ce..1407f3a0 100644 --- a/server/gameserver/pbutils.h +++ b/server/gameserver/pbutils.h @@ -42,8 +42,6 @@ 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, diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 8dc6ddd5..05e5a415 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -89,10 +89,6 @@ void Room::InitData(RoomInitInfo& init_info) room_mode_ = init_info.room_mode; room_uuid_ = init_info.room_uuid; room_type_ = init_info.room_type; - creator_game_times_ = init_info.creator_game_times; - creator_register_time_ = init_info.creator_register_time; - creator_proto_version_ = init_info.creator_proto_version; - creator_channel_ = init_info.creator_channel; pve_human_num = init_info.pve_human_num; map_tpl_name_ = init_info.map_tpl_name; @@ -3485,7 +3481,7 @@ void Room::ForceOver() bool Room::SupportSandTable() { - return PBUtils::SupportSandTable(creator_proto_version_); + return true; } void Room::OnAddHuman(Human* hum) diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 9c0fffa5..c2edf8d9 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -383,10 +383,6 @@ private: int battle_team_count_ = 0; const mt::AirLine* airline_ = nullptr; bool show_handed_ = false; - int creator_game_times_ = 0; - int creator_register_time_ = 0; - int creator_proto_version_ = 0; - int creator_channel_ = 0; a8::XTimerWp battle_report_timer_; int current_teamid_ = 0; diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 659c0f24..278fa1d8 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -377,10 +377,6 @@ int RoomMgr::AllocRoomIdx() } std::shared_ptr RoomMgr::CreateRoom(RoomType_e room_type, - int game_times, - int creator_register_time, - int creator_proto_version, - int creator_channel, int map_id, RoomMode_e room_mode, std::shared_ptr custom_battle) @@ -396,10 +392,6 @@ std::shared_ptr RoomMgr::CreateRoom(RoomType_e room_type, init_info.room_type = room_type; init_info.room_mode = room_mode; init_info.init_map_id = map_id; - init_info.creator_game_times = game_times; - init_info.creator_register_time = creator_register_time; - init_info.creator_proto_version = creator_proto_version; - init_info.creator_channel = creator_channel; #if 0 init_info.pve_instance_id = msg.pve_instance_id(); init_info.pve_human_num = std::max(1, msg.team_members_size()); diff --git a/server/gameserver/roommgr.h b/server/gameserver/roommgr.h index bac1e59c..cb474e77 100644 --- a/server/gameserver/roommgr.h +++ b/server/gameserver/roommgr.h @@ -32,10 +32,6 @@ struct RoomInitInfo RoomMode_e room_mode = kPvpMode; std::string room_uuid; RoomType_e room_type = RoomType_NewBrid; - int creator_game_times = 0; - int creator_register_time = 0; - int creator_proto_version = 0; - int creator_channel = 0; int init_map_id = 0; int pve_instance_id = 0; int pve_human_num = 0; @@ -88,10 +84,6 @@ class RoomMgr : public a8::Singleton void UnBindCustomMemberSocket(int socket_handle); std::shared_ptr GetJoinableRoom(std::shared_ptr p); std::shared_ptr CreateRoom(RoomType_e room_type, - int game_times, - int creator_register_time, - int creator_proto_version, - int creator_channel, int map_id, RoomMode_e room_mode, std::shared_ptr custom_battle);