This commit is contained in:
aozhiwei 2022-11-18 13:37:59 +08:00
parent 6dd65e9535
commit 59f34e3827
5 changed files with 13 additions and 2 deletions

View File

@ -2333,6 +2333,9 @@ void Human::GenBattleReportData(a8::MutableXObject* params)
params->SetVal("weapon_stats_ceg_uplimit" + i_str, p.ceg_uplimit()); params->SetVal("weapon_stats_ceg_uplimit" + i_str, p.ceg_uplimit());
} }
} }
{
}
} }
void Human::DeadDrop() void Human::DeadDrop()

View File

@ -1341,7 +1341,6 @@ void Player::PushJoinRoomMsg()
notifymsg.set_player_id(GetUniId()); notifymsg.set_player_id(GetUniId());
notifymsg.set_started(false); notifymsg.set_started(false);
notifymsg.set_room_uuid(a8::XValue(room->GetRoomUuid()).GetString()); notifymsg.set_room_uuid(a8::XValue(room->GetRoomUuid()).GetString());
notifymsg.set_team_mode(GetTeamMode());
notifymsg.set_match_mode(GetBattleContext()->GetMatchMode()); notifymsg.set_match_mode(GetBattleContext()->GetMatchMode());
GGListener::Instance()->SendToClient(socket_handle, 0, notifymsg); GGListener::Instance()->SendToClient(socket_handle, 0, notifymsg);
#ifdef DEBUG #ifdef DEBUG

View File

@ -966,6 +966,15 @@ int Room::GetAliveTeamNum()
return num; return num;
} }
void Room::TraverseTeams(std::function<bool (Team*)> cb)
{
for (auto& pair : team_hash_) {
if (!cb(pair.second)) {
break;
}
}
}
int Room::GetTeamNum() int Room::GetTeamNum()
{ {
return team_hash_.size(); return team_hash_.size();

View File

@ -196,6 +196,7 @@ public:
int GetTeamNum(); int GetTeamNum();
int GetAliveTeamNum(); int GetAliveTeamNum();
Team* GetAliveTeam(); Team* GetAliveTeam();
void TraverseTeams(std::function<bool (Team*)> cb);
bool CanJoin(const std::string& accountid, bool CanJoin(const std::string& accountid,
RoomType_e self_roomm_type, RoomType_e self_roomm_type,
RoomMode_e self_room_mode, RoomMode_e self_room_mode,

View File

@ -1222,7 +1222,6 @@ message SMMapInfo
optional string room_uuid = 9; //id optional string room_uuid = 9; //id
optional string server_info = 10; //使 optional string server_info = 10; //使
optional int32 room_mode = 11; //0: 1: 2: optional int32 room_mode = 11; //0: 1: 2:
optional int32 team_mode = 12; // 0: 1:
optional int32 match_mode = 13; // 0: pvp 1:() optional int32 match_mode = 13; // 0: pvp 1:()
} }