diff --git a/library/DFMemInfo.cpp b/library/DFMemInfo.cpp index 22969a56c..6b3fa0ffe 100644 --- a/library/DFMemInfo.cpp +++ b/library/DFMemInfo.cpp @@ -307,8 +307,7 @@ void memory_info::setSkill (const string & key, const string & value) void memory_info::setLevel(const std::string &nLevel, const std::string &nName, - const std::string &nMin_xp, - const std::string &nMax_xp) + const std::string &nXp) { uint32_t keyInt = strtol(nLevel.c_str(), NULL, 10); @@ -317,8 +316,7 @@ void memory_info::setLevel(const std::string &nLevel, d->levels[keyInt].level = keyInt; d->levels[keyInt].name = nName; - d->levels[keyInt].min_xp = strtol(nMin_xp.c_str(), NULL, 10); - d->levels[keyInt].max_xp = strtol(nMax_xp.c_str(), NULL, 10); + d->levels[keyInt].xpNxtLvl = strtol(nXp.c_str(), NULL, 10); } void memory_info::setTrait(const string & key, diff --git a/library/DFMemInfoManager.cpp b/library/DFMemInfoManager.cpp index 021e909b7..bc34e877a 100644 --- a/library/DFMemInfoManager.cpp +++ b/library/DFMemInfoManager.cpp @@ -210,7 +210,7 @@ void MemInfoManager::ParseEntry (TiXmlElement* entry, memory_info* mem, map setLevel(value, name, pMemEntry->Attribute("min_xp"), pMemEntry->Attribute("max_xp")); + mem->setLevel(value, name, pMemEntry->Attribute("xpNxtLvl")); } else { diff --git a/library/include/dfhack/DFMemInfo.h b/library/include/dfhack/DFMemInfo.h index a5aa5284c..d3370fc5b 100644 --- a/library/include/dfhack/DFMemInfo.h +++ b/library/include/dfhack/DFMemInfo.h @@ -107,7 +107,7 @@ namespace DFHack const std::string &, const std::string &, const std::string &); void setLabor(const std::string &, const std::string &); void setLevel(const std::string &nLevel, const std::string &nName, - const std::string &nMin_xp, const std::string &nMax_xp); + const std::string &nXp); void RebaseVTable(const int32_t offset); void setParentProcess(Process * _p); diff --git a/library/include/dfhack/DFTypes.h b/library/include/dfhack/DFTypes.h index bcf15432b..748bf9381 100644 --- a/library/include/dfhack/DFTypes.h +++ b/library/include/dfhack/DFTypes.h @@ -215,8 +215,7 @@ struct t_level { uint32_t level; std::string name; - uint32_t min_xp; - uint32_t max_xp; + uint32_t xpNxtLvl; }; }// namespace DFHack diff --git a/output/Memory.xml b/output/Memory.xml index c1611e926..ff63b1861 100755 --- a/output/Memory.xml +++ b/output/Memory.xml @@ -799,27 +799,27 @@ size=212 ==================================================================== L E V E L S ==================================================================== - - - - - - - - - - - - - - - - - TODO verify level 16 and up's existence in DF2010 - - - - No max xp on last level but 30000 is nice and round + + + + + + + + + + + + + + + + + TODO verify level 16 and up's existence in DF2010 + + + + -1 for no cap ==================================================================== L A B O R S