mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix University and Altar
This commit is contained in:
parent
898733eed7
commit
3cb489e9bd
@ -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
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
void showBlockingDialog(BlockingDialog *iw) override {}
|
||||
void showGarrisonDialog(ObjectInstanceID upobj, ObjectInstanceID hid, bool removableUnits) override {} //cb will be called when player closes garrison window
|
||||
void showTeleportDialog(TeleportDialog *iw) override {}
|
||||
void showThievesGuildWindow(PlayerColor player, ObjectInstanceID requestingObjId) override {}
|
||||
void showObjectWindow(const CGObjectInstance * object, EOpenWindowMode window, const CGHeroInstance * visitor, bool addQuery) override {};
|
||||
void giveResource(PlayerColor player, GameResID which, int val) override {}
|
||||
void giveResources(PlayerColor player, TResources resources) override {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user