diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-30 15:08:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-30 15:08:36 +0300 |
commit | 98db053ae7fa09a8b209dca95e4e65d00320cc0b (patch) | |
tree | b57a5aaa669a20f0e43f4be698ef3204ed56c0fb /src/gui/windows/statuswindow.cpp | |
parent | 3589bb9fa0800650accc124ea6820d5834c27e43 (diff) | |
download | manaplus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.tar.gz manaplus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.tar.bz2 manaplus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.tar.xz manaplus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.zip |
Move extended stats from status window into stats.xml too.s20160630
Also add reports about failed stats loading.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index f4ca38195..60aab8ca3 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -230,10 +230,12 @@ StatusWindow::StatusWindow() : updateLevelLabel(); } -void StatusWindow::addBasicAttributes() +void StatusWindow::addAttributes() { - const std::vector<BasicStat> &stats = StatDb::getExtraStats(); - FOR_EACH (std::vector<BasicStat>::const_iterator, it, stats) + clearAttributes(); + + const std::vector<BasicStat> &basicStats = StatDb::getBasicStats(); + FOR_EACH (std::vector<BasicStat>::const_iterator, it, basicStats) { const BasicStat &stat = *it; addAttribute(stat.attr, @@ -241,6 +243,14 @@ void StatusWindow::addBasicAttributes() stat.tag, Modifiable_true); } + + const std::vector<BasicStat> &extendedStats = StatDb::getExtendedStats(); + FOR_EACH (std::vector<BasicStat>::const_iterator, it, extendedStats) + { + const BasicStat &stat = *it; + addAttribute(stat.attr, + stat.name); + } } void StatusWindow::updateLevelLabel() |