From 4b91640ad91769ed117178324abf5873d2d69cec Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 16 Mar 2024 14:13:53 +0800 Subject: [PATCH] 1 --- server/gameserver/custom_battle.cc | 12 ------------ server/gameserver/custom_battle.h | 1 - 2 files changed, 13 deletions(-) diff --git a/server/gameserver/custom_battle.cc b/server/gameserver/custom_battle.cc index fdb95028..42aaaa22 100644 --- a/server/gameserver/custom_battle.cc +++ b/server/gameserver/custom_battle.cc @@ -136,18 +136,6 @@ void CustomBattle::ParseResult(a8::XObject& obj) parse_ok_ = true; } -bool CustomBattle::CanAdd(const std::string& account_id, const std::string& session_id) -{ - auto member = GetMemberByAccountId(account_id); - if (!member) { - return false; - } - if (member->IsJoined()) { - return false; - } - return true; -} - std::shared_ptr CustomBattle::GetMemberByAccountId(const std::string& account_id) { auto itr = member_id_hash_.find(account_id); diff --git a/server/gameserver/custom_battle.h b/server/gameserver/custom_battle.h index 1679e80e..777648a1 100644 --- a/server/gameserver/custom_battle.h +++ b/server/gameserver/custom_battle.h @@ -25,7 +25,6 @@ class CustomBattle int GetNodeId() { return zone_id_; } int GetStartTime() { return start_time_; } void ParseResult(a8::XObject& obj); - bool CanAdd(const std::string& account_id, const std::string& session_id); std::shared_ptr GetTeamByAccountId(const std::string& account_id); std::shared_ptr GetMemberByAccountId(const std::string& account_id); std::shared_ptr GetTeamByTeamUuid(const std::string& team_uuid);