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:
@ -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;
|
||||
|
Reference in New Issue
Block a user