mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Fix University and Altar
This commit is contained in:
@@ -164,6 +164,11 @@ OpenWindowQuery::OpenWindowQuery(CGameHandler * owner, const CGHeroInstance *her
|
||||
addPlayer(hero->getOwner());
|
||||
}
|
||||
|
||||
void OpenWindowQuery::onExposure(QueryPtr topQuery)
|
||||
{
|
||||
//do nothing - wait for reply
|
||||
}
|
||||
|
||||
bool OpenWindowQuery::blocksPack(const CPack *pack) const
|
||||
{
|
||||
if (mode == EOpenWindowMode::TAVERN_WINDOW)
|
||||
@@ -172,6 +177,12 @@ bool OpenWindowQuery::blocksPack(const CPack *pack) const
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mode == EOpenWindowMode::UNIVERSITY_WINDOW)
|
||||
{
|
||||
if(dynamic_ptr_cast<TradeOnMarketplace>(pack) != nullptr)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mode == EOpenWindowMode::MARKET_WINDOW)
|
||||
{
|
||||
if(dynamic_ptr_cast<ExchangeArtifacts>(pack) != nullptr)
|
||||
|
||||
@@ -88,7 +88,8 @@ class OpenWindowQuery : public CDialogQuery
|
||||
public:
|
||||
OpenWindowQuery(CGameHandler * owner, const CGHeroInstance *hero, EOpenWindowMode mode);
|
||||
|
||||
virtual bool blocksPack(const CPack *pack) const override;
|
||||
bool blocksPack(const CPack *pack) const override;
|
||||
void onExposure(QueryPtr topQuery) override;
|
||||
};
|
||||
|
||||
class CTeleportDialogQuery : public CDialogQuery
|
||||
|
||||
Reference in New Issue
Block a user