1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Support for Tavern on adv map.

This commit is contained in:
Michał W. Urbańczyk
2010-07-08 23:03:27 +00:00
parent 24b47ce006
commit 1e30045541
18 changed files with 185 additions and 141 deletions

View File

@@ -343,10 +343,12 @@ void HeroRecruited::applyCl( CClient *cl )
CGI->mh->initHeroDef(h);
CGI->mh->printObject(h);
if(vstd::contains(cl->playerint,h->tempOwner))
{
cl->playerint[h->tempOwner]->heroCreated(h);
cl->playerint[h->tempOwner]->heroInGarrisonChange(GS(cl)->getTown(tid));
if(const CGTownInstance *t = GS(cl)->getTown(tid))
cl->playerint[h->tempOwner]->heroInGarrisonChange(t);
}
}
@@ -733,6 +735,10 @@ void OpenWindow::applyCl(CClient *cl)
{
INTERFACE_CALL_IF_PRESENT(id1, showPuzzleMap);
}
case TAVERN_WINDOW:
const CGObjectInstance *obj1 = cl->getObj(id1),
*obj2 = cl->getObj(id2);
INTERFACE_CALL_IF_PRESENT(obj1->tempOwner, showTavernWindow, obj2);
break;
}