1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00

- reorganized hero classes

- artifact iconIndex should work
- new file with hardcoded string constants: lib/StringConstants.h

Note: some minor bugs, will fix soon:
- slow to open hero window
- hero adventure map images serialization is broken\incorrect
This commit is contained in:
Ivan Savenko
2012-12-14 15:32:53 +00:00
parent afe3f77a59
commit ffe8b99369
31 changed files with 2786 additions and 1355 deletions

View File

@ -403,7 +403,7 @@ CGHeroInstance * CGameState::HeroesPool::pickHeroFor(bool native, TPlayerColor p
for(auto i=available.begin(); i!=available.end(); i++)
{
if(pavailable.find(i->first)->second & 1<<player
&& i->second->type->heroType/2 == town->typeID)
&& i->second->type->heroClass->faction == town->typeID)
{
pool.push_back(i->second); //get all available heroes
}
@ -680,7 +680,7 @@ void CGameState::randomizeObject(CGObjectInstance *cur)
cur->ID = ran.first;
h->portrait = cur->subID = ran.second;
h->type = VLC->heroh->heroes[ran.second];
h->randomizeArmy(h->type->heroType/2);
h->randomizeArmy(h->type->heroClass->faction);
map->heroes.push_back(h);
return; //TODO: maybe we should do something with definfo?
}