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

* refactoring, a few intriguing problems remain

This commit is contained in:
mateuszb
2013-02-13 23:55:42 +00:00
parent ceea466f54
commit 9e00090c42
36 changed files with 544 additions and 420 deletions

View File

@ -586,7 +586,7 @@ Uint8 CSpellWindow::pagesWithinCurrentTab()
void CSpellWindow::teleportTo( int town, const CGHeroInstance * hero )
{
const CGTownInstance * dest = LOCPLINT->cb->getTown(town);
const CGTownInstance * dest = LOCPLINT->cb->getTown(ObjectInstanceID(town));
LOCPLINT->cb->castSpell(hero, SpellID::TOWN_PORTAL, dest->visitablePos());
}
@ -761,7 +761,7 @@ void CSpellWindow::SpellArea::clickLeft(tribool down, bool previousState)
const CGTownInstance *t = Towns[i];
if (t->visitingHero == NULL) //empty town and this is
{
availableTowns.push_back(t->id);//add to the list
availableTowns.push_back(t->id.getNum());//add to the list
}
}
if (availableTowns.empty())