This commit is contained in:
aozhiwei 2023-09-25 13:40:29 +08:00
parent 6782199f28
commit 6ea187f7ee

View File

@ -51,6 +51,7 @@ public:
std::shared_ptr<a8::XObject> hero_dto;
int spec_skill_id = 0;
int main_skill_id = 0;
const mt::NpcStandard* standard_meta = nullptr;
float GetHP()
{
@ -155,7 +156,6 @@ private:
#endif
}
} else {
const mt::NpcStandard* standard_meta = nullptr;
auto match_conf = c->room->GetRankMatchConf();
if (match_conf) {
standard_meta = mt::NpcStandard::GetByHeroAndLv
@ -1126,6 +1126,9 @@ float BattleDataContext::GetRecoverHpAdd()
int BattleDataContext::GetHeroLevel()
{
if (!owner_.Get()->IsPlayer() && hero_ability_ && hero_ability_->standard_meta) {
return hero_ability_->standard_meta->level();
}
return std::max(hero_lv_, 1);
}