From 046a6fc45a0750484c80b44ef670d247c7af875d Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Thu, 25 Dec 2014 06:20:40 +0300 Subject: [PATCH] Visible blocked button for good and evil heroes on Altar of Sacrifice This is expected behaviour as explained in issue 558 --- client/windows/CTradeWindow.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/client/windows/CTradeWindow.cpp b/client/windows/CTradeWindow.cpp index e47fff129..1bfa55ac9 100644 --- a/client/windows/CTradeWindow.cpp +++ b/client/windows/CTradeWindow.cpp @@ -1155,10 +1155,18 @@ CAltarWindow::CAltarWindow(const IMarket *Market, const CGHeroInstance *Hero /*= deal = new CButton(Point(269, 520), "ALTSACR.DEF", CGI->generaltexth->zelp[585], std::bind(&CAltarWindow::makeDeal,this)); - if(Hero->getAlignment() != ::EAlignment::EVIL && Mode == EMarketMode::CREATURE_EXP) - new CButton(Point(516, 421), "ALTART.DEF", CGI->generaltexth->zelp[580], std::bind(&CTradeWindow::setMode,this, EMarketMode::ARTIFACT_EXP)); - if(Hero->getAlignment() != ::EAlignment::GOOD && Mode == EMarketMode::ARTIFACT_EXP) - new CButton(Point(516, 421), "ALTSACC.DEF", CGI->generaltexth->zelp[572], std::bind(&CTradeWindow::setMode,this, EMarketMode::CREATURE_EXP)); + if(Mode == EMarketMode::CREATURE_EXP) + { + CButton *changeMode = new CButton(Point(516, 421), "ALTART.DEF", CGI->generaltexth->zelp[580], std::bind(&CTradeWindow::setMode,this, EMarketMode::ARTIFACT_EXP)); + if (Hero->getAlignment() == ::EAlignment::EVIL) + changeMode->block(true); + } + if(Mode == EMarketMode::ARTIFACT_EXP) + { + CButton *changeMode = new CButton(Point(516, 421), "ALTSACC.DEF", CGI->generaltexth->zelp[572], std::bind(&CTradeWindow::setMode,this, EMarketMode::CREATURE_EXP)); + if (Hero->getAlignment() == ::EAlignment::GOOD) + changeMode->block(true); + } expPerUnit.resize(GameConstants::ARMY_SIZE, 0); getExpValues();