summaryrefslogtreecommitdiff
path: root/src/gui/windows/statuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-29 21:56:30 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-30 00:03:20 +0300
commitd0a72be7362cfad41187b6e9544ac44802a66ebd (patch)
tree76ca7130307a6f9b9b648ffd019fe0bba5cfda67 /src/gui/windows/statuswindow.cpp
parente2c1b87e38e5c921912b334ca971e92b7989f8a8 (diff)
downloadplus-d0a72be7362cfad41187b6e9544ac44802a66ebd.tar.gz
plus-d0a72be7362cfad41187b6e9544ac44802a66ebd.tar.bz2
plus-d0a72be7362cfad41187b6e9544ac44802a66ebd.tar.xz
plus-d0a72be7362cfad41187b6e9544ac44802a66ebd.zip
Remove basic attributes usage from generalhandler and move to statuswindow and statdb.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r--src/gui/windows/statuswindow.cpp15
1 files changed, 15 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())