1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

* fixed crash when there was flaggable building next to map edge

* increased char per line limit for subtitles under components
* saves are sorted primary by map format, secondary by name
* fixed displaying date of saved game (uses local time, removed square character)
* removed redundant quotation marks from artifact events text
* corrected some exp/level values
* primary skills cannot negative values
* fixed crash on entering hall when town was near map edge
* workaround to prevent crashes when gaining same sec skill on leveling serie
* fixed displaying luck effect animation
* minor improvements
This commit is contained in:
Michał W. Urbańczyk
2009-07-12 14:07:36 +00:00
parent db2f8c1d7c
commit 64d9665c39
11 changed files with 60 additions and 42 deletions

View File

@ -371,6 +371,7 @@ int CGHeroInstance::getPrimSkillLevel(int id) const
for(std::list<HeroBonus>::const_iterator i=bonuses.begin(); i != bonuses.end(); i++)
if(i->type == HeroBonus::PRIMARY_SKILL && i->subtype==id)
ret += i->val;
amax(ret, id/2);//minimum value for attack and defense is 0 and for spell power and knowledge - 1
return ret;
}
ui8 CGHeroInstance::getSecSkillLevel(const int & ID) const
@ -3035,13 +3036,6 @@ void CGOnceVisitable::onHeroVisit( const CGHeroInstance * h ) const
}
else //first visit - give bonus!
{
if(ID == 105 && artOrRes == 1)
{
txtid++;
iw.text.addReplacement(MetaString::ART_NAMES, bonusType);
}
switch(artOrRes)
{
case 0:
@ -3058,6 +3052,11 @@ void CGOnceVisitable::onHeroVisit( const CGHeroInstance * h ) const
}
iw.text.addTxt(MetaString::ADVOB_TXT, txtid);
if(ID == 105 && artOrRes == 1)
{
iw.text.localStrings.back().second++;
iw.text.addReplacement(MetaString::ART_NAMES, bonusType);
}
}
cb->showInfoDialog(&iw);