Преглед на файлове

Fixed #331 - Cartographer messages will now be based on their type and not the surface.

DjWarmonger преди 16 години
родител
ревизия
b79fe389a2
променени са 1 файла, в които са добавени 10 реда и са изтрити 5 реда
  1. 10 5
      hch/CObjectHandler.cpp

+ 10 - 5
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();