1
This commit is contained in:
parent
41cb389ed2
commit
349b851d1c
@ -913,6 +913,16 @@ void RoomMgr::AdjustCMJoin(cs::CMJoin* msg)
|
||||
|
||||
void RoomMgr::EnterNewBie(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
||||
{
|
||||
std::shared_ptr<BattleDataContext> context = std::make_shared<BattleDataContext>();
|
||||
{
|
||||
context->join_msg = std::make_shared<cs::CMJoin>();
|
||||
*context->join_msg = msg;
|
||||
context->battle_uuid = App::Instance()->NewUuid();
|
||||
context->is_valid_battle = true;
|
||||
context->errcode = 0;
|
||||
context->errmsg = "";
|
||||
}
|
||||
|
||||
int game_times = 0;
|
||||
RoomType_e self_room_type = GetHumanRoomType(msg, game_times);
|
||||
if (self_room_type < RT_OldBrid1) {
|
||||
@ -935,13 +945,9 @@ void RoomMgr::EnterNewBie(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
||||
#if 0
|
||||
hum->hero_uniid = a8::XValue(msg.hero_uniid());
|
||||
#endif
|
||||
#if 0
|
||||
hum->battle_uuid = results.at(0)->battle_uuid;
|
||||
#endif
|
||||
#if 0
|
||||
hum->is_valid_battle = results.at(0)->is_valid_battle;
|
||||
hum->payload = results.at(0)->payload;
|
||||
#endif
|
||||
hum->battle_uuid = context->battle_uuid;
|
||||
hum->is_valid_battle = context->is_valid_battle;
|
||||
hum->payload = context->payload;
|
||||
PlayerMgr::Instance()->
|
||||
CreatePlayerByCMJoin(hum,
|
||||
hdr.ip_saddr,
|
||||
@ -953,9 +959,7 @@ void RoomMgr::EnterNewBie(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
||||
hum->meta = mt::Param::s().human_meta;
|
||||
}
|
||||
hum->room = room;
|
||||
#if 0
|
||||
hum->SetBattleContext(results.at(0));
|
||||
#endif
|
||||
hum->SetBattleContext(context);
|
||||
hum->GetBattleContext()->Init(hum);
|
||||
{
|
||||
long long hero_uniid = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user