This commit is contained in:
aozhiwei 2022-05-29 17:07:36 +08:00
parent fb48c897ee
commit e685418740
4 changed files with 10 additions and 0 deletions

View File

@ -2126,6 +2126,7 @@ void Human::GenBattleReportData(a8::MutableXObject* params)
params->SetVal("hero_stats_name", stats.pb_hero_stats.hero_name());
params->SetVal("hero_stats_hero_id", stats.pb_hero_stats.hero_id());
params->SetVal("hero_stats_reward_ceg", stats.pb_hero_stats.reward_ceg());
params->SetVal("hero_stats_today_get_ceg", stats.pb_hero_stats.today_get_ceg());
params->SetVal("hero_stats_ceg_uplimit", stats.pb_hero_stats.ceg_uplimit());
for (int i = 0; i < stats.pb_weapons_stats.size(); ++i) {
@ -2135,6 +2136,7 @@ void Human::GenBattleReportData(a8::MutableXObject* params)
params->SetVal("weapon_stats_name" + i_str, p.weapon_name());
params->SetVal("weapon_stats_weapon_id" + i_str, p.weapon_id());
params->SetVal("weapon_stats_reward_ceg" + i_str, p.reward_ceg());
params->SetVal("weapon_stats_today_get_ceg" + i_str, p.today_get_ceg());
params->SetVal("weapon_stats_ceg_uplimit" + i_str, p.ceg_uplimit());
}
}

View File

@ -223,6 +223,8 @@ void BattleDataContext::CalcBattleStat(struct PlayerStats* stats)
int new_ceg = std::min(up_limit, today_get_gold + ceg);
int finaly_ceg = std::max(0, new_ceg - today_get_gold);
stats->pb_hero_stats.set_ceg_uplimit(up_limit);
stats->pb_hero_stats.set_today_get_ceg
(std::min(up_limit, today_get_gold + finaly_ceg));
stats->pb_hero_stats.set_reward_ceg(finaly_ceg);
}
}
@ -252,6 +254,8 @@ void BattleDataContext::CalcBattleStat(struct PlayerStats* stats)
int new_ceg = std::min(up_limit, today_get_gold + ceg);
int finaly_ceg = std::max(0, new_ceg - today_get_gold);
p->set_ceg_uplimit(up_limit);
p->set_today_get_ceg
(std::min(up_limit, today_get_gold + finaly_ceg));
p->set_reward_ceg(finaly_ceg);
}
}

View File

@ -716,6 +716,7 @@ message MFHeroStats
optional int32 hero_id = 3 [default = 0]; //id
optional int32 reward_ceg = 4 [default = 0]; //ceg数量
optional int32 ceg_uplimit = 5 [default = 0]; //ceg数量上限
optional int32 today_get_ceg = 6 [default = 0]; //ceg数量
}
//
@ -726,6 +727,7 @@ message MFWeaponStats
optional int32 weapon_id = 3 [default = 0]; //id
optional int32 reward_ceg = 4 [default = 0]; //ceg数量
optional int32 ceg_uplimit = 5 [default = 0]; //ceg数量上限
optional int32 today_get_ceg = 6 [default = 0]; //ceg数量
}
//

View File

@ -539,6 +539,7 @@ message MFHeroStats
optional int32 hero_id = 3 [default = 0];
optional int32 reward_ceg = 4 [default = 0];
optional int32 ceg_uplimit = 5 [default = 0];
optional int32 today_get_ceg = 6 [default = 0];
}
message MFWeaponStats
@ -548,6 +549,7 @@ message MFWeaponStats
optional int32 weapon_id = 3 [default = 0];
optional int32 reward_ceg = 4 [default = 0];
optional int32 ceg_uplimit = 5 [default = 0];
optional int32 today_get_ceg = 6 [default = 0];
}
message MFPlayerStats