This commit is contained in:
aozhiwei 2023-06-09 19:46:10 +08:00
parent e3703c0462
commit 41b9d646cd
4 changed files with 14 additions and 4 deletions

View File

@ -429,6 +429,7 @@ void BattleDataContext::ParseResult(a8::XObject& obj)
revive_coin_ = obj.Get("revive_coin");
match_mode_ = obj.Get("match_mode");
rank_ = obj.Get("rank");
current_get_star_ = obj.Get("current_get_star");
}
level_ = obj.HasKey("level") ? obj.Get("level").GetInt() : 1;
skin_id_ = obj.HasKey("hero_skin") ? obj.Get("hero_skin").GetInt() : 0;
@ -1063,3 +1064,8 @@ int BattleDataContext::GetRank()
{
return rank_;
}
int BattleDataContext::GetCurrentGetStar()
{
return current_get_star_;
}

View File

@ -83,6 +83,7 @@ struct BattleDataContext
int GetLevel();
int GetHeroLevel();
bool IsMainSkill(Skill* skill);
int GetCurrentGetStar();
private:
void Clear();
@ -111,6 +112,8 @@ private:
int level_ = 0;
int hero_lv_ = 0;
int current_get_star_ = 0;
int skill1_lv = 1;
int skill2_lv = 1;
int skill3_lv = 1;

View File

@ -1542,6 +1542,10 @@ void Human::SendGameOver()
SendNotifyMsg(msg);
} else {
CalcStats();
if (IsPlayer() && !sent_personal_report_) {
SendPersonalBattleReport();
sent_personal_report_ = true;
}
if (GetTeam()->team_rank) {
if (!GetTeam()->sending_battlereport) {
GetTeam()->sending_battlereport = true;
@ -1552,10 +1556,6 @@ void Human::SendGameOver()
FillSMGameOver(msg);
SendNotifyMsg(msg);
}
if (IsPlayer() && !sent_personal_report_) {
SendPersonalBattleReport();
sent_personal_report_ = true;
}
}
}
if (IsEntitySubType(EST_Player)) {

View File

@ -134,6 +134,7 @@ class PlayerStats
double survival_topx = 0;
HeroStatsPb pb_hero_stats;
std::vector<WeaponStatsPb> pb_weapons_stats;
int star_num = 0;
WeaponStats& MustBeWeapon(int weapon_id);
void IncWeaponKills(int weapon_id, int val);