mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
CGameHandler::newTurn: use next day TurnInfo to set correct hero MP
This hotfix actually fix issue 2083, but in future we need to rework new turn code anyway. See issue 2356.
This commit is contained in:
parent
66e6f15e67
commit
6985e96f0d
@ -1331,7 +1331,8 @@ void CGameHandler::newTurn()
|
||||
|
||||
NewTurn::Hero hth;
|
||||
hth.id = h->id;
|
||||
hth.move = h->maxMovePoints(gs->map->getTile(h->getPosition(false)).terType != ETerrainType::WATER);
|
||||
// TODO: this code executed when bonuses of previous day not yet updated (this happen in NewTurn::applyGs). See issue 2356
|
||||
hth.move = h->maxMovePoints(gs->map->getTile(h->getPosition(false)).terType != ETerrainType::WATER, new TurnInfo(h, 1));
|
||||
|
||||
if(h->visitedTown && h->visitedTown->hasBuilt(BuildingID::MAGES_GUILD_1)) //if hero starts turn in town with mage guild
|
||||
hth.mana = std::max(h->mana, h->manaLimit()); //restore all mana
|
||||
|
Loading…
Reference in New Issue
Block a user