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

- some fixes for town events

- #190 - InfoWindow components adjusted vertically
- #194 - correct sex for heroes in battles
This commit is contained in:
Ivan Savenko
2010-08-25 14:57:58 +00:00
parent ea966a3d21
commit dc2f3cf181
12 changed files with 230 additions and 198 deletions

View File

@ -1217,7 +1217,10 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
//loading hero animations
if(hero1) // attacking hero
{
attackingHero = new CBattleHero(graphics->battleHeroes[hero1->type->heroType], 0, 0, false, hero1->tempOwner, hero1->tempOwner == curInt->playerID ? hero1 : NULL, this);
int type = hero1->type->heroType;
if ( type % 2 ) type--;
if ( hero1->sex ) type++;
attackingHero = new CBattleHero(graphics->battleHeroes[type], 0, 0, false, hero1->tempOwner, hero1->tempOwner == curInt->playerID ? hero1 : NULL, this);
attackingHero->pos = genRect(attackingHero->dh->ourImages[0].bitmap->h, attackingHero->dh->ourImages[0].bitmap->w, -40 + pos.x, pos.y);
}
else
@ -1226,7 +1229,10 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
}
if(hero2) // defending hero
{
defendingHero = new CBattleHero(graphics->battleHeroes[hero2->type->heroType], 0, 0, true, hero2->tempOwner, hero2->tempOwner == curInt->playerID ? hero2 : NULL, this);
int type = hero2->type->heroType;
if ( type % 2 ) type--;
if ( hero2->sex ) type++;
defendingHero = new CBattleHero(graphics->battleHeroes[type ], 0, 0, true, hero2->tempOwner, hero2->tempOwner == curInt->playerID ? hero2 : NULL, this);
defendingHero->pos = genRect(defendingHero->dh->ourImages[0].bitmap->h, defendingHero->dh->ourImages[0].bitmap->w, 690 + pos.x, pos.y);
}
else