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)
|
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;
|
int game_times = 0;
|
||||||
RoomType_e self_room_type = GetHumanRoomType(msg, game_times);
|
RoomType_e self_room_type = GetHumanRoomType(msg, game_times);
|
||||||
if (self_room_type < RT_OldBrid1) {
|
if (self_room_type < RT_OldBrid1) {
|
||||||
@ -935,13 +945,9 @@ void RoomMgr::EnterNewBie(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
|||||||
#if 0
|
#if 0
|
||||||
hum->hero_uniid = a8::XValue(msg.hero_uniid());
|
hum->hero_uniid = a8::XValue(msg.hero_uniid());
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
hum->battle_uuid = context->battle_uuid;
|
||||||
hum->battle_uuid = results.at(0)->battle_uuid;
|
hum->is_valid_battle = context->is_valid_battle;
|
||||||
#endif
|
hum->payload = context->payload;
|
||||||
#if 0
|
|
||||||
hum->is_valid_battle = results.at(0)->is_valid_battle;
|
|
||||||
hum->payload = results.at(0)->payload;
|
|
||||||
#endif
|
|
||||||
PlayerMgr::Instance()->
|
PlayerMgr::Instance()->
|
||||||
CreatePlayerByCMJoin(hum,
|
CreatePlayerByCMJoin(hum,
|
||||||
hdr.ip_saddr,
|
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->meta = mt::Param::s().human_meta;
|
||||||
}
|
}
|
||||||
hum->room = room;
|
hum->room = room;
|
||||||
#if 0
|
hum->SetBattleContext(context);
|
||||||
hum->SetBattleContext(results.at(0));
|
|
||||||
#endif
|
|
||||||
hum->GetBattleContext()->Init(hum);
|
hum->GetBattleContext()->Init(hum);
|
||||||
{
|
{
|
||||||
long long hero_uniid = 0;
|
long long hero_uniid = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user