From 0ffbaa457e44c3d5d8a068847c668cc799fff43b Mon Sep 17 00:00:00 2001 From: DjWarmonger <warmonger@vp.pl> Date: Sat, 21 Nov 2009 16:37:27 +0000 Subject: [PATCH] Fixed #218 - mana will be given to heros after taking all bonuses into calculation. --- hch/CObjectHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 6c7ae10bd..377818816 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -709,8 +709,6 @@ void CGHeroInstance::initHero() } if(secSkills.size() == 1 && secSkills[0] == std::pair<ui8,ui8>(-1, -1)) //set secondary skills to default secSkills = type->secSkillsInit; - if(mana < 0) - mana = manaLimit(); if (!name.length()) name = type->name; if (exp == 0xffffffff) @@ -764,6 +762,8 @@ void CGHeroInstance::initHero() boost::algorithm::replace_first(hoverName,"%s", type->heroClass->name); recreateArtBonuses(); + if(mana < 0) + mana = manaLimit(); //after all bonuses are taken into account } void CGHeroInstance::initHeroDefInfo()