1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Commander skill description support (#266)

* Added commander skill description support

* Add support for ZNPC00.txt not found
This commit is contained in:
Dydzio
2017-05-26 21:58:33 +02:00
committed by ArseniyShestakov
parent b5daa24982
commit 5127061e28
4 changed files with 70 additions and 15 deletions

View File

@ -490,4 +490,21 @@ CGeneralTextHandler::CGeneralTextHandler()
}
while (parser.endLine());
}
if (VLC->modh->modules.COMMANDERS)
{
try
{
CLegacyConfigParser parser("DATA/ZNPC00.TXT");
parser.endLine();//header
do
{
znpc00.push_back(parser.readString());
} while (parser.endLine());
}
catch (std::runtime_error)
{
logGlobal->warn("WoG file ZNPC00.TXT containing commander texts was not found");
}
}
}