From dc5370ad6e0389639b9449d2fd28c6b4de5945ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Sun, 31 Oct 2010 19:17:26 +0000 Subject: [PATCH] Fixed #585 and #588. --- client/CCastleInterface.cpp | 6 +++++- client/CPlayerInterface.cpp | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/CCastleInterface.cpp b/client/CCastleInterface.cpp index eb219453d..d110a4306 100644 --- a/client/CCastleInterface.cpp +++ b/client/CCastleInterface.cpp @@ -603,7 +603,11 @@ void CCastleInterface::buildingClicked(int building) /*Tower*/ case 2://Artifact Merchant /*Dungeon*/ case 5://Artifact Merchant /*Conflux*/ case 8://Artifact Merchant - GH.pushInt(new CMarketplaceWindow(town, town->visitingHero, RESOURCE_ARTIFACT)); + if(town->visitingHero) + GH.pushInt(new CMarketplaceWindow(town, town->visitingHero, RESOURCE_ARTIFACT)); + else + LOCPLINT->showInfoDialog(boost::str(boost::format(CGI->generaltexth->allTexts[273]) % b->Name())); //Only visiting heroes may use the %s. + break; default: defaultBuildingClicked(building); diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index fe9cc5386..47ae1b2a8 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -1084,7 +1084,6 @@ bool CPlayerInterface::moveHero( const CGHeroInstance *h, CGPath path ) bool guarded = CGI->mh->map->isInTheMap(cb->guardingCreaturePosition(endpos - int3(1, 0, 0))); cb->moveHero(h,endpos); - curTile = cb->getTileInfo(endpos); eventsM.unlock(); while(stillMoveHero.data != STOP_MOVE && stillMoveHero.data != CONTINUE_MOVE)