summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-07-17 21:01:26 -0400
committerChuck Miller <shadowmil@gmail.com>2010-07-17 21:40:48 -0400
commit6a13899daed872debe2375c71903505e6434a731 (patch)
treefaaf483d80c6e791ec182f6331697f06281b97c7 /src/gui/skilldialog.cpp
parentb738d67f76336641468e3f77cef472a52a6e5ad3 (diff)
downloadmana-6a13899daed872debe2375c71903505e6434a731.tar.gz
mana-6a13899daed872debe2375c71903505e6434a731.tar.bz2
mana-6a13899daed872debe2375c71903505e6434a731.tar.xz
mana-6a13899daed872debe2375c71903505e6434a731.zip
Modify how attributes and stats are handled
Handling moved from LocalPlayer to PlayerInfo class Event system used to update windows Reviewed-by: Jared Adams
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 683a6d43..ccf4b418 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -21,8 +21,8 @@
#include "gui/skilldialog.h"
-#include "localplayer.h"
#include "log.h"
+#include "playerinfo.h"
#include "gui/setup.h"
#include "gui/theme.h"
@@ -259,7 +259,7 @@ std::string SkillDialog::update(int id)
void SkillDialog::update()
{
mPointsLabel->setCaption(strprintf(_("Skill points available: %d"),
- player_node->getSkillPoints()));
+ PlayerInfo::getAttribute(SKILL_POINTS)));
mPointsLabel->adjustSize();
for (SkillMap::iterator it = mSkills.begin(); it != mSkills.end(); it++)
@@ -410,10 +410,10 @@ void SkillModel::updateVisibilities()
void SkillInfo::update()
{
- int baseLevel = player_node->getAttributeBase(id);
- int effLevel = player_node->getAttributeEffective(id);
+ int baseLevel = PlayerInfo::getStatBase(id);
+ int effLevel = PlayerInfo::getStatEffective(id);
- std::pair<int, int> exp = player_node->getExperience(id);
+ std::pair<int, int> exp = PlayerInfo::getStatExperience(id);
if (!modifiable && baseLevel == 0 && effLevel == 0 && exp.second == 0)
{