| 984 | } |
| 985 | |
| 986 | bool ConfigManager::loadSpellConfig(const std::string& fileName) |
| 987 | { |
| 988 | OD_LOG_INF("Load Spell config file: " + fileName); |
| 989 | std::stringstream defFile; |
| 990 | if(!Helper::readFileWithoutComments(fileName, defFile)) |
| 991 | { |
| 992 | OD_LOG_ERR("Couldn't read " + fileName); |
| 993 | return false; |
| 994 | } |
| 995 | |
| 996 | std::string nextParam; |
| 997 | // Read in the creature class descriptions |
| 998 | defFile >> nextParam; |
| 999 | if (nextParam != "[Spells]") |
| 1000 | { |
| 1001 | OD_LOG_ERR("Invalid Spells start format. Line was " + nextParam); |
| 1002 | return false; |
| 1003 | } |
| 1004 | |
| 1005 | while(defFile.good()) |
| 1006 | { |
| 1007 | if(!(defFile >> nextParam)) |
| 1008 | break; |
| 1009 | |
| 1010 | if (nextParam == "[/Spells]") |
| 1011 | break; |
| 1012 | |
| 1013 | defFile >> mSpellConfig[nextParam]; |
| 1014 | } |
| 1015 | |
| 1016 | return true; |
| 1017 | } |
| 1018 | |
| 1019 | bool ConfigManager::loadSkills(const std::string& fileName) |
| 1020 | { |
nothing calls this directly
no test coverage detected