1
This commit is contained in:
parent
137d1ab873
commit
0c5927d3a0
@ -1705,9 +1705,13 @@ void Human::SendBattleReport()
|
||||
if (ok) {
|
||||
hum->sending_battlereport_ = false;
|
||||
hum->already_report_battle_ = true;
|
||||
#if 0
|
||||
hum->stats.ParseReward(hum, *rsp_obj);
|
||||
#endif
|
||||
hum->SendGameOver();
|
||||
#if 0
|
||||
hum->SendBattleSettlement();
|
||||
#endif
|
||||
} else {
|
||||
hum->sending_battlereport_ = false;
|
||||
}
|
||||
@ -3564,3 +3568,8 @@ void Human::ProcGemStoneItem(AddItemDTO& dto)
|
||||
}
|
||||
dto.handled = true;
|
||||
}
|
||||
|
||||
void Human::SendTeamBattleReport()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -419,6 +419,7 @@ private:
|
||||
void FillSMGameOver(cs::SMGameOver& msg);
|
||||
void SendBattleSettlement();
|
||||
void SendBattleReport();
|
||||
void SendTeamBattleReport();
|
||||
void Revive();
|
||||
void AdjustDecHp(float old_health, float& new_health);
|
||||
void ClearPartObjects();
|
||||
|
@ -1336,6 +1336,17 @@ void Human::SendUpdateMsg()
|
||||
|
||||
void Human::SendGameOver()
|
||||
{
|
||||
#if 1
|
||||
if (GetTeam()->HasPlayer()) {
|
||||
SendTeamBattleReport();
|
||||
}
|
||||
if (IsEntitySubType(EST_Player)) {
|
||||
if (!is_game_end_) {
|
||||
GameLog::Instance()->GameEnd((Player*)this);
|
||||
is_game_end_ = true;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (IsEntitySubType(EST_Player)) {
|
||||
if (already_report_battle_) {
|
||||
cs::SMGameOver msg;
|
||||
@ -1357,6 +1368,7 @@ void Human::SendGameOver()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Human::SendDebugMsg(const std::string& debug_msg)
|
||||
|
@ -164,3 +164,13 @@ bool Team::IsFreeTeam()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Team::HasPlayer()
|
||||
{
|
||||
for (Human* member : members_) {
|
||||
if (member->IsPlayer()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ class Team
|
||||
Room* room = nullptr;
|
||||
int team_rank = 0;
|
||||
std::map<int, glm::vec3> target_pos;
|
||||
bool sending_battlereport = false;
|
||||
bool already_report_battle = false;
|
||||
|
||||
void SetInitTeamMemberNum(int init_num) { init_team_member_num_ = init_num; };
|
||||
void SetAutoFill(bool auto_fill) { auto_fill_ = auto_fill; };
|
||||
@ -30,6 +32,7 @@ class Team
|
||||
int GetInitTeamMemberNum() { return init_team_member_num_; };
|
||||
bool HasReviveCoin(Human* member);
|
||||
bool IsFreeTeam();
|
||||
bool HasPlayer();
|
||||
|
||||
private:
|
||||
int team_id_ = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user