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

Experimental commit...

* spellbook displays only spells known by Hero
* further fixes for leveling-up
This commit is contained in:
Michał W. Urbańczyk
2009-02-14 10:11:07 +00:00
parent b2924064ee
commit fd07f7f33e
7 changed files with 78 additions and 49 deletions

View File

@ -70,13 +70,13 @@ CSpellWindow::CSpellWindow(const SDL_Rect & myRect, const CGHeroInstance * myHer
selectedTab(4),
spellSite(0)
{
mySpells = myHero->spells;
//XXX for testing only
//mySpells = myHero->spells;
for(ui32 v=0; v<CGI->spellh->spells.size(); ++v)
{
if(!CGI->spellh->spells[v].creatureAbility)
mySpells.insert(v);
}
//for(ui32 v=0; v<CGI->spellh->spells.size(); ++v)
//{
// if(!CGI->spellh->spells[v].creatureAbility)
// mySpells.insert(v);
//}
for(int b=0; b<4; ++b) schoolLvls[b] = 0;
for(size_t b=0; b<myHero->secSkills.size(); ++b)