src/ai/core/town/query.cpp
branchnoai
changeset 9405 df6f3b4b0038
parent 9380 f4c7eb98b43d
--- a/src/ai/core/town/query.cpp	Thu Mar 15 13:36:45 2007 +0000
+++ b/src/ai/core/town/query.cpp	Thu Mar 15 13:50:58 2007 +0000
@@ -6,6 +6,7 @@
 #include "../../../town.h"
 #include "../../../strings.h"
 #include "../../../variables.h" /* For SetDParam */
+#include "table/strings.h"
 
 TownID AITown::GetMaxTownID()
 {
@@ -27,9 +28,8 @@
 	static const int len = 64;
 	char *town_name = MallocT<char>(len);
 
-	const Town *t = ::GetTown(town_id);
-	SetDParam(0, t->townnameparts);
-	GetString(town_name, t->townnametype, &town_name[len - 1]);
+	SetDParam(0, town_id);
+	GetString(town_name, STR_TOWN, &town_name[len - 1]);
 
 	return town_name;
 }