| 1017 | } |
| 1018 | |
| 1019 | bool ConfigManager::loadSkills(const std::string& fileName) |
| 1020 | { |
| 1021 | OD_LOG_INF("Load Skills file: " + fileName); |
| 1022 | std::stringstream defFile; |
| 1023 | if(!Helper::readFileWithoutComments(fileName, defFile)) |
| 1024 | { |
| 1025 | OD_LOG_ERR("Couldn't read " + fileName); |
| 1026 | return false; |
| 1027 | } |
| 1028 | |
| 1029 | std::string nextParam; |
| 1030 | // Read in the creature class descriptions |
| 1031 | defFile >> nextParam; |
| 1032 | if (nextParam != "[Skills]") |
| 1033 | { |
| 1034 | OD_LOG_ERR("Invalid Skills start format. Line was " + nextParam); |
| 1035 | return false; |
| 1036 | } |
| 1037 | |
| 1038 | while(defFile.good()) |
| 1039 | { |
| 1040 | if(!(defFile >> nextParam)) |
| 1041 | break; |
| 1042 | |
| 1043 | if (nextParam == "[/Skills]") |
| 1044 | break; |
| 1045 | |
| 1046 | defFile >> mSkillPoints[nextParam]; |
| 1047 | } |
| 1048 | return true; |
| 1049 | } |
| 1050 | |
| 1051 | bool ConfigManager::loadTilesets(const std::string& fileName) |
| 1052 | { |
nothing calls this directly
no test coverage detected