mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
* [feature] giving starting hero
* [feature] VCMI will try to use files from /Data folder instead of those from h3bitmap.lod * [feature] picked artifacts are added to hero's backpack
This commit is contained in:
@@ -281,6 +281,20 @@ void CTerrainRect::clickLeft(tribool down)
|
||||
{ //move
|
||||
CPath sended(*currentPath); //temporary path - engine will operate on it
|
||||
mres = LOCPLINT->cb->moveHero( ((const CGHeroInstance*)LOCPLINT->adventureInt->selection.selected)->type->ID,&sended,1,0);
|
||||
if(!mres)
|
||||
{
|
||||
delete currentPath;
|
||||
currentPath = NULL;
|
||||
int i=0;
|
||||
for(;i<LOCPLINT->adventureInt->heroList.items.size();i++)
|
||||
{
|
||||
if(LOCPLINT->adventureInt->heroList.items[i].first->subID == ((const CGHeroInstance*)LOCPLINT->adventureInt->selection.selected)->type->ID)
|
||||
{
|
||||
LOCPLINT->adventureInt->heroList.items[i].second = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user