1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

CHeroWindow: fix picked art mana limit display

This commit is contained in:
Konstantin 2023-04-10 15:01:29 +03:00
parent e2d0cd37e4
commit 40bea35a26
2 changed files with 3 additions and 2 deletions

View File

@ -63,7 +63,8 @@ int64_t CHeroWithMaybePickedArtifact::getTreeVersion() const
si32 CHeroWithMaybePickedArtifact::manaLimit() const
{
return hero->manaLimit();
//TODO: reduplicate code with CGHeroInstance
return si32(getPrimSkillLevel(PrimarySkill::KNOWLEDGE) * (valOfBonuses(Bonus::MANA_PER_KNOWLEDGE)));
}
CHeroWithMaybePickedArtifact::CHeroWithMaybePickedArtifact(CWindowWithArtifacts * Cww, const CGHeroInstance * Hero)

View File

@ -56,7 +56,7 @@ public:
int64_t getTreeVersion() const override;
si32 manaLimit() const override;
si32 manaLimit() const;
};
class CHeroWindow : public CStatusbarWindow, public CGarrisonHolder, public CWindowWithArtifacts