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

* SlotID refactoring

This commit is contained in:
mateuszb
2013-02-16 14:03:47 +00:00
parent d23a5dcfdf
commit 560315bc48
33 changed files with 359 additions and 351 deletions

View File

@ -806,9 +806,9 @@ void CGameState::init(StartInfo * si)
{
for(int i=0; i<GameConstants::ARMY_SIZE; i++)
{
if(hero->slotEmpty(i))
if(hero->slotEmpty(SlotID(i)))
{
hero->addToSlot(i, CreatureID(curBonus->info2), curBonus->info3);
hero->addToSlot(SlotID(i), CreatureID(curBonus->info2), curBonus->info3);
break;
}
}
@ -1714,8 +1714,8 @@ void CGameState::initDuel()
{
CreatureID cre = dp.sides[i].stacks[j].type;
TQuantity count = dp.sides[i].stacks[j].count;
if(count || obj->hasStackAtSlot(j))
obj->setCreature(j, cre, count);
if(count || obj->hasStackAtSlot(SlotID(j)))
obj->setCreature(SlotID(j), cre, count);
}
BOOST_FOREACH(const DuelParameters::CusomCreature &cc, dp.creatures)