This commit is contained in:
aozhiwei 2023-09-23 17:38:19 +08:00
parent 6f7a270294
commit 72b2a382e6
2 changed files with 11 additions and 0 deletions

View File

@ -9,6 +9,7 @@ class CustomMember
void Join(Player* hum);
bool IsJoined() { return joined_; }
int GetJoinTime() { return join_time_; }
bool IsViewer() { return is_viewer_; }
const std::string& GetAccountId() { return account_id_; }
const std::string& GetSessionId() { return session_id_; }
std::shared_ptr<BattleDataContext>& GetNetData() { return battle_context_; };
@ -16,6 +17,7 @@ class CustomMember
private:
bool joined_ = false;
int join_time_ = 0;
bool is_viewer_ = false;
std::string account_id_;
std::string session_id_;
std::shared_ptr<BattleDataContext> battle_context_;

View File

@ -43,6 +43,7 @@
#include "batchsync.h"
#include "trigger.h"
#include "custom_battle.h"
#include "custom_member.h"
#include "mt/Param.h"
#include "mt/Hero.h"
@ -3542,5 +3543,13 @@ int Room::GetMaxTeamNum()
void Room::FillCustomBattleHuman()
{
custom_battle_->TraverseMemberList
(
[] (CustomMember* member) -> bool
{
if (!member->IsJoined()) {
}
return true;
});
}