1
This commit is contained in:
parent
9c3f56b6c4
commit
c88d0f970c
@ -117,6 +117,7 @@ class Human : public Creature
|
||||
int today_enter_times = 0;
|
||||
int account_registertime = 0;
|
||||
int channel = 0;
|
||||
std::string hero_uniid;
|
||||
HumanBehavior behavior;
|
||||
MetaData::Player* meta = nullptr;
|
||||
MetaData::Equip* helmet_meta = nullptr;
|
||||
|
@ -3983,6 +3983,7 @@ void Room::AddTeam(class MatchTeam* team)
|
||||
} else {
|
||||
Player* hum = NewPlayer();
|
||||
hum->proto_version = msg.proto_version();
|
||||
hum->hero_uniid = msg.hero_uniid();
|
||||
#if 1
|
||||
a8::SetBitFlag(hum->status, CS_ForceTeam);
|
||||
#if 0
|
||||
|
@ -185,6 +185,7 @@ void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
||||
}
|
||||
Player* hum = room->NewPlayer();
|
||||
hum->proto_version = msg.proto_version();
|
||||
hum->hero_uniid = msg.hero_uniid();
|
||||
hum->ProcPreSettlementInfo(msg.pre_settlement_info());
|
||||
PlayerMgr::Instance()->
|
||||
CreatePlayerByCMJoin(hum,
|
||||
@ -716,61 +717,6 @@ void RoomMgr::TeamRoomTimeOut(const std::string& team_uuid)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
void RoomMgr::OnJoinResponse(JoinRequest* req)
|
||||
{
|
||||
f8::MsgHdr& hdr = req->hdr;
|
||||
cs::CMJoin& msg = req->msg;
|
||||
int game_times = 0;
|
||||
RoomType_e self_room_type = GetHumanRoomType(msg, game_times);
|
||||
if (self_room_type < RT_OldBrid1) {
|
||||
self_room_type = RT_OldBrid1;
|
||||
}
|
||||
time_t register_time = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
|
||||
int proto_version = msg.proto_version();
|
||||
int channel = f8::ExtractChannelIdFromAccountId(msg.account_id());
|
||||
Room* room = GetJoinableRoom(msg,
|
||||
self_room_type,
|
||||
game_times,
|
||||
register_time,
|
||||
proto_version,
|
||||
channel
|
||||
);
|
||||
if (!room) {
|
||||
JoinErrorHandle(msg, 3, hdr.socket_handle);
|
||||
return;
|
||||
}
|
||||
Player* hum = room->NewPlayer();
|
||||
hum->ProcPreSettlementInfo(msg.pre_settlement_info());
|
||||
PlayerMgr::Instance()->
|
||||
CreatePlayerByCMJoin(hum,
|
||||
hdr.ip_saddr,
|
||||
hdr.socket_handle,
|
||||
msg
|
||||
);
|
||||
hum->meta = MetaMgr::Instance()->GetPlayer(msg.hero_id());
|
||||
if (!hum->meta) {
|
||||
hum->meta = MetaMgr::Instance()->human_meta;
|
||||
}
|
||||
hum->room = room;
|
||||
room->AddPlayer(hum);
|
||||
hum->ProcPrepareItems(msg.prepare_items());
|
||||
hum->ProcPrepareItems2(msg.prepare_items2());
|
||||
hum->ProcSkillList(msg.skill_list());
|
||||
PlayerMgr::Instance()->IncAccountNum(msg.account_id());
|
||||
if (JsonDataMgr::Instance()->channel != 0 &&
|
||||
JsonDataMgr::Instance()->channel != channel) {
|
||||
a8::UdpLog::Instance()->Warning
|
||||
("join room channel not match channel:%d account_id:%s",
|
||||
{
|
||||
JsonDataMgr::Instance()->channel,
|
||||
msg.account_id()
|
||||
});
|
||||
}
|
||||
OnJoinRoomOk(msg, hum);
|
||||
}
|
||||
#endif
|
||||
|
||||
void RoomMgr::SendGetBattleData(int mode,
|
||||
std::vector<std::shared_ptr<cs::CMJoin>>& join_msgs,
|
||||
std::function<
|
||||
|
Loading…
x
Reference in New Issue
Block a user