From e05c73d6eaa484307dfec5bd0e8745d35fdde1bf Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Thu, 24 Dec 2009 06:48:45 +0000 Subject: [PATCH] Fixed #274 --- server/CGameHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 8eceb249b..1c9b72fe0 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -816,9 +816,9 @@ void CGameHandler::newTurn() hth.move = h->maxMovePoints(gs->map->getTile(h->getPosition(false)).tertype != TerrainTile::water); if(h->visitedTown && vstd::contains(h->visitedTown->builtBuildings,0)) //if hero starts turn in town with mage guild - hth.mana = h->manaLimit(); //restore all mana + hth.mana = std::max(h->mana, h->manaLimit()); //restore all mana else - hth.mana = std::max(si32(0), std::min(h->mana + h->manaRegain(), h->manaLimit()) ); + hth.mana = std::max(si32(0), std::max(h->mana, std::min(h->mana + h->manaRegain(), h->manaLimit())) ); n.heroes.insert(hth);