This commit is contained in:
aozhiwei 2023-12-28 15:21:18 +08:00
parent b96b06413f
commit 26e94374a3
2 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,10 @@ class MobaMember
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_; };
private:
@ -25,6 +29,10 @@ class MobaMember
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;
std::shared_ptr<BattleDataContext> battle_context_;
friend class MobaBattle;
};

View File

@ -2297,6 +2297,10 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
join_msg.set_account_id(m->GetAccountId());
join_msg.set_session_id(m->GetSessionId());
join_msg.set_team_uuid(m->GetTeam()->GetTeamUuid());
join_msg.set_name(m->GetName());
join_msg.set_avatar_url(m->GetAvatarUrl());
join_msg.set_head_frame(m->GetHeadFrame());
join_msg.set_sex(m->GetSex());
#endif
PlayerMgr::Instance()->
CreatePlayerByCMJoin(hum,