From 6391f0f85a8dd0ed8f683682f06ed2fd93ba5606 Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Tue, 9 Dec 2014 14:01:32 +0300 Subject: [PATCH] Fix crash on Cartographer if there is no underground level Show "already visited" text for stalagmite cartographer if map don't have underground level. This one fixes bug #1985 --- lib/mapObjects/MiscObjects.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mapObjects/MiscObjects.cpp b/lib/mapObjects/MiscObjects.cpp index 2006acbe8..6249c1d3e 100644 --- a/lib/mapObjects/MiscObjects.cpp +++ b/lib/mapObjects/MiscObjects.cpp @@ -1445,7 +1445,8 @@ void CGShipyard::onHeroVisit( const CGHeroInstance * h ) const void CCartographer::onHeroVisit( const CGHeroInstance * h ) const { - if (!wasVisited (h->getOwner()) ) //if hero has not visited yet this cartographer + //if player has not bought map of this subtype yet and underground exist for stalagmite cartographer + if (!wasVisited(h->getOwner()) && (subID != 2 || cb->gameState()->map->twoLevel)) { if (cb->getResource(h->tempOwner, Res::GOLD) >= 1000) //if he can afford a map {