game2006/server/gameserver/custom_member.h
aozhiwei cc0bf35f27 1
2023-10-02 15:48:15 +08:00

28 lines
727 B
C++

#pragma once
struct BattleDataContext;
class Player;
class CustomTeam;
class CustomMember
{
public:
void Join(Player* hum);
CustomTeam* GetTeam() { return team_; }
bool IsJoined() { return joined_; }
int GetJoinTime() { return join_time_; }
bool IsView();
const std::string& GetAccountId() { return account_id_; }
const std::string& GetSessionId() { return session_id_; }
std::shared_ptr<BattleDataContext>& GetNetData() { return battle_context_; };
private:
CustomTeam *team_ = nullptr;
bool joined_ = false;
int join_time_ = 0;
std::string account_id_;
std::string session_id_;
std::shared_ptr<BattleDataContext> battle_context_;
friend class CustomBattle;
};