This commit is contained in:
aozhiwei 2023-12-28 14:52:12 +08:00
parent ac172cdd0a
commit 271f50b441

View File

@ -2000,7 +2000,8 @@ void Human::SendMobaTeamNotify()
void Human::ReJoin(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
std::shared_ptr<MobaBattle> p)
{
this->ip_saddr = ip_saddr;
this->socket_handle = socket_handle;
}
void GGListener::SendError(int sockhandle, unsigned int seqid,
@ -2072,7 +2073,9 @@ Player* PlayerMgr::CreatePlayerByCMJoin(Player* hum,
);
}
#endif
socket_hash_[socket] = hum;
if (socket) {
socket_hash_[socket] = hum;
}
return hum;
}
@ -2293,8 +2296,8 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
//msg.set_team_uuid(team->GetTeamUuid());
PlayerMgr::Instance()->
CreatePlayerByCMJoin(hum,
ip_saddr,
socket_handle,
0,
0,
*msg
);
hum->meta = mt::Hero::GetById(msg->hero_id());