1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Add TeleportDialog and CTeleportDialogQuery

TeleportDialog is based off BlockingDialog and it's needed for server to ask client what teleport hero should be teleported to.
It's also contain list of possible exits, identifier of currently used channel and also impassable option.
If impassable set to true then client will remember that current teleport channel is lack of exit point.
This commit is contained in:
ArseniyShestakov
2015-03-08 16:37:33 +03:00
parent 8d7b6d119f
commit 18535db0ef
5 changed files with 50 additions and 0 deletions

View File

@ -313,6 +313,18 @@ CBlockingDialogQuery::CBlockingDialogQuery(const BlockingDialog &bd)
addPlayer(bd.player);
}
void CTeleportDialogQuery::notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const
{
auto obj = dynamic_cast<const CGTeleport *>(objectVisit.visitedObject);
obj->teleportDialogAnswered(objectVisit.visitingHero, *answer, td.exits);
}
CTeleportDialogQuery::CTeleportDialogQuery(const TeleportDialog &td)
{
this->td = td;
addPlayer(td.hero->tempOwner);
}
CHeroLevelUpDialogQuery::CHeroLevelUpDialogQuery(const HeroLevelUp &Hlu)
{
hlu = Hlu;