This commit is contained in:
aozhiwei 2023-12-01 13:25:52 +08:00
parent 85dbe4138d
commit c28bcb9ad1
2 changed files with 15 additions and 6 deletions

View File

@ -1348,8 +1348,6 @@ void Room::UpdateGasInactivePvp()
GetGasInactiveTime() * SERVER_FRAME_RATE;
if (over) {
long long begin_tick = a8::XGetTickCount();
gas_data_.SetGasMode(GasJump);
gas_data_.gas_start_frameno = GetFrameNo();
if (human_hash_.size() < GetRoomMaxPlayerNum()) {
if (IsCustomBattle()) {
FillCustomBattleHuman();
@ -1358,6 +1356,8 @@ void Room::UpdateGasInactivePvp()
}
NotifyUiUpdate();
}
gas_data_.SetGasMode(GasJump);
gas_data_.gas_start_frameno = GetFrameNo();
battle_start_frameno_ = GetFrameNo();
CombineTeam();
FillTeam();
@ -3597,12 +3597,20 @@ void Room::FillCustomBattleHuman()
if (!member->IsJoined()) {
int socket_handle = 0;
int ip_saddr = 0;
member->GetNetData()->join_msg = std::make_shared<cs::CMJoin>();
member->GetNetData()->join_msg->set_account_id(member->GetAccountId());
{
member->GetNetData()->join_msg = std::make_shared<cs::CMJoin>();
member->GetNetData()->join_msg->set_account_id(member->GetAccountId());
if (member->GetNetData()->hero_dto &&
member->GetNetData()->hero_dto->IsObject()) {
member->GetNetData()->join_msg->set_hero_id
(member->GetNetData()->hero_dto->Get("hero_id", ""));
}
}
Player* hum = NewPlayer();
hum->proto_version = member->GetNetData()->join_msg->proto_version();
#if 0
#if 1
#else
hum->hero_uniid = a8::XValue(msg.hero_uniid());
#endif
hum->battle_uuid = member->GetNetData()->battle_uuid;

View File

@ -864,8 +864,9 @@ void RoomMgr::AdjustCMJoin(cs::CMJoin* msg)
team_list->Push(*team.get());
}
{
std::string test_account_id = "6513_2006_2";
std::map<std::string, std::string> test_members;
test_members[msg->account_id()] = "6513_2006_2";
test_members[test_account_id] = test_account_id;
auto team = a8::MutableXObject::CreateObject();
auto members = a8::MutableXObject::CreateArray();
team->SetVal("team_uuid", f8::App::Instance()->NewGlobalUuid());