1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Add showTeleportDialog everywhere except actual code for AI and player

Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
This commit is contained in:
ArseniyShestakov
2015-03-08 16:52:50 +03:00
parent 18535db0ef
commit 25656aa586
9 changed files with 21 additions and 0 deletions

View File

@ -1897,6 +1897,14 @@ void CGameHandler::showBlockingDialog( BlockingDialog *iw )
sendToAllClients(iw);
}
void CGameHandler::showTeleportDialog( TeleportDialog *iw )
{
auto dialogQuery = make_shared<CTeleportDialogQuery>(*iw);
queries.addQuery(dialogQuery);
iw->queryID = dialogQuery->queryID;
sendToAllClients(iw);
}
void CGameHandler::giveResource(PlayerColor player, Res::ERes which, int val) //TODO: cap according to Bersy's suggestion
{
if(!val) return; //don't waste time on empty call