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