From b79fe389a2c4e1753027a436bda6cac681e70090 Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Wed, 30 Dec 2009 10:02:31 +0000 Subject: [PATCH] Fixed #331 - Cartographer messages will now be based on their type and not the surface. --- hch/CObjectHandler.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 30b06ee5f..79750a5e9 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -4778,14 +4778,19 @@ void CCartographer::onHeroVisit( const CGHeroInstance * h ) const { //ask if he wants to buy one int text; - if (cb->getTile(pos)->tertype == 8) //water - text = 25; - else + switch (subID) { - if (pos.z == 0) + case 0: + text = 25; + break; + case 1: text = 26; - else + break; + case 2: text = 27; + break; + default: + tlog2 << "Unrecognized subtype of cartographer" << std::endl; } BlockingDialog bd (true, false); bd.player = h->getOwner();