1
This commit is contained in:
parent
4eaa16deae
commit
e05b178aed
@ -420,7 +420,7 @@ void BattleDataContext::CalcBattleStat(struct PlayerStats* stats)
|
|||||||
auto CalcHeroPvpCeg =
|
auto CalcHeroPvpCeg =
|
||||||
[] (long long ceg_uplimit, struct PlayerStats* stats) -> long long
|
[] (long long ceg_uplimit, struct PlayerStats* stats) -> long long
|
||||||
{
|
{
|
||||||
const mt::FormulaPvp* meta = mt::FormulaPvp::GetById(stats->ranked_topx);
|
const mt::FormulaPvp* meta = mt::FormulaPvp::GetByTopx(stats->ranked_topx);
|
||||||
if (!meta) {
|
if (!meta) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -440,7 +440,7 @@ void BattleDataContext::CalcBattleStat(struct PlayerStats* stats)
|
|||||||
auto CalcWeaponPvpCeg =
|
auto CalcWeaponPvpCeg =
|
||||||
[] (long long ceg_uplimit, struct PlayerStats* stats) -> long long
|
[] (long long ceg_uplimit, struct PlayerStats* stats) -> long long
|
||||||
{
|
{
|
||||||
const mt::FormulaPvp* meta = mt::FormulaPvp::GetById(stats->ranked_topx);
|
const mt::FormulaPvp* meta = mt::FormulaPvp::GetByTopx(stats->ranked_topx);
|
||||||
if (!meta) {
|
if (!meta) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,14 @@ IMPL_TABLE(mt::FormulaPvp)
|
|||||||
namespace mt
|
namespace mt
|
||||||
{
|
{
|
||||||
|
|
||||||
|
const mt::FormulaPvp* FormulaPvp::GetByTopx(float topx)
|
||||||
|
{
|
||||||
|
for (auto& itr : raw_list) {
|
||||||
|
if (topx <= itr->top()) {
|
||||||
|
return itr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ namespace mt
|
|||||||
)
|
)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
static const mt::FormulaPvp* GetByTopx(float topx);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user