1
This commit is contained in:
parent
271f50b441
commit
ca9b547686
@ -3,6 +3,31 @@
|
||||
class Room;
|
||||
class MobaTeam;
|
||||
class MobaMember;
|
||||
class Player;
|
||||
struct BattleDataContext;
|
||||
|
||||
class MobaMember
|
||||
{
|
||||
public:
|
||||
|
||||
void Join(Player* hum);
|
||||
MobaTeam* 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:
|
||||
MobaTeam *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 MobaBattle;
|
||||
};
|
||||
|
||||
class MobaTeam
|
||||
{
|
||||
|
@ -2289,9 +2289,9 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
|
||||
#if 0
|
||||
hum->hero_uniid = a8::XValue(msg.hero_uniid());
|
||||
#endif
|
||||
//hum->battle_uuid = member->GetNetData()->battle_uuid;
|
||||
//hum->is_valid_battle = member->GetNetData()->is_valid_battle;
|
||||
//hum->payload = member->GetNetData()->payload;
|
||||
hum->battle_uuid = m->GetNetData()->battle_uuid;
|
||||
hum->is_valid_battle = m->GetNetData()->is_valid_battle;
|
||||
hum->payload = m->GetNetData()->payload;
|
||||
//msg.set_session_id(member->GetSessionId());
|
||||
//msg.set_team_uuid(team->GetTeamUuid());
|
||||
PlayerMgr::Instance()->
|
||||
@ -2304,7 +2304,7 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
|
||||
if (!hum->meta) {
|
||||
hum->meta = mt::Param::s().human_meta;
|
||||
}
|
||||
//hum->SetBattleContext(member->GetNetData());
|
||||
hum->SetBattleContext(m->GetNetData());
|
||||
hum->GetBattleContext()->Init(hum);
|
||||
{
|
||||
long long hero_uniid = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user