1
This commit is contained in:
parent
6f7a270294
commit
72b2a382e6
@ -9,6 +9,7 @@ class CustomMember
|
|||||||
void Join(Player* hum);
|
void Join(Player* hum);
|
||||||
bool IsJoined() { return joined_; }
|
bool IsJoined() { return joined_; }
|
||||||
int GetJoinTime() { return join_time_; }
|
int GetJoinTime() { return join_time_; }
|
||||||
|
bool IsViewer() { return is_viewer_; }
|
||||||
const std::string& GetAccountId() { return account_id_; }
|
const std::string& GetAccountId() { return account_id_; }
|
||||||
const std::string& GetSessionId() { return session_id_; }
|
const std::string& GetSessionId() { return session_id_; }
|
||||||
std::shared_ptr<BattleDataContext>& GetNetData() { return battle_context_; };
|
std::shared_ptr<BattleDataContext>& GetNetData() { return battle_context_; };
|
||||||
@ -16,6 +17,7 @@ class CustomMember
|
|||||||
private:
|
private:
|
||||||
bool joined_ = false;
|
bool joined_ = false;
|
||||||
int join_time_ = 0;
|
int join_time_ = 0;
|
||||||
|
bool is_viewer_ = false;
|
||||||
std::string account_id_;
|
std::string account_id_;
|
||||||
std::string session_id_;
|
std::string session_id_;
|
||||||
std::shared_ptr<BattleDataContext> battle_context_;
|
std::shared_ptr<BattleDataContext> battle_context_;
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "batchsync.h"
|
#include "batchsync.h"
|
||||||
#include "trigger.h"
|
#include "trigger.h"
|
||||||
#include "custom_battle.h"
|
#include "custom_battle.h"
|
||||||
|
#include "custom_member.h"
|
||||||
|
|
||||||
#include "mt/Param.h"
|
#include "mt/Param.h"
|
||||||
#include "mt/Hero.h"
|
#include "mt/Hero.h"
|
||||||
@ -3542,5 +3543,13 @@ int Room::GetMaxTeamNum()
|
|||||||
|
|
||||||
void Room::FillCustomBattleHuman()
|
void Room::FillCustomBattleHuman()
|
||||||
{
|
{
|
||||||
|
custom_battle_->TraverseMemberList
|
||||||
|
(
|
||||||
|
[] (CustomMember* member) -> bool
|
||||||
|
{
|
||||||
|
if (!member->IsJoined()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user