mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Added encapsulation for movement points access
This commit is contained in:
@@ -234,7 +234,7 @@ CHeroList::CHeroItem::CHeroItem(CHeroList *parent, const CGHeroInstance * Hero)
|
||||
|
||||
void CHeroList::CHeroItem::update()
|
||||
{
|
||||
movement->setFrame(std::min<size_t>(movement->size()-1, hero->movement / 100));
|
||||
movement->setFrame(std::min<size_t>(movement->size()-1, hero->movementPointsRemaining() / 100));
|
||||
mana->setFrame(std::min<size_t>(mana->size()-1, hero->mana / 5));
|
||||
redraw();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user