1
This commit is contained in:
parent
f06c381fde
commit
0e223cb263
@ -1098,7 +1098,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
|||||||
data->ToJsonStr();
|
data->ToJsonStr();
|
||||||
msg.mutable_settlement_new()->set_box_payload(custom_data);
|
msg.mutable_settlement_new()->set_box_payload(custom_data);
|
||||||
}
|
}
|
||||||
if (GetTeam()->already_report_battle_) {
|
if (room->IsAlreadyRoomReportBattle()) {
|
||||||
msg.mutable_settlement_new()->set_settlement_status(1);
|
msg.mutable_settlement_new()->set_settlement_status(1);
|
||||||
auto p = msg.mutable_settlement_new();
|
auto p = msg.mutable_settlement_new();
|
||||||
p->set_version(20230321);
|
p->set_version(20230321);
|
||||||
@ -1695,7 +1695,7 @@ void Human::SendUpdateMsg()
|
|||||||
void Human::SendGameOver()
|
void Human::SendGameOver()
|
||||||
{
|
{
|
||||||
if (stats->abandon_battle == 1 || (GetTeam()->HasPlayer()) || GetTeam()->MemberHasOb()) {
|
if (stats->abandon_battle == 1 || (GetTeam()->HasPlayer()) || GetTeam()->MemberHasOb()) {
|
||||||
if (GetTeam()->already_report_battle_) {
|
if (room->IsAlreadyRoomReportBattle()) {
|
||||||
cs::SMGameOver msg;
|
cs::SMGameOver msg;
|
||||||
FillSMGameOver(msg);
|
FillSMGameOver(msg);
|
||||||
#if 0
|
#if 0
|
||||||
@ -1721,10 +1721,7 @@ void Human::SendGameOver()
|
|||||||
}
|
}
|
||||||
if (GetTeam()->team_rank && GetTeam()->HasPlayer() && !GetTeam()->IsViewTeam() &&
|
if (GetTeam()->team_rank && GetTeam()->HasPlayer() && !GetTeam()->IsViewTeam() &&
|
||||||
stats->abandon_battle != 1) {
|
stats->abandon_battle != 1) {
|
||||||
if (!GetTeam()->sending_battlereport_) {
|
GetTeam()->TrySendTeamBattleReport(this);
|
||||||
GetTeam()->sending_battlereport_ = true;
|
|
||||||
GetTeam()->SendTeamBattleReport(this);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
cs::SMGameOver msg;
|
cs::SMGameOver msg;
|
||||||
FillSMGameOver(msg);
|
FillSMGameOver(msg);
|
||||||
|
@ -620,3 +620,11 @@ bool Team::AllIsDead()
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Team::TrySendTeamBattleReport(Human* sender)
|
||||||
|
{
|
||||||
|
if (!sending_battlereport_) {
|
||||||
|
sending_battlereport_ = true;
|
||||||
|
SendTeamBattleReport(sender);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -21,8 +21,6 @@ class Team : public std::enable_shared_from_this<Team>
|
|||||||
int team_rank = 0;
|
int team_rank = 0;
|
||||||
std::map<int, glm::vec3> target_pos;
|
std::map<int, glm::vec3> target_pos;
|
||||||
int settlement_color = 0;
|
int settlement_color = 0;
|
||||||
bool sending_battlereport_ = false;
|
|
||||||
bool already_report_battle_ = false;
|
|
||||||
|
|
||||||
Team();
|
Team();
|
||||||
~Team();
|
~Team();
|
||||||
@ -51,7 +49,6 @@ class Team : public std::enable_shared_from_this<Team>
|
|||||||
bool HasPlayer();
|
bool HasPlayer();
|
||||||
int GetPlayerNum();
|
int GetPlayerNum();
|
||||||
void FillSMGameOver(cs::SMGameOver& msg);
|
void FillSMGameOver(cs::SMGameOver& msg);
|
||||||
void SendTeamBattleReport(Human* sender);
|
|
||||||
void GenBattleReportData(Human* player, a8::MutableXObject* params);
|
void GenBattleReportData(Human* player, a8::MutableXObject* params);
|
||||||
void GenBattleUuid();
|
void GenBattleUuid();
|
||||||
void RunAway(Human* hum);
|
void RunAway(Human* hum);
|
||||||
@ -65,6 +62,10 @@ class Team : public std::enable_shared_from_this<Team>
|
|||||||
void FillMFMobaBattleDataTeam(cs::MFMobaBattleDataTeam* p);
|
void FillMFMobaBattleDataTeam(cs::MFMobaBattleDataTeam* p);
|
||||||
void FillMFTeamFull(cs::MFTeamFull* p);
|
void FillMFTeamFull(cs::MFTeamFull* p);
|
||||||
bool AllIsDead();
|
bool AllIsDead();
|
||||||
|
void TrySendTeamBattleReport(Human* sender);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void SendTeamBattleReport(Human* sender);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int team_id_ = 0;
|
int team_id_ = 0;
|
||||||
@ -76,4 +77,7 @@ class Team : public std::enable_shared_from_this<Team>
|
|||||||
bool auto_fill_ = false;
|
bool auto_fill_ = false;
|
||||||
int kill_count_ = 0;
|
int kill_count_ = 0;
|
||||||
long long last_kill_frameno_ = 0;
|
long long last_kill_frameno_ = 0;
|
||||||
|
bool sending_battlereport_ = false;
|
||||||
|
bool already_report_battle_ = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user