57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
#pragma once
|
|
|
|
namespace cs
|
|
{
|
|
class CMBattlePreSetReady;
|
|
}
|
|
|
|
struct BattleDataContext;
|
|
class Player;
|
|
class CustomTeam;
|
|
class CustomMember
|
|
{
|
|
public:
|
|
enum { HID = HID_CustomMember };
|
|
|
|
public:
|
|
|
|
int GetSocketHandle() { return socket_handle_; }
|
|
long GetIpSaddr() { return ip_saddr_; }
|
|
std::shared_ptr<cs::CMJoin> GetCMJoinMsg() { return join_msg_; }
|
|
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_; }
|
|
const std::string& GetName() { return name_; }
|
|
const std::string& GetAvatarUrl() { return avatar_url_; }
|
|
int GetHeadFrame() { return head_frame_; }
|
|
int GetSex() { return sex_; }
|
|
std::shared_ptr<BattleDataContext>& GetNetData() { return battle_context_; };
|
|
void _CMBattlePreSetReady(f8::MsgHdr* hdr, const cs::CMBattlePreSetReady& msg);
|
|
bool IsAndroid();
|
|
bool IsReady() { return is_ready_; }
|
|
int GetRobotId() { return robot_id_; }
|
|
|
|
private:
|
|
std::shared_ptr<cs::CMJoin> join_msg_;
|
|
int socket_handle_ = 0;
|
|
long ip_saddr_ = 0;
|
|
CustomTeam *team_ = nullptr;
|
|
bool joined_ = false;
|
|
int join_time_ = 0;
|
|
std::string account_id_;
|
|
std::string session_id_;
|
|
std::string name_;
|
|
std::string avatar_url_;
|
|
int head_frame_ = 0;
|
|
int sex_ = 0;
|
|
int is_ready_ = 0;
|
|
int is_android_ = 0;
|
|
int robot_id_ = 0;
|
|
std::shared_ptr<BattleDataContext> battle_context_;
|
|
friend class CustomBattle;
|
|
};
|