diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-29 21:56:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-30 00:03:20 +0300 |
commit | d0a72be7362cfad41187b6e9544ac44802a66ebd (patch) | |
tree | 76ca7130307a6f9b9b648ffd019fe0bba5cfda67 /src/gui | |
parent | e2c1b87e38e5c921912b334ca971e92b7989f8a8 (diff) | |
download | manaverse-d0a72be7362cfad41187b6e9544ac44802a66ebd.tar.gz manaverse-d0a72be7362cfad41187b6e9544ac44802a66ebd.tar.bz2 manaverse-d0a72be7362cfad41187b6e9544ac44802a66ebd.tar.xz manaverse-d0a72be7362cfad41187b6e9544ac44802a66ebd.zip |
Remove basic attributes usage from generalhandler and move to statuswindow and statdb.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 15 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index cc50c719e..f4ca38195 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -49,6 +49,8 @@ #include "net/playerhandler.h" #include "net/serverfeatures.h" +#include "resources/db/statdb.h" + #include "resources/item/item.h" #include "utils/delete2.h" @@ -228,6 +230,19 @@ StatusWindow::StatusWindow() : updateLevelLabel(); } +void StatusWindow::addBasicAttributes() +{ + const std::vector<BasicStat> &stats = StatDb::getExtraStats(); + FOR_EACH (std::vector<BasicStat>::const_iterator, it, stats) + { + const BasicStat &stat = *it; + addAttribute(stat.attr, + stat.name, + stat.tag, + Modifiable_true); + } +} + void StatusWindow::updateLevelLabel() { if (localPlayer && localPlayer->isGM()) diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h index 00b468d07..a11ea62b4 100644 --- a/src/gui/windows/statuswindow.h +++ b/src/gui/windows/statuswindow.h @@ -99,6 +99,8 @@ class StatusWindow final : public Window, void updateLevelLabel(); + void addBasicAttributes(); + private: static std::string translateLetter(const char *const letters); static std::string translateLetter2(const std::string &letters); |