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

Update client/windows/GUIClasses.cpp

Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
This commit is contained in:
Laserlicht 2023-10-13 11:36:18 +02:00
parent 08832eeeb4
commit 5a84e7cd7f

View File

@ -501,8 +501,8 @@ CTavernWindow::CTavernWindow(const CGObjectInstance * TavernObj, const std::func
} }
if(LOCPLINT->castleInt) if(LOCPLINT->castleInt)
CCS->videoh->open(LOCPLINT->castleInt->town->town->clientInfo.tavernVideo); CCS->videoh->open(LOCPLINT->castleInt->town->town->clientInfo.tavernVideo);
else if(dynamic_cast<const CGTownInstance *>(TavernObj)) else if(const auto * townObj = dynamic_cast<const CGTownInstance *>(TavernObj))
CCS->videoh->open(dynamic_cast<const CGTownInstance *>(TavernObj)->town->clientInfo.tavernVideo); CCS->videoh->open(townObj->town->clientInfo.tavernVideo);
else else
CCS->videoh->open(VideoPath::builtin("TAVERN.BIK")); CCS->videoh->open(VideoPath::builtin("TAVERN.BIK"));
} }